Update to Chromium version 137.0.7151.0 (#1453031)

This commit is contained in:
Marshall Greenblatt
2025-05-06 12:45:36 -04:00
parent faa85bf980
commit 7944038baf
81 changed files with 731 additions and 680 deletions

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{ {
'chromium_checkout': 'refs/tags/136.0.7103.0' 'chromium_checkout': 'refs/tags/137.0.7151.0'
} }

View File

@ -329,7 +329,7 @@ typedef enum {
/// HTTP header. /// HTTP header.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS, CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS,
/// Website setting which is used for UnusedSitePermissionsService to /// Website setting which is used for RevokedPermissionsService to
/// store revoked permissions of unused sites from unused site permissions /// store revoked permissions of unused sites from unused site permissions
/// feature. /// feature.
CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS, CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS,
@ -382,11 +382,11 @@ typedef enum {
/// a requesting-origin/top-level-site combination and persistent. /// a requesting-origin/top-level-site combination and persistent.
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL, CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL,
/// Content Setting for a first-party origin trial that allows websites to /// Content Setting for a first-party origin trial that allows websites to
/// enable third-party cookie deprecation. /// enable third-party cookie deprecation.
/// ALLOW (default): no effect (e.g. third-party cookies allowed, if not /// ALLOW (default): no effect (e.g. third-party cookies allowed, if not
/// blocked otherwise). /// blocked otherwise).
/// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled. /// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled.
#if CEF_API_ADDED(13601) #if CEF_API_ADDED(13601)
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL, CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL,
#else #else
@ -442,7 +442,7 @@ typedef enum {
/// access to mouse inputs. /// access to mouse inputs.
CEF_CONTENT_SETTING_TYPE_POINTER_LOCK, CEF_CONTENT_SETTING_TYPE_POINTER_LOCK,
/// Website setting which is used for UnusedSitePermissionsService to store /// Website setting which is used for RevokedPermissionsService to store
/// auto-revoked notification permissions from abusive sites. /// auto-revoked notification permissions from abusive sites.
CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS,
@ -500,7 +500,7 @@ typedef enum {
#endif #endif
#if CEF_API_ADDED(13500) #if CEF_API_ADDED(13500)
/// Website setting which is used for UnusedSitePermissionsService to /// Website setting which is used for RevokedPermissionsService to
/// store revoked notification permissions of disruptive sites. /// store revoked notification permissions of disruptive sites.
CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS, CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS,
#endif #endif

View File

@ -73,7 +73,7 @@ CefRect GetScreenFrameRectFromDIPContentRect(HWND window,
// Convert from DIP using a method that can handle multiple displays with // Convert from DIP using a method that can handle multiple displays with
// different DPI. If |window| is nullptr the closest display will be used. // different DPI. If |window| is nullptr the closest display will be used.
const auto screen_rect = const auto screen_rect =
display::win::ScreenWin::DIPToScreenRect(window, dip_rect); display::win::GetScreenWin()->DIPToScreenRect(window, dip_rect);
RECT rect = {screen_rect.x(), screen_rect.y(), RECT rect = {screen_rect.x(), screen_rect.y(),
screen_rect.x() + screen_rect.width(), screen_rect.x() + screen_rect.width(),
@ -109,7 +109,7 @@ CefRect GetAdjustedScreenFrameRect(CefRect screen_rect,
// Convert to DIP using a method that can handle multiple displays with // Convert to DIP using a method that can handle multiple displays with
// different DPI. // different DPI.
const auto dip_rect = display::win::ScreenWin::ScreenToDIPRect( const auto dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
nullptr, gfx::Rect(screen_rect.x, screen_rect.y, screen_rect.width, nullptr, gfx::Rect(screen_rect.x, screen_rect.y, screen_rect.width,
screen_rect.height)); screen_rect.height));
const auto visible_dip_rect = MakeVisibleOnScreenRect( const auto visible_dip_rect = MakeVisibleOnScreenRect(
@ -206,7 +206,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
// Convert to DIP using a method that can handle multiple displays with // Convert to DIP using a method that can handle multiple displays with
// different DPI. Client coordinates always have origin (0,0). // different DPI. Client coordinates always have origin (0,0).
const gfx::Rect dip_rect = display::win::ScreenWin::ScreenToDIPRect( const gfx::Rect dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
window_info_.window, gfx::Rect(0, 0, cr.right, cr.bottom)); window_info_.window, gfx::Rect(0, 0, cr.right, cr.bottom));
// Stay on top if top-most window hosting the web view is topmost. // Stay on top if top-most window hosting the web view is topmost.

View File

@ -68,8 +68,10 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
DCHECK(widget->widget_delegate()->CanActivate()); DCHECK(widget->widget_delegate()->CanActivate());
// WidgetDelegate::DeleteDelegate() will execute the registered callback. // WidgetDelegate::DeleteDelegate() will execute the registered callback.
RegisterDeleteDelegateCallback(base::BindOnce( RegisterDeleteDelegateCallback(
&CefWindowDelegateView::DeleteDelegate, base::Unretained(this))); RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefWindowDelegateView::DeleteDelegate,
base::Unretained(this)));
} }
void CefWindowDelegateView::InitContent() { void CefWindowDelegateView::InitContent() {

View File

@ -252,7 +252,7 @@ void LoadCookies(const CefBrowserContext::Getter& browser_context_getter,
if (request.trusted_params.has_value() && if (request.trusted_params.has_value() &&
!request.trusted_params->isolation_info.IsEmpty()) { !request.trusted_params->isolation_info.IsEmpty()) {
const auto& isolation_info = request.trusted_params->isolation_info; const auto& isolation_info = request.trusted_params->isolation_info;
partition_key_collection = net::CookiePartitionKeyCollection::FromOptional( partition_key_collection = net::CookiePartitionKeyCollection(
net::CookiePartitionKey::FromNetworkIsolationKey( net::CookiePartitionKey::FromNetworkIsolationKey(
isolation_info.network_isolation_key(), request.site_for_cookies, isolation_info.network_isolation_key(), request.site_for_cookies,
net::SchemefulSite(request.url), net::SchemefulSite(request.url),

View File

@ -9,6 +9,7 @@
#include "base/notreached.h" #include "base/notreached.h"
#include "cef/libcef/browser/browser_host_base.h" #include "cef/libcef/browser/browser_host_base.h"
#include "chrome/browser/ui/permission_bubble/permission_prompt.h" #include "chrome/browser/ui/permission_bubble/permission_prompt.h"
#include "components/permissions/permission_request.h"
namespace permission_prompt { namespace permission_prompt {

View File

@ -216,8 +216,9 @@ void CefOverlayViewHost::Init(views::View* host_view,
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the // Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
// registered DeleteDelegate callback. // registered DeleteDelegate callback.
SetOwnedByWidget(true); SetOwnedByWidget(OwnedByWidgetPassKey());
RegisterDeleteDelegateCallback( RegisterDeleteDelegateCallback(
RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefOverlayViewHost::Cleanup, base::Unretained(this))); base::BindOnce(&CefOverlayViewHost::Cleanup, base::Unretained(this)));
if (window_view_->IsChromeStyle()) { if (window_view_->IsChromeStyle()) {

View File

@ -218,7 +218,7 @@ display::Display GetDisplayNearestPoint(const gfx::Point& point,
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
if (input_pixel_coords) { if (input_pixel_coords) {
find_point = gfx::ToFlooredPoint( find_point = gfx::ToFlooredPoint(
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point))); display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
} }
#endif #endif
return display::Screen::GetScreen()->GetDisplayNearestPoint(find_point); return display::Screen::GetScreen()->GetDisplayNearestPoint(find_point);
@ -230,7 +230,7 @@ display::Display GetDisplayMatchingBounds(const gfx::Rect& bounds,
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
if (input_pixel_coords) { if (input_pixel_coords) {
find_bounds = find_bounds =
display::win::ScreenWin::ScreenToDIPRect(nullptr, find_bounds); display::win::GetScreenWin()->ScreenToDIPRect(nullptr, find_bounds);
} }
#endif #endif
return display::Screen::GetScreen()->GetDisplayMatching(find_bounds); return display::Screen::GetScreen()->GetDisplayMatching(find_bounds);
@ -249,19 +249,19 @@ void ConvertPointToPixels(gfx::Point* point, float device_scale_factor) {
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
gfx::Point ConvertPointFromPixels(const gfx::Point& point) { gfx::Point ConvertPointFromPixels(const gfx::Point& point) {
return gfx::ToFlooredPoint( return gfx::ToFlooredPoint(
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point))); display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
} }
gfx::Point ConvertPointToPixels(const gfx::Point& point) { gfx::Point ConvertPointToPixels(const gfx::Point& point) {
return display::win::ScreenWin::DIPToScreenPoint(point); return display::win::GetScreenWin()->DIPToScreenPoint(point);
} }
gfx::Rect ConvertRectFromPixels(const gfx::Rect& rect) { gfx::Rect ConvertRectFromPixels(const gfx::Rect& rect) {
return display::win::ScreenWin::ScreenToDIPRect(nullptr, rect); return display::win::GetScreenWin()->ScreenToDIPRect(nullptr, rect);
} }
gfx::Rect ConvertRectToPixels(const gfx::Rect& rect) { gfx::Rect ConvertRectToPixels(const gfx::Rect& rect) {
return display::win::ScreenWin::DIPToScreenRect(nullptr, rect); return display::win::GetScreenWin()->DIPToScreenRect(nullptr, rect);
} }
#endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN)

View File

@ -110,7 +110,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
// Convert from DIP to pixel coordinates using a method that can handle // Convert from DIP to pixel coordinates using a method that can handle
// multiple displays with different DPI. // multiple displays with different DPI.
const auto screen_rect = const auto screen_rect =
display::win::ScreenWin::DIPToScreenRect(window, client_bounds); display::win::GetScreenWin()->DIPToScreenRect(window, client_bounds);
RECT rect = {screen_rect.x(), screen_rect.y(), RECT rect = {screen_rect.x(), screen_rect.y(),
screen_rect.x() + screen_rect.width(), screen_rect.x() + screen_rect.width(),
@ -123,7 +123,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
rect.right - rect.left, rect.bottom - rect.top); rect.right - rect.left, rect.bottom - rect.top);
// Convert back to DIP. // Convert back to DIP.
return display::win::ScreenWin::ScreenToDIPRect(window, pixel_rect); return display::win::GetScreenWin()->ScreenToDIPRect(window, pixel_rect);
#else #else
// Use the default implementation. // Use the default implementation.
return views::NativeFrameView::GetWindowBoundsForClientBounds( return views::NativeFrameView::GetWindowBoundsForClientBounds(
@ -420,8 +420,9 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the // Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
// registered DeleteDelegate callback. // registered DeleteDelegate callback.
SetOwnedByWidget(true); SetOwnedByWidget(OwnedByWidgetPassKey());
RegisterDeleteDelegateCallback( RegisterDeleteDelegateCallback(
RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefWindowView::DeleteDelegate, base::Unretained(this))); base::BindOnce(&CefWindowView::DeleteDelegate, base::Unretained(this)));
if (cef_delegate()) { if (cef_delegate()) {

View File

@ -208,7 +208,7 @@ CEF_EXPORT int cef_get_min_log_level() {
} }
CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N) { CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N) {
return logging::GetVlogLevelHelper(std::string_view(file_start, N)); return logging::GetVlogLevelHelper(file_start, N);
} }
CEF_EXPORT void cef_log(const char* file, CEF_EXPORT void cef_log(const char* file,

View File

@ -550,10 +550,11 @@ bool CefCrashReporterClient::ReadCrashConfigFile() {
std::unique_ptr<base::Environment> env(base::Environment::Create()); std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string val_str; std::string val_str;
if (env->GetVar("CEF_CRASH_REPORTER_SERVER_URL", &val_str)) { if (const auto& var_str = env->GetVar("CEF_CRASH_REPORTER_SERVER_URL")) {
ParseURL(val_str, &server_url_); ParseURL(val_str, &server_url_);
} }
if (env->GetVar("CEF_CRASH_REPORTER_RATE_LIMIT_ENABLED", &val_str)) { if (const auto& var_str =
env->GetVar("CEF_CRASH_REPORTER_RATE_LIMIT_ENABLED")) {
rate_limit_ = ParseBool(val_str); rate_limit_ = ParseBool(val_str);
} }
} }
@ -642,11 +643,9 @@ bool CefCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
// location to write breakpad crash dumps can be set. // location to write breakpad crash dumps can be set.
std::unique_ptr<base::Environment> env(base::Environment::Create()); std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string alternate_crash_dump_location; if (const auto& val = env->GetVar("BREAKPAD_DUMP_LOCATION")) {
if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) { base::PathService::Override(chrome::DIR_CRASH_DUMPS,
base::FilePath crash_dumps_dir_path = base::FilePath::FromUTF8Unsafe(*val));
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location);
base::PathService::Override(chrome::DIR_CRASH_DUMPS, crash_dumps_dir_path);
} }
return base::PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir); return base::PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
} }
@ -726,8 +725,7 @@ bool CefCrashReporterClient::EnableBrowserCrashForwarding() {
// storage for each key size and later substituting the actual key name during // storage for each key size and later substituting the actual key name during
// crash dump processing. // crash dump processing.
#define IDKEY(name) \ #define IDKEY(name) {name, IDKey::Tag::kArray}
{ name, IDKey::Tag::kArray }
#define IDKEY_ENTRIES(n) \ #define IDKEY_ENTRIES(n) \
IDKEY(n "-A"), IDKEY(n "-B"), IDKEY(n "-C"), IDKEY(n "-D"), IDKEY(n "-E"), \ IDKEY(n "-A"), IDKEY(n "-B"), IDKEY(n "-C"), IDKEY(n "-D"), IDKEY(n "-E"), \

View File

@ -36,9 +36,7 @@ std::string GenerateHeaders(const HeaderMap& map) {
void ParseHeaders(const std::string& header_str, HeaderMap& map) { void ParseHeaders(const std::string& header_str, HeaderMap& map) {
// Parse the request header values // Parse the request header values
for (net::HttpUtil::HeadersIterator i(header_str.begin(), header_str.end(), for (net::HttpUtil::HeadersIterator i(header_str, "\n\r"); i.GetNext();) {
"\n\r");
i.GetNext();) {
map.insert(std::make_pair(i.name(), i.values())); map.insert(std::make_pair(i.name(), i.values()));
} }
} }

View File

@ -568,8 +568,7 @@ void CefRequestImpl::Get(const cef::mojom::RequestParamsPtr& params,
CefRequest::HeaderMap headerMap; CefRequest::HeaderMap headerMap;
if (!params->headers.empty()) { if (!params->headers.empty()) {
for (net::HttpUtil::HeadersIterator i(params->headers.begin(), for (net::HttpUtil::HeadersIterator i(params->headers, "\n\r");
params->headers.end(), "\n\r");
i.GetNext();) { i.GetNext();) {
request.AddHttpHeaderField(blink::WebString::FromUTF8(i.name()), request.AddHttpHeaderField(blink::WebString::FromUTF8(i.name()),
blink::WebString::FromUTF8(i.values())); blink::WebString::FromUTF8(i.values()));

View File

@ -126,6 +126,10 @@ patches = [
# win: Delay enablement of native occlusion tracking until the initially- # win: Delay enablement of native occlusion tracking until the initially-
# minimized window is restored for the first time. # minimized window is restored for the first time.
# https://github.com/chromiumembedded/cef/issues/3638 # https://github.com/chromiumembedded/cef/issues/3638
#
# win: Don't call DwmSetWindowAttribute when the browser has an external
# parent. This call only applies for top-level windows.
# https://issuetracker.google.com/issues/41241478
'name': 'views_widget', 'name': 'views_widget',
}, },
{ {
@ -224,10 +228,6 @@ patches = [
# See related documentation in # See related documentation in
# libcef/browser/chrome/views/chrome_browser_frame.h. # libcef/browser/chrome/views/chrome_browser_frame.h.
# https://github.com/chromiumembedded/cef/issues/2969 # https://github.com/chromiumembedded/cef/issues/2969
#
# Properly disable 3-dot > "Open glic" menu item to avoid crash in
# GlicKeyedService::ToggleUI.
# https://issues.chromium.org/issues/408163318
'name': 'chrome_runtime_views', 'name': 'chrome_runtime_views',
}, },
{ {
@ -354,7 +354,8 @@ patches = [
'name': 'embedder_product_override', 'name': 'embedder_product_override',
}, },
{ {
# Fix Jumbo/component build dependency issue. # Fix component build dependency issue.
# https://issues.chromium.org/issues/414506471
'name': 'chrome_browser_safe_browsing', 'name': 'chrome_browser_safe_browsing',
}, },
{ {
@ -632,6 +633,9 @@ patches = [
}, },
{ {
# Create top-level widget type when Widget::InitParams::child is false. # Create top-level widget type when Widget::InitParams::child is false.
#
# Allow access to deprecated "owned by widget" model.
# https://github.com/chromiumembedded/cef/issues/3924
'name': 'ui_views_widget_type' 'name': 'ui_views_widget_type'
}, },
{ {
@ -788,10 +792,5 @@ patches = [
# builds. # builds.
# https://github.com/chromiumembedded/cef/issues/3892 # https://github.com/chromiumembedded/cef/issues/3892
'name': 'config_3892' 'name': 'config_3892'
},
{
# Fix DCHECK_EQ in SchemefulSite with custom standard schemes.
# https://issues.chromium.org/issues/408329644
'name': 'net_schemeful_site_408329644'
} }
] ]

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn diff --git base/BUILD.gn base/BUILD.gn
index 50893c5653a42..75dd03c3df9a8 100644 index 59721ed3c9e26..c0ee7567a534c 100644
--- base/BUILD.gn --- base/BUILD.gn
+++ base/BUILD.gn +++ base/BUILD.gn
@@ -41,6 +41,7 @@ import("//build/rust/rust_static_library.gni") @@ -41,6 +41,7 @@ import("//build/rust/rust_static_library.gni")
@ -10,8 +10,8 @@ index 50893c5653a42..75dd03c3df9a8 100644
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
@@ -1518,7 +1519,13 @@ component("base") { @@ -1531,7 +1532,13 @@ component("base") {
"hash/md5_constexpr_internal.h", "hash/md5.h",
"hash/sha1.h", "hash/sha1.h",
] ]
- if (is_nacl) { - if (is_nacl) {
@ -25,7 +25,7 @@ index 50893c5653a42..75dd03c3df9a8 100644
sources += [ sources += [
"hash/md5_nacl.cc", "hash/md5_nacl.cc",
"hash/md5_nacl.h", "hash/md5_nacl.h",
@@ -1968,6 +1975,12 @@ component("base") { @@ -1982,6 +1989,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
} }
@ -60,7 +60,7 @@ index f680f63cffc5b..9cb615bbc8a5a 100644
auto const was_set = is_initialized_check_flag_.test_and_set(); auto const was_set = is_initialized_check_flag_.test_and_set();
is_initialized_check_flag_.clear(); is_initialized_check_flag_.clear();
diff --git base/hash/md5.h base/hash/md5.h diff --git base/hash/md5.h base/hash/md5.h
index 215d636fec275..922e88f31b999 100644 index 4d358570d81c5..09bf13a965541 100644
--- base/hash/md5.h --- base/hash/md5.h
+++ base/hash/md5.h +++ base/hash/md5.h
@@ -11,8 +11,9 @@ @@ -11,8 +11,9 @@
@ -90,7 +90,7 @@ index 2158b648ca58a..8a8cb13b2fd74 100644
#else #else
#include "base/hash/sha1_boringssl.h" #include "base/hash/sha1_boringssl.h"
diff --git base/json/json_reader.cc base/json/json_reader.cc diff --git base/json/json_reader.cc base/json/json_reader.cc
index 48a9b893d3f9d..a5a2223b2a0fa 100644 index f32622d353f1d..def35a3ae1c5c 100644
--- base/json/json_reader.cc --- base/json/json_reader.cc
+++ base/json/json_reader.cc +++ base/json/json_reader.cc
@@ -12,8 +12,9 @@ @@ -12,8 +12,9 @@
@ -113,7 +113,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
namespace { namespace {
const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime"; const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime";
@@ -138,7 +139,7 @@ namespace base { @@ -137,7 +138,7 @@ namespace base {
std::optional<Value> JSONReader::Read(std::string_view json, std::optional<Value> JSONReader::Read(std::string_view json,
int options, int options,
size_t max_depth) { size_t max_depth) {
@ -122,7 +122,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
internal::JSONParser parser(options, max_depth); internal::JSONParser parser(options, max_depth);
return parser.Parse(json); return parser.Parse(json);
#else // BUILDFLAG(IS_NACL) #else // BUILDFLAG(IS_NACL)
@@ -183,7 +184,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json, @@ -182,7 +183,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json,
JSONReader::Result JSONReader::ReadAndReturnValueWithError( JSONReader::Result JSONReader::ReadAndReturnValueWithError(
std::string_view json, std::string_view json,
int options) { int options) {
@ -131,7 +131,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
internal::JSONParser parser(options); internal::JSONParser parser(options);
auto value = parser.Parse(json); auto value = parser.Parse(json);
if (!value) { if (!value) {
@@ -224,7 +225,7 @@ bool JSONReader::UsingRust() { @@ -223,7 +224,7 @@ bool JSONReader::UsingRust() {
if (!base::FeatureList::GetInstance()) { if (!base::FeatureList::GetInstance()) {
return false; return false;
} }
@ -141,7 +141,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
#else #else
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser); return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
diff --git base/logging.cc base/logging.cc diff --git base/logging.cc base/logging.cc
index 22aa478001fb5..e799d8da52589 100644 index 26ba1a286e451..99b2ce6feb274 100644
--- base/logging.cc --- base/logging.cc
+++ base/logging.cc +++ base/logging.cc
@@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
@ -152,7 +152,7 @@ index 22aa478001fb5..e799d8da52589 100644
#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h" #include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h" #include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
@@ -538,7 +539,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) { @@ -530,7 +531,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
} }
#endif #endif

View File

@ -1,10 +1,10 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn diff --git base/test/BUILD.gn base/test/BUILD.gn
index 5beef03e5fd94..0b12fd3afc8fc 100644 index e7f8b523e899a..234e5e0e3a2e3 100644
--- base/test/BUILD.gn --- base/test/BUILD.gn
+++ base/test/BUILD.gn +++ base/test/BUILD.gn
@@ -212,11 +212,6 @@ static_library("test_support") { @@ -216,11 +216,6 @@ static_library("test_support") {
# that would require special support in gn2bp (AOSP Cronet).
if (enable_base_tracing) { if (enable_base_tracing && !is_cronet_build) {
public_deps += [ "//third_party/perfetto:perfetto_test_support" ] public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
- public_deps += [ ":test_trace_processor" ] - public_deps += [ ":test_trace_processor" ]
- sources += [ - sources += [
@ -14,7 +14,7 @@ index 5beef03e5fd94..0b12fd3afc8fc 100644
deps += [ deps += [
":amalgamated_perfetto_sql_stdlib", ":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor", ":gen_cc_chrome_track_event_descriptor",
@@ -611,7 +606,7 @@ if (enable_base_tracing) { @@ -616,7 +611,7 @@ if (enable_base_tracing) {
# processor depends on dev_sqlite. The two share the same symbols but have # 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 # different implementations, so we need to hide dev_sqlite in this shared
# library even in non-component builds to prevent duplicate symbols. # library even in non-component builds to prevent duplicate symbols.
@ -23,7 +23,7 @@ index 5beef03e5fd94..0b12fd3afc8fc 100644
if (is_ios) { if (is_ios) {
_target_type = "ios_framework_bundle" _target_type = "ios_framework_bundle"
} }
@@ -620,6 +615,8 @@ if (enable_base_tracing) { @@ -625,6 +620,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ] defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true testonly = true
sources = [ sources = [
@ -32,7 +32,7 @@ index 5beef03e5fd94..0b12fd3afc8fc 100644
"test_trace_processor_export.h", "test_trace_processor_export.h",
"test_trace_processor_impl.cc", "test_trace_processor_impl.cc",
"test_trace_processor_impl.h", "test_trace_processor_impl.h",
@@ -637,33 +634,6 @@ if (enable_base_tracing) { @@ -642,33 +639,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor" output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ] bundle_deps_filter = [ "//third_party/icu:icudata" ]
} }
@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+ +
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_ #endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index f4288459097cd..c48696020414c 100644 index 205af82b45ce2..5944a9aa253f2 100644
--- content/shell/BUILD.gn --- content/shell/BUILD.gn
+++ content/shell/BUILD.gn +++ content/shell/BUILD.gn
@@ -926,7 +926,6 @@ if (is_mac) { @@ -936,7 +936,6 @@ if (is_mac) {
# Specify a sensible install_name for static builds. The library is # Specify a sensible install_name for static builds. The library is
# dlopen()ed so this is not used to resolve the module. # dlopen()ed so this is not used to resolve the module.
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 1547a5ee8178c..e3bc0e82b1c66 100644 index 5fef13808a906..57f16de69e1c7 100644
--- third_party/blink/public/web/web_element.h --- third_party/blink/public/web/web_element.h
+++ 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 { @@ -83,6 +83,9 @@ class BLINK_EXPORT WebElement : public WebNode {
WebString TextContent() const; WebString TextContent() const;
WebString TextContentAbridged(unsigned int max_length) const; WebString TextContentAbridged(unsigned int max_length) const;
WebString InnerHTML() const; WebString InnerHTML() const;
@ -10,13 +10,13 @@ index 1547a5ee8178c..e3bc0e82b1c66 100644
+ WebString AttributeValue(unsigned index) const; + WebString AttributeValue(unsigned index) const;
+ unsigned AttributeCount() const; + unsigned AttributeCount() const;
// Returns true if the element's computed writing suggestions value is true. void Focus();
// https://html.spec.whatwg.org/#writing-suggestions:computed-writing-suggestions-value
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
index 8baa5193bfbe0..98c3b930a0498 100644 index 2ec717ac9c654..85fb4e44aa4a0 100644
--- third_party/blink/renderer/core/exported/web_element.cc --- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc +++ third_party/blink/renderer/core/exported/web_element.cc
@@ -119,6 +119,24 @@ void WebElement::SetAttribute(const WebString& attr_name, @@ -122,6 +122,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
IGNORE_EXCEPTION_FOR_TESTING); IGNORE_EXCEPTION_FOR_TESTING);
} }

View File

@ -20,10 +20,10 @@ index 53a73d6c75b7a..05290de4c03a0 100644
// Make an exception to allow most visited tiles to commit in third-party // Make an exception to allow most visited tiles to commit in third-party
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index 29740121f1371..97e4e6b0bcd29 100644 index 4c78563c29ce9..029b8c5c30ef4 100644
--- content/browser/renderer_host/navigation_request.cc --- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc
@@ -8499,10 +8499,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( @@ -8557,10 +8557,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin = bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin; network::mojom::WebSandboxFlags::kOrigin;
@ -47,7 +47,7 @@ index 29740121f1371..97e4e6b0bcd29 100644
} }
return origin_and_debug_info; return origin_and_debug_info;
@@ -8610,11 +8622,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { @@ -8668,11 +8680,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh, DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host())); frame_tree_node_->current_frame_host()));

View File

@ -1,5 +1,5 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index e7a60d56b5425..e9a4a4eb91ce8 100644 index e579cc9a9d1fd..73f42525d0071 100644
--- build/config/compiler/BUILD.gn --- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn
@@ -131,6 +131,9 @@ declare_args() { @@ -131,6 +131,9 @@ declare_args() {
@ -12,7 +12,7 @@ index e7a60d56b5425..e9a4a4eb91ce8 100644
# Initialize all local variables with a pattern. This flag will fill # Initialize all local variables with a pattern. This flag will fill
# uninitialized floating-point types (and 32-bit pointers) with 0xFF and the # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
# rest with 0xAA. This makes behavior of uninitialized memory bugs consistent, # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
@@ -2326,6 +2329,7 @@ config("export_dynamic") { @@ -2387,6 +2390,7 @@ config("export_dynamic") {
# 2. Remove the thin_archive config, so that the .a file actually contains all # 2. Remove the thin_archive config, so that the .a file actually contains all
# .o files, instead of just references to .o files in the build directoy # .o files, instead of just references to .o files in the build directoy
config("thin_archive") { config("thin_archive") {
@ -20,7 +20,7 @@ index e7a60d56b5425..e9a4a4eb91ce8 100644
if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") { if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") {
# The macOS and iOS linker ld64.ldd doesn't support thin archive without # The macOS and iOS linker ld64.ldd doesn't support thin archive without
# symbol table, gcc on linux also throws the error `archive has no index`. # symbol table, gcc on linux also throws the error `archive has no index`.
@@ -2344,6 +2348,7 @@ config("thin_archive") { @@ -2405,6 +2409,7 @@ config("thin_archive") {
} else if (is_win && use_lld) { } else if (is_win && use_lld) {
arflags = [ "/llvmlibthin" ] arflags = [ "/llvmlibthin" ]
} }

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 5186cdf0bcf3b..deb65db4ed097 100644 index ad39862fdd9a5..c0f75004f4fc4 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@ -10,7 +10,7 @@ index 5186cdf0bcf3b..deb65db4ed097 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/browser/request_header_integrity/buildflags.gni") import("//chrome/browser/request_header_integrity/buildflags.gni")
@@ -1876,6 +1877,7 @@ static_library("browser") { @@ -1879,6 +1880,7 @@ static_library("browser") {
"//build/config/compiler:compiler_buildflags", "//build/config/compiler:compiler_buildflags",
"//build/config/linux/dbus:buildflags", "//build/config/linux/dbus:buildflags",
"//cc", "//cc",
@ -18,7 +18,7 @@ index 5186cdf0bcf3b..deb65db4ed097 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -2575,6 +2577,10 @@ static_library("browser") { @@ -2583,6 +2585,10 @@ static_library("browser") {
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ] sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
} }

View File

@ -13,10 +13,10 @@ index 7603c2662b8dc..9a38d816bdc40 100644
return false; return false;
} }
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index 8e0717f34f37f..df852d4b2e69f 100644 index 720839ed7b796..0d14fe57d841d 100644
--- chrome/browser/devtools/devtools_window.cc --- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc
@@ -38,6 +38,7 @@ @@ -39,6 +39,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/task_manager/web_contents_tags.h" #include "chrome/browser/task_manager/web_contents_tags.h"
@ -24,7 +24,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
#include "chrome/browser/ui/prefs/prefs_tab_helper.h" #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/tabs/tab_strip_user_gesture_details.h" #include "chrome/browser/ui/tabs/tab_strip_user_gesture_details.h"
@@ -1205,6 +1206,13 @@ DevToolsWindow* DevToolsWindow::Create( @@ -1206,6 +1207,13 @@ DevToolsWindow* DevToolsWindow::Create(
if (!browser || !browser->is_type_normal()) { if (!browser || !browser->is_type_normal()) {
can_dock = false; can_dock = false;
} }
@ -38,7 +38,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
} }
#endif #endif
@@ -1646,7 +1654,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { @@ -1647,7 +1655,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
/*navigation_handle_callback=*/{})) { /*navigation_handle_callback=*/{})) {
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
NOTIMPLEMENTED(); NOTIMPLEMENTED();
@ -49,7 +49,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
chrome::ScopedTabbedBrowserDisplayer displayer(profile_); chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url, chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url,
ui::PAGE_TRANSITION_LINK); ui::PAGE_TRANSITION_LINK);
@@ -1827,12 +1837,26 @@ void DevToolsWindow::CreateDevToolsBrowser() { @@ -1828,12 +1838,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) { Browser::CreationStatus::kOk) {
return; return;
} }
@ -83,7 +83,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
OverrideAndSyncDevToolsRendererPrefs(); OverrideAndSyncDevToolsRendererPrefs();
} }
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 51c55cb054ae7..df9aa9bc45a67 100644 index b24f97d12db79..55ed091b2c91c 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn
@@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni") @@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni")
@ -94,7 +94,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni") import("//chromeos/ash/components/assistant/assistant.gni")
@@ -302,6 +303,10 @@ static_library("ui") { @@ -303,6 +304,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wexit_time_destructors",
] ]
@ -105,7 +105,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
public_deps = [ public_deps = [
# WARNING WARNING WARNING # WARNING WARNING WARNING
# New dependencies outside of //chrome/browser should be added to # New dependencies outside of //chrome/browser should be added to
@@ -329,6 +334,7 @@ static_library("ui") { @@ -330,6 +335,7 @@ static_library("ui") {
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//build/config/linux/dbus:buildflags", "//build/config/linux/dbus:buildflags",
"//cc/paint", "//cc/paint",
@ -113,7 +113,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
@@ -701,6 +707,13 @@ static_library("ui") { @@ -707,6 +713,13 @@ static_library("ui") {
deps += [ "//components/plus_addresses/resources:vector_icons" ] deps += [ "//components/plus_addresses/resources:vector_icons" ]
} }
@ -127,7 +127,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
# TODO(crbug.com/41437292): Remove this circular dependency. # TODO(crbug.com/41437292): Remove this circular dependency.
# Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies". # Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies".
# These are all-platform circular includes. # These are all-platform circular includes.
@@ -5501,6 +5514,7 @@ static_library("ui") { @@ -5539,6 +5552,7 @@ static_library("ui") {
if (enable_printing) { if (enable_printing) {
deps += [ deps += [
"//components/printing/browser", "//components/printing/browser",
@ -136,10 +136,10 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
] ]
} }
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index d45f8f1713c87..de476f1ed4081 100644 index 435235c067f70..63d2b0381c277 100644
--- chrome/browser/ui/browser.cc --- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc
@@ -272,6 +272,25 @@ @@ -273,6 +273,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h" #include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif #endif
@ -165,7 +165,7 @@ index d45f8f1713c87..de476f1ed4081 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h" #include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif #endif
@@ -571,6 +590,10 @@ Browser::Browser(const CreateParams& params) @@ -572,6 +591,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type), type_(params.type),
profile_(params.profile), profile_(params.profile),
window_(nullptr), window_(nullptr),
@ -176,7 +176,7 @@ index d45f8f1713c87..de476f1ed4081 100644
tab_strip_model_delegate_( tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)), std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>( tab_strip_model_(std::make_unique<TabStripModel>(
@@ -818,6 +841,12 @@ Browser::~Browser() { @@ -819,6 +842,12 @@ Browser::~Browser() {
if (select_file_dialog_.get()) { if (select_file_dialog_.get()) {
select_file_dialog_->ListenerDestroyed(); select_file_dialog_->ListenerDestroyed();
} }
@ -189,7 +189,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@@ -1275,6 +1304,10 @@ BrowserWindowInterface::Type Browser::GetType() const { @@ -1284,6 +1313,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
return type_; return type_;
} }
@ -200,7 +200,7 @@ index d45f8f1713c87..de476f1ed4081 100644
BrowserUserEducationInterface* Browser::GetUserEducationInterface() { BrowserUserEducationInterface* Browser::GetUserEducationInterface() {
return window(); return window();
} }
@@ -1436,6 +1469,8 @@ void Browser::WindowFullscreenStateChanged() { @@ -1466,6 +1499,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged(); ->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged(); command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@ -209,7 +209,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
void Browser::FullscreenTopUIStateChanged() { void Browser::FullscreenTopUIStateChanged() {
@@ -1807,6 +1842,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( @@ -1837,6 +1872,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
return content::KeyboardEventProcessingResult::HANDLED; return content::KeyboardEventProcessingResult::HANDLED;
} }
@ -225,7 +225,7 @@ index d45f8f1713c87..de476f1ed4081 100644
return window()->PreHandleKeyboardEvent(event); return window()->PreHandleKeyboardEvent(event);
} }
@@ -1814,8 +1858,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, @@ -1844,8 +1888,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) { const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window = DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source); DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -246,7 +246,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
bool Browser::TabsNeedBeforeUnloadFired() const { bool Browser::TabsNeedBeforeUnloadFired() const {
@@ -1910,9 +1964,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) { @@ -1940,9 +1994,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
content::PreloadingEligibility Browser::IsPrerender2Supported( content::PreloadingEligibility Browser::IsPrerender2Supported(
content::WebContents& web_contents, content::WebContents& web_contents,
content::PreloadingTriggerType trigger_type) { content::PreloadingTriggerType trigger_type) {
@ -261,7 +261,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) { bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
@@ -1975,6 +2034,14 @@ WebContents* Browser::OpenURLFromTab( @@ -2005,6 +2064,14 @@ WebContents* Browser::OpenURLFromTab(
std::move(navigation_handle_callback)); std::move(navigation_handle_callback));
} }
@ -276,7 +276,7 @@ index d45f8f1713c87..de476f1ed4081 100644
NavigateParams nav_params(this, params.url, params.transition); NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source; nav_params.source_contents = source;
@@ -2148,6 +2215,8 @@ void Browser::LoadingStateChanged(WebContents* source, @@ -2178,6 +2245,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) { bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -285,7 +285,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
void Browser::CloseContents(WebContents* source) { void Browser::CloseContents(WebContents* source) {
@@ -2157,6 +2226,13 @@ void Browser::CloseContents(WebContents* source) { @@ -2187,6 +2256,13 @@ void Browser::CloseContents(WebContents* source) {
} }
void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@ -299,7 +299,7 @@ index d45f8f1713c87..de476f1ed4081 100644
if (is_type_normal()) { if (is_type_normal()) {
return; return;
} }
@@ -2177,6 +2253,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { @@ -2207,6 +2283,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
} }
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -308,7 +308,7 @@ index d45f8f1713c87..de476f1ed4081 100644
std::vector<StatusBubble*> status_bubbles = GetStatusBubbles(); std::vector<StatusBubble*> status_bubbles = GetStatusBubbles();
for (StatusBubble* status_bubble : status_bubbles) { for (StatusBubble* status_bubble : status_bubbles) {
StatusBubbleViews* status_bubble_views = StatusBubbleViews* status_bubble_views =
@@ -2190,6 +2268,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -2220,6 +2298,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
} }
} }
@ -326,7 +326,7 @@ index d45f8f1713c87..de476f1ed4081 100644
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) { void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
const ui::EventType type = event.type(); const ui::EventType type = event.type();
const bool exited = type == ui::EventType::kMouseExited; const bool exited = type == ui::EventType::kMouseExited;
@@ -2223,9 +2312,23 @@ void Browser::ContentsZoomChange(bool zoom_in) { @@ -2253,9 +2342,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
} }
bool Browser::TakeFocus(content::WebContents* source, bool reverse) { bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@ -350,7 +350,7 @@ index d45f8f1713c87..de476f1ed4081 100644
void Browser::BeforeUnloadFired(WebContents* web_contents, void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) { bool* proceed_to_fire_unload) {
@@ -2338,12 +2441,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, @@ -2372,12 +2475,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// to track `new_contents` after it is added to its TabModel this override can // to track `new_contents` after it is added to its TabModel this override can
// be removed. // be removed.
CreateSessionServiceTabHelper(new_contents); CreateSessionServiceTabHelper(new_contents);
@ -375,7 +375,7 @@ index d45f8f1713c87..de476f1ed4081 100644
// Don't show the page hung dialog when a HTML popup hangs because // Don't show the page hung dialog when a HTML popup hangs because
// the dialog will take the focus and immediately close the popup. // the dialog will take the focus and immediately close the popup.
RenderWidgetHostView* view = render_widget_host->GetView(); RenderWidgetHostView* view = render_widget_host->GetView();
@@ -2356,6 +2471,13 @@ void Browser::RendererUnresponsive( @@ -2390,6 +2505,13 @@ void Browser::RendererUnresponsive(
void Browser::RendererResponsive( void Browser::RendererResponsive(
WebContents* source, WebContents* source,
content::RenderWidgetHost* render_widget_host) { content::RenderWidgetHost* render_widget_host) {
@ -389,7 +389,7 @@ index d45f8f1713c87..de476f1ed4081 100644
RenderWidgetHostView* view = render_widget_host->GetView(); RenderWidgetHostView* view = render_widget_host->GetView();
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) { if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
TabDialogs::FromWebContents(source)->HideHungRendererDialog( TabDialogs::FromWebContents(source)->HideHungRendererDialog(
@@ -2365,6 +2487,15 @@ void Browser::RendererResponsive( @@ -2399,6 +2521,15 @@ void Browser::RendererResponsive(
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
WebContents* source) { WebContents* source) {
@ -405,7 +405,7 @@ index d45f8f1713c87..de476f1ed4081 100644
return javascript_dialogs::TabModalDialogManager::FromWebContents(source); return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
} }
@@ -2400,6 +2531,11 @@ void Browser::DraggableRegionsChanged( @@ -2434,6 +2565,11 @@ void Browser::DraggableRegionsChanged(
if (app_controller_) { if (app_controller_) {
app_controller_->DraggableRegionsChanged(regions, contents); app_controller_->DraggableRegionsChanged(regions, contents);
} }
@ -417,7 +417,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
std::vector<blink::mojom::RelatedApplicationPtr> std::vector<blink::mojom::RelatedApplicationPtr>
@@ -2514,11 +2650,15 @@ void Browser::EnterFullscreenModeForTab( @@ -2548,11 +2684,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) { const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id); requesting_frame, options.display_id);
@ -433,7 +433,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2728,6 +2868,16 @@ void Browser::RequestMediaAccessPermission( @@ -2762,6 +2902,16 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents, content::WebContents* web_contents,
const content::MediaStreamRequest& request, const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) { content::MediaResponseCallback callback) {
@ -450,7 +450,7 @@ index d45f8f1713c87..de476f1ed4081 100644
const extensions::Extension* extension = const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin); GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -3313,9 +3463,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { @@ -3352,9 +3502,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private): // Browser, Getters for UI (private):
std::vector<StatusBubble*> Browser::GetStatusBubbles() { std::vector<StatusBubble*> Browser::GetStatusBubbles() {
@ -463,7 +463,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
// We hide the status bar for web apps windows as this matches native // We hide the status bar for web apps windows as this matches native
@@ -3323,6 +3475,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() { @@ -3362,6 +3514,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() {
// mode, as the minimal browser UI includes the status bar. // mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) && if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) { !app_controller()->HasMinimalUiButtons()) {
@ -476,7 +476,7 @@ index d45f8f1713c87..de476f1ed4081 100644
return {}; return {};
} }
@@ -3476,6 +3634,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { @@ -3515,6 +3673,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents); web_contents_collection_.StopObserving(web_contents);
} }
@ -485,7 +485,7 @@ index d45f8f1713c87..de476f1ed4081 100644
} }
void Browser::TabDetachedAtImpl(content::WebContents* contents, void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3637,6 +3797,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( @@ -3676,6 +3836,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const { bool check_can_support) const {
@ -501,7 +501,7 @@ index d45f8f1713c87..de476f1ed4081 100644
case TYPE_NORMAL: case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support); return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index ce1e404e45a60..7193496de6b31 100644 index c4cea0b6e8c4c..2beda8338cb08 100644
--- chrome/browser/ui/browser.h --- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
@ -566,7 +566,7 @@ index ce1e404e45a60..7193496de6b31 100644
// Get the FindBarController for this browser, creating it if it does not // Get the FindBarController for this browser, creating it if it does not
// yet exist. // yet exist.
FindBarController* GetFindBarController(); FindBarController* GetFindBarController();
@@ -889,6 +916,7 @@ class Browser : public TabStripModelObserver, @@ -891,6 +918,7 @@ class Browser : public TabStripModelObserver,
ImmersiveModeController* GetImmersiveModeController() override; ImmersiveModeController* GetImmersiveModeController() override;
BrowserActions* GetActions() override; BrowserActions* GetActions() override;
Type GetType() const override; Type GetType() const override;
@ -574,7 +574,7 @@ index ce1e404e45a60..7193496de6b31 100644
BrowserUserEducationInterface* GetUserEducationInterface() override; BrowserUserEducationInterface* GetUserEducationInterface() override;
web_app::AppBrowserController* GetAppBrowserController() override; web_app::AppBrowserController* GetAppBrowserController() override;
std::vector<tabs::TabInterface*> GetAllTabInterfaces() override; std::vector<tabs::TabInterface*> GetAllTabInterfaces() override;
@@ -991,10 +1019,18 @@ class Browser : public TabStripModelObserver, @@ -1012,10 +1040,18 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source, void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override; const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -593,7 +593,7 @@ index ce1e404e45a60..7193496de6b31 100644
void BeforeUnloadFired(content::WebContents* source, void BeforeUnloadFired(content::WebContents* source,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) override; bool* proceed_to_fire_unload) override;
@@ -1341,6 +1377,10 @@ class Browser : public TabStripModelObserver, @@ -1362,6 +1398,10 @@ class Browser : public TabStripModelObserver,
// The active state of this browser. // The active state of this browser.
bool is_active_ = false; bool is_active_ = false;
@ -604,7 +604,7 @@ index ce1e404e45a60..7193496de6b31 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_; std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_; std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1407,6 +1447,8 @@ class Browser : public TabStripModelObserver, @@ -1428,6 +1468,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_; const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_; bool initial_visible_on_all_workspaces_state_;
@ -614,10 +614,10 @@ index ce1e404e45a60..7193496de6b31 100644
UnloadController unload_controller_; UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index cefd4bc59943a..69425ab604ddb 100644 index 474e4ba66d7af..ca68cd989693e 100644
--- chrome/browser/ui/browser_navigator.cc --- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc
@@ -260,6 +260,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition( @@ -255,6 +255,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
browser_params.pip_options = pip_options; browser_params.pip_options = pip_options;
@ -628,7 +628,7 @@ index cefd4bc59943a..69425ab604ddb 100644
const BrowserWindow* const browser_window = params.browser->window(); const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window = const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow() browser_window ? browser_window->GetNativeWindow()
@@ -547,7 +551,17 @@ std::unique_ptr<content::WebContents> CreateTargetContents( @@ -543,7 +547,17 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
} }
#endif #endif
@ -684,10 +684,10 @@ index 83a510defbda5..f4305701c5f5a 100644
params.source_contents = source_contents; params.source_contents = source_contents;
params.url = target_url; params.url = target_url;
diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc
index 274b403d01d91..4dd3239bf5f48 100644 index 7b158e39c965a..dc4d385a2c1a9 100644
--- chrome/browser/ui/browser_window/browser_window_features.cc --- chrome/browser/ui/browser_window/browser_window_features.cc
+++ chrome/browser/ui/browser_window/browser_window_features.cc +++ chrome/browser/ui/browser_window/browser_window_features.cc
@@ -92,6 +92,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() { @@ -100,6 +100,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
BrowserWindowFeatures::~BrowserWindowFeatures() = default; BrowserWindowFeatures::~BrowserWindowFeatures() = default;
@ -703,7 +703,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
// static // static
void BrowserWindowFeatures::ReplaceBrowserWindowFeaturesForTesting( void BrowserWindowFeatures::ReplaceBrowserWindowFeaturesForTesting(
BrowserWindowFeaturesFactory factory) { BrowserWindowFeaturesFactory factory) {
@@ -168,10 +177,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) { @@ -190,10 +199,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
} }
void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) { void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
@ -717,7 +717,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
if (IsChromeLabsEnabled()) { if (IsChromeLabsEnabled()) {
chrome_labs_coordinator_ = chrome_labs_coordinator_ =
std::make_unique<ChromeLabsCoordinator>(browser); std::make_unique<ChromeLabsCoordinator>(browser);
@@ -213,7 +224,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) { @@ -235,7 +246,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
} }
} }
@ -726,7 +726,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
base::FeatureList::IsEnabled(toast_features::kToastFramework)) { base::FeatureList::IsEnabled(toast_features::kToastFramework)) {
toast_service_ = std::make_unique<ToastService>(browser); toast_service_ = std::make_unique<ToastService>(browser);
} }
@@ -251,10 +262,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction( @@ -277,10 +288,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
browser_view->browser(), browser_view->browser(),
side_panel_coordinator_->GetWindowRegistry()); side_panel_coordinator_->GetWindowRegistry());
@ -741,10 +741,10 @@ index 274b403d01d91..4dd3239bf5f48 100644
if (glic::GlicEnabling::IsProfileEligible( if (glic::GlicEnabling::IsProfileEligible(
browser_view->browser()->profile())) { browser_view->browser()->profile())) {
diff --git chrome/browser/ui/browser_window/public/browser_window_features.h chrome/browser/ui/browser_window/public/browser_window_features.h diff --git chrome/browser/ui/browser_window/public/browser_window_features.h chrome/browser/ui/browser_window/public/browser_window_features.h
index a318b2507f3ca..04bed96bbe382 100644 index 5ba81ee463c84..c56a89c8d1911 100644
--- chrome/browser/ui/browser_window/public/browser_window_features.h --- chrome/browser/ui/browser_window/public/browser_window_features.h
+++ chrome/browser/ui/browser_window/public/browser_window_features.h +++ chrome/browser/ui/browser_window/public/browser_window_features.h
@@ -81,6 +81,8 @@ class BrowserWindowFeatures { @@ -91,6 +91,8 @@ class BrowserWindowFeatures {
static std::unique_ptr<BrowserWindowFeatures> CreateBrowserWindowFeatures(); static std::unique_ptr<BrowserWindowFeatures> CreateBrowserWindowFeatures();
virtual ~BrowserWindowFeatures(); virtual ~BrowserWindowFeatures();
@ -754,10 +754,10 @@ index a318b2507f3ca..04bed96bbe382 100644
BrowserWindowFeatures& operator=(const BrowserWindowFeatures&) = delete; BrowserWindowFeatures& operator=(const BrowserWindowFeatures&) = delete;
diff --git chrome/browser/ui/browser_window/public/browser_window_interface.h chrome/browser/ui/browser_window/public/browser_window_interface.h diff --git chrome/browser/ui/browser_window/public/browser_window_interface.h chrome/browser/ui/browser_window/public/browser_window_interface.h
index f2b51e7923e96..644d0655ea6c9 100644 index d1862cd7b90b2..fcaa4b4ac3ade 100644
--- chrome/browser/ui/browser_window/public/browser_window_interface.h --- chrome/browser/ui/browser_window/public/browser_window_interface.h
+++ chrome/browser/ui/browser_window/public/browser_window_interface.h +++ chrome/browser/ui/browser_window/public/browser_window_interface.h
@@ -196,6 +196,10 @@ class BrowserWindowInterface : public content::PageNavigator { @@ -211,6 +211,10 @@ class BrowserWindowInterface : public content::PageNavigator {
}; };
virtual Type GetType() const = 0; virtual Type GetType() const = 0;
@ -769,7 +769,7 @@ index f2b51e7923e96..644d0655ea6c9 100644
// user education. The remainder of functionality is provided directly by the // user education. The remainder of functionality is provided directly by the
// UserEducationService, which can be retrieved directly from the profile. // UserEducationService, which can be retrieved directly from the profile.
diff --git chrome/browser/ui/views/frame/tab_strip_region_view.cc chrome/browser/ui/views/frame/tab_strip_region_view.cc diff --git chrome/browser/ui/views/frame/tab_strip_region_view.cc chrome/browser/ui/views/frame/tab_strip_region_view.cc
index b0a946ad9168f..0f7daf3eb0255 100644 index cd93e66f918eb..dda28d11241d7 100644
--- chrome/browser/ui/views/frame/tab_strip_region_view.cc --- chrome/browser/ui/views/frame/tab_strip_region_view.cc
+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc +++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -118,8 +118,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip) @@ -118,8 +118,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)

View File

@ -1,5 +1,5 @@
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index 0897668803c2e..12cdbd7642ffd 100644 index 2394aeb4fb33e..7f27b04a0dc50 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc --- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -146,7 +146,7 @@ ContentSetting GetContentSettingFromRules( @@ -146,7 +146,7 @@ ContentSetting GetContentSettingFromRules(

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 60543740c1b66..0f76b20df356a 100644 index a333dcbe56bd2..cf34318b16f04 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc --- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -351,6 +351,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() { @@ -351,6 +351,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@ -60,7 +60,7 @@ index 60543740c1b66..0f76b20df356a 100644
} }
Profile* RenderViewContextMenu::GetProfile() const { Profile* RenderViewContextMenu::GetProfile() const {
@@ -3643,6 +3673,26 @@ void RenderViewContextMenu::RemoveObserverForTesting( @@ -3648,6 +3678,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
} }

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc diff --git chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
index 8b3ce4e53ef25..7fcec86f074e3 100644 index 8c06a19a64e5d..2b9429f7b2bab 100644
--- chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc --- chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
+++ chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc +++ chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -57,7 +57,7 @@ index 8b3ce4e53ef25..7fcec86f074e3 100644
} }
diff --git chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc diff --git chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
index 3c56e658d05c4..980caca1469bd 100644 index e0c7c6df6f415..171f042d712e4 100644
--- chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc --- chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
+++ chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc +++ chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
@@ -79,10 +79,13 @@ JavaScriptTabModalDialogViewViews::JavaScriptTabModalDialogViewViews( @@ -79,10 +79,13 @@ JavaScriptTabModalDialogViewViews::JavaScriptTabModalDialogViewViews(

View File

@ -12,7 +12,7 @@ index cc58a303a78b6..7755e58c8651c 100644
// on the screen, we can't actually attach to it. // on the screen, we can't actually attach to it.
parent_window = nullptr; parent_window = nullptr;
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
index 8251a54246126..ebf7da47ed642 100644 index 6e91ffc4b8bfe..a1616f77c87ae 100644
--- components/constrained_window/constrained_window_views.cc --- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc
@@ -103,10 +103,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver { @@ -103,10 +103,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
@ -121,7 +121,28 @@ index 8251a54246126..ebf7da47ed642 100644
return; return;
} }
@@ -304,8 +299,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, @@ -197,11 +192,18 @@ class BrowserModalHelper {
public:
static views::Widget* Show(std::unique_ptr<ui::DialogModel> dialog_model,
gfx::NativeWindow parent) {
+ gfx::NativeView parent_view =
+ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) :
+ gfx::NativeView();
+ // Use with CEF windowless rendering.
+ gfx::AcceleratedWidget parent_widget =
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
+ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget;
+
// TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame
// dialogs support autosize.
bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame(
- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
- : gfx::NativeView());
+ parent_view, parent_widget);
auto dialog = views::BubbleDialogModelHost::CreateModal(
std::move(dialog_model), ui::mojom::ModalType::kWindow,
will_use_custom_frame);
@@ -326,8 +328,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view = gfx::NativeView parent_view =
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
: gfx::NativeView(); : gfx::NativeView();
@ -135,7 +156,7 @@ index 8251a54246126..ebf7da47ed642 100644
widget->SetNativeWindowProperty( widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey, views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier)); const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -322,8 +321,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, @@ -344,8 +350,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
return widget; return widget;
ModalDialogHost* host = ModalDialogHost* host =
@ -145,27 +166,6 @@ index 8251a54246126..ebf7da47ed642 100644
if (host) { if (host) {
DCHECK_EQ(parent_view, host->GetHostView()); DCHECK_EQ(parent_view, host->GetHostView());
std::unique_ptr<ModalDialogHostObserver> observer = std::unique_ptr<ModalDialogHostObserver> observer =
@@ -340,11 +338,18 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
views::Widget* ShowBrowserModal(std::unique_ptr<ui::DialogModel> dialog_model,
gfx::NativeWindow parent) {
+ gfx::NativeView parent_view =
+ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) :
+ gfx::NativeView();
+ // Use with CEF windowless rendering.
+ gfx::AcceleratedWidget parent_widget =
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
+ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget;
+
// TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame
// dialogs support autosize.
bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame(
- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
- : gfx::NativeView());
+ parent_view, parent_widget);
auto dialog = views::BubbleDialogModelHost::CreateModal(
std::move(dialog_model), ui::mojom::ModalType::kWindow,
will_use_custom_frame);
diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
index 2b495a8ab092c..01a28aca853d0 100644 index 2b495a8ab092c..01a28aca853d0 100644
--- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc --- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
@ -210,10 +210,10 @@ index 51ed6bcf6b540..c6e1161140655 100644
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0; virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated. // Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index 0fc878fd920e9..a7595a9b4af86 100644 index 7b22be3acdb6c..5e8ac69f52691 100644
--- ui/views/window/dialog_delegate.cc --- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc
@@ -88,10 +88,12 @@ DialogDelegate::DialogDelegate() { @@ -89,10 +89,12 @@ DialogDelegate::DialogDelegate() {
// static // static
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
gfx::NativeWindow context, gfx::NativeWindow context,
@ -228,7 +228,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
widget->Init(std::move(params)); widget->Init(std::move(params));
return widget; return widget;
} }
@@ -100,15 +102,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, @@ -101,15 +103,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
Widget* DialogDelegate::CreateDialogWidget( Widget* DialogDelegate::CreateDialogWidget(
std::unique_ptr<WidgetDelegate> delegate, std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context, gfx::NativeWindow context,
@ -250,7 +250,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
#else #else
return true; return true;
#endif #endif
@@ -119,7 +123,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( @@ -120,7 +124,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
WidgetDelegate* delegate, WidgetDelegate* delegate,
gfx::NativeWindow context, gfx::NativeWindow context,
gfx::NativeView parent, gfx::NativeView parent,
@ -260,7 +260,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
DialogDelegate* dialog = delegate->AsDialogDelegate(); DialogDelegate* dialog = delegate->AsDialogDelegate();
views::Widget::InitParams params( views::Widget::InitParams params(
@@ -129,7 +134,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( @@ -130,7 +135,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
params.bounds = bounds; params.bounds = bounds;
if (dialog) { if (dialog) {
@ -269,7 +269,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
} }
if (!dialog || dialog->use_custom_frame()) { if (!dialog || dialog->use_custom_frame()) {
@@ -143,6 +148,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( @@ -144,6 +149,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
} }
params.context = context; params.context = context;
params.parent = parent; params.parent = parent;

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
index f960decad09fb..b1e88137ff284 100644 index 2ca95e6bb673a..2207b0f637a91 100644
--- chrome/browser/download/chrome_download_manager_delegate.cc --- chrome/browser/download/chrome_download_manager_delegate.cc
+++ chrome/browser/download/chrome_download_manager_delegate.cc +++ chrome/browser/download/chrome_download_manager_delegate.cc
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
@ -10,7 +10,7 @@ index f960decad09fb..b1e88137ff284 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/download/bubble/download_bubble_prefs.h" #include "chrome/browser/download/bubble/download_bubble_prefs.h"
#include "chrome/browser/download/download_core_service.h" #include "chrome/browser/download/download_core_service.h"
@@ -164,6 +165,10 @@ @@ -166,6 +167,10 @@
#endif // BUILDFLAG(ENABLE_EXTENSIONS) #endif // BUILDFLAG(ENABLE_EXTENSIONS)
#endif // BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION) #endif // BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION)
@ -21,7 +21,7 @@ index f960decad09fb..b1e88137ff284 100644
using content::BrowserThread; using content::BrowserThread;
using content::DownloadManager; using content::DownloadManager;
using download::DownloadItem; using download::DownloadItem;
@@ -523,6 +528,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile) @@ -531,6 +536,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>(); download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>();
download_message_bridge_ = std::make_unique<DownloadMessageBridge>(); download_message_bridge_ = std::make_unique<DownloadMessageBridge>();
#endif #endif
@ -33,7 +33,7 @@ index f960decad09fb..b1e88137ff284 100644
} }
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() { ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
@@ -586,6 +596,9 @@ void ChromeDownloadManagerDelegate::Shutdown() { @@ -594,6 +604,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
download_manager_->RemoveObserver(this); download_manager_->RemoveObserver(this);
download_manager_ = nullptr; download_manager_ = nullptr;
} }
@ -43,7 +43,7 @@ index f960decad09fb..b1e88137ff284 100644
} }
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown( void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
@@ -654,6 +667,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget( @@ -662,6 +675,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload); ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
} }
@ -56,7 +56,7 @@ index f960decad09fb..b1e88137ff284 100644
DownloadTargetDeterminer::CompletionCallback target_determined_callback = DownloadTargetDeterminer::CompletionCallback target_determined_callback =
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined, base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
weak_ptr_factory_.GetWeakPtr(), download->GetId(), weak_ptr_factory_.GetWeakPtr(), download->GetId(),
@@ -1142,8 +1161,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) { @@ -1167,8 +1186,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
return; return;
} }
@ -72,7 +72,7 @@ index f960decad09fb..b1e88137ff284 100644
net::FilePathToFileURL(download->GetTargetFilePath()), net::FilePathToFileURL(download->GetTargetFilePath()),
content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h
index 41db535e5cf9c..015d84cc95b49 100644 index b3a0d699d9d13..2f42dcf185264 100644
--- chrome/browser/download/chrome_download_manager_delegate.h --- chrome/browser/download/chrome_download_manager_delegate.h
+++ chrome/browser/download/chrome_download_manager_delegate.h +++ chrome/browser/download/chrome_download_manager_delegate.h
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
@ -96,7 +96,7 @@ index 41db535e5cf9c..015d84cc95b49 100644
// This is the Chrome side helper for the download system. // This is the Chrome side helper for the download system.
class ChromeDownloadManagerDelegate class ChromeDownloadManagerDelegate
: public content::DownloadManagerDelegate, : public content::DownloadManagerDelegate,
@@ -406,6 +413,10 @@ class ChromeDownloadManagerDelegate @@ -405,6 +412,10 @@ class ChromeDownloadManagerDelegate
// Whether a file picker dialog is showing. // Whether a file picker dialog is showing.
bool is_file_picker_showing_; bool is_file_picker_showing_;

View File

@ -1,17 +1,17 @@
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
index 0ac0d2fae56a9..4c55cfe1a52d7 100644 index acd5954b3423a..215edaa4badc5 100644
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc --- chrome/browser/extensions/api/chrome_extensions_api_client.cc
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
@@ -15,6 +15,7 @@ @@ -16,6 +16,7 @@
#include "base/strings/string_util.h" #include "base/task/single_thread_task_runner.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h" #include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h" #include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h"
#include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h"
#include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h" #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h"
@@ -86,6 +87,10 @@ @@ -90,6 +91,10 @@
#include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h" #include "chromeos/ash/components/settings/cros_settings.h"
#endif #endif
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
@ -21,7 +21,7 @@ index 0ac0d2fae56a9..4c55cfe1a52d7 100644
#if BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PRINTING)
#include "chrome/browser/printing/printing_init.h" #include "chrome/browser/printing/printing_init.h"
#endif #endif
@@ -310,7 +315,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const { @@ -317,7 +322,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
std::unique_ptr<MimeHandlerViewGuestDelegate> std::unique_ptr<MimeHandlerViewGuestDelegate>
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const { MimeHandlerViewGuest* guest) const {
@ -32,12 +32,12 @@ index 0ac0d2fae56a9..4c55cfe1a52d7 100644
+#endif +#endif
} }
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( std::unique_ptr<WebViewGuestDelegate>
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
index dad67c2ce98a8..71b27628f7827 100644 index 4ac2686025ef0..94aa0016881b6 100644
--- chrome/browser/extensions/api/tabs/tabs_api.cc --- chrome/browser/extensions/api/tabs/tabs_api.cc
+++ chrome/browser/extensions/api/tabs/tabs_api.cc +++ chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1687,7 +1687,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -1714,7 +1714,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError)); return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
} }
@ -46,16 +46,7 @@ index dad67c2ce98a8..71b27628f7827 100644
tab_strip->ActivateTabAt(tab_index); tab_strip->ActivateTabAt(tab_index);
DCHECK_EQ(contents, tab_strip->GetActiveWebContents()); DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
} }
@@ -1701,7 +1701,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -1741,7 +1741,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
}
bool highlighted = *params->update_properties.highlighted;
- if (highlighted != tab_strip->IsTabSelected(tab_index)) {
+ if (tab_strip && highlighted != tab_strip->IsTabSelected(tab_index)) {
tab_strip->ToggleSelectionAt(tab_index);
}
}
@@ -1713,7 +1713,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
kCannotUpdateMuteCaptured, base::NumberToString(tab_id)))); kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
} }
@ -64,7 +55,7 @@ index dad67c2ce98a8..71b27628f7827 100644
int opener_id = *params->update_properties.opener_tab_id; int opener_id = *params->update_properties.opener_tab_id;
WebContents* opener_contents = nullptr; WebContents* opener_contents = nullptr;
if (opener_id == tab_id) { if (opener_id == tab_id) {
@@ -1748,7 +1748,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -1776,7 +1776,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
->SetAutoDiscardable(state); ->SetAutoDiscardable(state);
} }
@ -73,7 +64,7 @@ index dad67c2ce98a8..71b27628f7827 100644
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if // Bug fix for crbug.com/1197888. Don't let the extension update the tab if
// the user is dragging tabs. // the user is dragging tabs.
if (!ExtensionTabUtil::IsTabStripEditable()) { if (!ExtensionTabUtil::IsTabStripEditable()) {
@@ -1769,7 +1769,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -1797,7 +1797,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
// Navigate the tab to a new location if the url is different. // Navigate the tab to a new location if the url is different.
if (params->update_properties.url) { if (params->update_properties.url) {
std::string updated_url = *params->update_properties.url; std::string updated_url = *params->update_properties.url;
@ -83,7 +74,7 @@ index dad67c2ce98a8..71b27628f7827 100644
!IsURLAllowedInIncognito(GURL(updated_url))) { !IsURLAllowedInIncognito(GURL(updated_url))) {
return RespondNow(Error(ErrorUtils::FormatErrorMessage( return RespondNow(Error(ErrorUtils::FormatErrorMessage(
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url))); tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
@@ -1784,7 +1785,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -1812,7 +1813,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(std::move(error))); return RespondNow(Error(std::move(error)));
} }
@ -93,7 +84,7 @@ index dad67c2ce98a8..71b27628f7827 100644
current_url, updated_url, js_callstack()); current_url, updated_url, js_callstack());
} }
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
index 8a2e378aac255..456c542044eb3 100644 index fc375bf87a2d1..5f32c45dc2fa6 100644
--- chrome/browser/extensions/extension_tab_util.cc --- chrome/browser/extensions/extension_tab_util.cc
+++ chrome/browser/extensions/extension_tab_util.cc +++ chrome/browser/extensions/extension_tab_util.cc
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
@ -104,7 +95,7 @@ index 8a2e378aac255..456c542044eb3 100644
#include "chrome/browser/browser_process.h" // nogncheck #include "chrome/browser/browser_process.h" // nogncheck
#include "chrome/browser/extensions/browser_extension_window_controller.h" #include "chrome/browser/extensions/browser_extension_window_controller.h"
#include "chrome/browser/extensions/chrome_extension_function_details.h" #include "chrome/browser/extensions/chrome_extension_function_details.h"
@@ -84,6 +85,10 @@ @@ -87,6 +88,10 @@
#include "url/url_constants.h" #include "url/url_constants.h"
#endif #endif
@ -115,7 +106,7 @@ index 8a2e378aac255..456c542044eb3 100644
using content::NavigationEntry; using content::NavigationEntry;
using content::WebContents; using content::WebContents;
using extensions::mojom::APIPermissionID; using extensions::mojom::APIPermissionID;
@@ -735,6 +740,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id, @@ -738,6 +743,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
} }
} }

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/views/frame/browser_frame_mac.h chrome/browser/ui/views/frame/browser_frame_mac.h diff --git chrome/browser/ui/views/frame/browser_frame_mac.h chrome/browser/ui/views/frame/browser_frame_mac.h
index 2245c931fbe4f..761ea6b3a6afb 100644 index bda8a68545a80..275a75f841422 100644
--- chrome/browser/ui/views/frame/browser_frame_mac.h --- chrome/browser/ui/views/frame/browser_frame_mac.h
+++ chrome/browser/ui/views/frame/browser_frame_mac.h +++ chrome/browser/ui/views/frame/browser_frame_mac.h
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
@ -10,7 +10,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644
class BrowserFrame; class BrowserFrame;
class BrowserView; class BrowserView;
@class BrowserWindowTouchBarController; @class BrowserWindowTouchBarController;
@@ -54,6 +55,21 @@ class BrowserFrameMac : public views::NativeWidgetMac, @@ -55,6 +56,21 @@ class BrowserFrameMac : public views::NativeWidgetMac,
bool ShouldUseInitialVisibleOnAllWorkspaces() const override; bool ShouldUseInitialVisibleOnAllWorkspaces() const override;
void AnnounceTextInInProcessWindow(const std::u16string& text) override; void AnnounceTextInInProcessWindow(const std::u16string& text) override;
@ -33,7 +33,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644
~BrowserFrameMac() override; ~BrowserFrameMac() override;
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
index 29ba0f48f559a..07887ae9ec11c 100644 index 9f478e1478d41..fadc6f000b87e 100644
--- chrome/browser/ui/views/frame/browser_frame_mac.mm --- chrome/browser/ui/views/frame/browser_frame_mac.mm
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm +++ chrome/browser/ui/views/frame/browser_frame_mac.mm
@@ -185,7 +185,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() { @@ -185,7 +185,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {

View File

@ -17,10 +17,10 @@ index fbce13c16ad10..0512b2f09937e 100644
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt( std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
content::WebContents* web_contents, content::WebContents* web_contents,
diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc
index f6c0b656e5d67..caac970a78928 100644 index b939a33a372d9..11483872d8782 100644
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -210,11 +210,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt( @@ -223,11 +223,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
} }
} }

View File

@ -253,7 +253,7 @@ index 910f29ac13deb..680507379632e 100644
base::ThreadPool::CreateSequencedTaskRunner( base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}), {base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h
index dc552834ff821..6b290da791ccd 100644 index fbc5a3f9fab7b..747c44589eaf7 100644
--- chrome/browser/policy/chrome_browser_policy_connector.h --- chrome/browser/policy/chrome_browser_policy_connector.h
+++ chrome/browser/policy/chrome_browser_policy_connector.h +++ chrome/browser/policy/chrome_browser_policy_connector.h
@@ -22,6 +22,10 @@ @@ -22,6 +22,10 @@

View File

@ -44,7 +44,7 @@ index 1cf20c6206d60..9140d51cb79bd 100644
avatar_toolbar_button, GetBrowser().profile(), type); avatar_toolbar_button, GetBrowser().profile(), type);
DCHECK_EQ(nullptr, bubble_tracker_.view()); DCHECK_EQ(nullptr, bubble_tracker_.view());
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
index 50a88f2c7bb82..bf6a3edd4e7bd 100644 index affba30438a4a..bdf433d20b97c 100644
--- chrome/browser/ui/views/profiles/incognito_menu_view.cc --- chrome/browser/ui/views/profiles/incognito_menu_view.cc
+++ chrome/browser/ui/views/profiles/incognito_menu_view.cc +++ chrome/browser/ui/views/profiles/incognito_menu_view.cc
@@ -30,7 +30,9 @@ @@ -30,7 +30,9 @@
@ -59,10 +59,10 @@ index 50a88f2c7bb82..bf6a3edd4e7bd 100644
ax::mojom::NameFrom::kAttribute); ax::mojom::NameFrom::kAttribute);
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 6ba5eb8b97e90..fbe8d899878fe 100644 index 133b80d279bf6..be46fc65f890d 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -58,7 +58,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { @@ -60,7 +60,9 @@ void ProfileMenuCoordinator::Show(
std::unique_ptr<ProfileMenuViewBase> bubble; std::unique_ptr<ProfileMenuViewBase> bubble;
bool is_incognito = browser.profile()->IsIncognitoProfile(); bool is_incognito = browser.profile()->IsIncognitoProfile();

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc
index 3357c7926a48f..77c27c7883f27 100644 index f2719532b3517..573cd8ec4b8ce 100644
--- chrome/browser/profiles/off_the_record_profile_impl.cc --- chrome/browser/profiles/off_the_record_profile_impl.cc
+++ chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -655,7 +655,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile( @@ -659,7 +659,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
#endif #endif
if (!profile) if (!profile)
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id); profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
@ -14,7 +14,7 @@ index 3357c7926a48f..77c27c7883f27 100644
} }
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index a490fefce8c79..2a066c47ef96d 100644 index 363a7c4ac583f..1c263547c8f54 100644
--- chrome/browser/profiles/profile.cc --- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky @@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@ -85,7 +85,7 @@ index c8d72ed59252f..d785187710a79 100644
// Returns whether the user has signed in this profile to an account. // 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 diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index a27c5368517b0..54f2f1572b7ad 100644 index 22445800c6ac8..bd17582782117 100644
--- chrome/browser/profiles/profile_impl.cc --- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc
@@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, @@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 50c6735fe6074..749fb1ff46146 100644 index 7b88f06c0d08a..b5ff530eae6fa 100644
--- chrome/browser/safe_browsing/BUILD.gn --- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn
@@ -37,6 +37,7 @@ static_library("safe_browsing") { @@ -37,6 +37,7 @@ static_library("safe_browsing") {
@ -10,3 +10,11 @@ index 50c6735fe6074..749fb1ff46146 100644
"//components/keyed_service/content", "//components/keyed_service/content",
"//components/language/core/browser", "//components/language/core/browser",
"//components/no_state_prefetch/browser", "//components/no_state_prefetch/browser",
@@ -217,6 +218,7 @@ static_library("safe_browsing") {
"//chrome/browser/content_settings:content_settings_factory",
"//chrome/browser/download",
"//chrome/browser/enterprise/connectors/analysis:features",
+ "//chrome/browser/permissions:permissions_proto",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui/safety_hub",
"//chrome/common/safe_browsing:archive_analyzer_results",

View File

@ -69,18 +69,18 @@ index 46103729d33a7..fbc400e60239b 100644
// chrome://terms // chrome://terms
class TermsUIConfig : public AboutUIConfigBase { class TermsUIConfig : public AboutUIConfigBase {
diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc
index 184e3a58c47ac..7152bd618f351 100644 index cbcdde4afa71b..3507ff26fa3a0 100644
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc --- chrome/browser/ui/webui/chrome_web_ui_configs.cc
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
@@ -5,6 +5,7 @@ @@ -6,6 +6,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_configs.h"
#include "build/android_buildflags.h"
#include "build/build_config.h" #include "build/build_config.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h" #include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
#include "chrome/browser/ui/webui/about/about_ui.h" #include "chrome/browser/ui/webui/about/about_ui.h"
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h" #include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() { @@ -214,6 +215,9 @@ void RegisterChromeWebUIConfigs() {
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>()); map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
@ -91,10 +91,10 @@ index 184e3a58c47ac..7152bd618f351 100644
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>()); map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
index d94ad4f02b11d..c1100feeff7c6 100644 index e5e724a22d015..fcb15d234483f 100644
--- chrome/common/webui_url_constants.cc --- chrome/common/webui_url_constants.cc
+++ chrome/common/webui_url_constants.cc +++ chrome/common/webui_url_constants.cc
@@ -95,6 +95,9 @@ base::span<const base::cstring_view> ChromeURLHosts() { @@ -96,6 +96,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {
kChromeUIHistoryHost, kChromeUIHistoryHost,
history_clusters_internals::kChromeUIHistoryClustersInternalsHost, history_clusters_internals::kChromeUIHistoryClustersInternalsHost,
kChromeUIInterstitialHost, kChromeUIInterstitialHost,
@ -105,18 +105,18 @@ index d94ad4f02b11d..c1100feeff7c6 100644
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
kChromeUIManagementHost, kChromeUIManagementHost,
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
index aa2c595dabdd1..94938716ccd4a 100644 index af2bad4318c92..fa4fe8b87386d 100644
--- chrome/common/webui_url_constants.h --- chrome/common/webui_url_constants.h
+++ chrome/common/webui_url_constants.h +++ chrome/common/webui_url_constants.h
@@ -17,6 +17,7 @@ @@ -18,6 +18,7 @@
#include "base/strings/cstring_view.h" #include "build/android_buildflags.h"
#include "build/branding_buildflags.h" #include "build/branding_buildflags.h"
#include "build/build_config.h" #include "build/build_config.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/common/buildflags.h" #include "chrome/common/buildflags.h"
#include "components/signin/public/base/signin_buildflags.h" #include "components/signin/public/base/signin_buildflags.h"
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
@@ -146,6 +147,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials"; @@ -147,6 +148,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/"; inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/";
inline constexpr char kChromeUIKillHost[] = "kill"; inline constexpr char kChromeUIKillHost[] = "kill";
inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals"; inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals";

View File

@ -124,7 +124,7 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644
// Factory for the creating refs in callbacks. // Factory for the creating refs in callbacks.
base::WeakPtrFactory<VersionHandler> weak_ptr_factory_{this}; base::WeakPtrFactory<VersionHandler> weak_ptr_factory_{this};
diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc
index c021991c04f77..aa6ad561dfd80 100644 index f9c2e60204369..98026fd57457f 100644
--- chrome/browser/ui/webui/version/version_ui.cc --- chrome/browser/ui/webui/version/version_ui.cc
+++ chrome/browser/ui/webui/version/version_ui.cc +++ chrome/browser/ui/webui/version/version_ui.cc
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -158,9 +158,9 @@ index c021991c04f77..aa6ad561dfd80 100644
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD}, {version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL}, {version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
@@ -114,6 +123,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { @@ -114,6 +123,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
html_source->AddResourcePath("images/product_logo_white.png",
IDR_PRODUCT_LOGO_WHITE); IDR_PRODUCT_LOGO_WHITE);
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML);
+ +
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
+ html_source->AddString(version_ui::kCefVersion, CEF_VERSION); + html_source->AddString(version_ui::kCefVersion, CEF_VERSION);
@ -233,10 +233,10 @@ index bd41fd2492e79..04378e39332e1 100644
+ font-size: 0.8em; + font-size: 0.8em;
+} +}
diff --git components/webui/version/resources/about_version.html components/webui/version/resources/about_version.html diff --git components/webui/version/resources/about_version.html components/webui/version/resources/about_version.html
index 40c7cc51fc863..b3ee7e7978e93 100644 index bd2914d8bc19a..f3176886fd96b 100644
--- components/webui/version/resources/about_version.html --- components/webui/version/resources/about_version.html
+++ components/webui/version/resources/about_version.html +++ components/webui/version/resources/about_version.html
@@ -48,9 +48,21 @@ about:version template page @@ -49,9 +49,21 @@ about:version template page
</picture> </picture>
</if> </if>
<div id="company">$i18n{company}</div> <div id="company">$i18n{company}</div>
@ -259,7 +259,7 @@ index 40c7cc51fc863..b3ee7e7978e93 100644
<tr><td class="label">$i18n{application_label}</td> <tr><td class="label">$i18n{application_label}</td>
<td class="version" id="version"> <td class="version" id="version">
<span id="copy-content"> <span id="copy-content">
@@ -158,7 +170,15 @@ about:version template page @@ -159,7 +171,15 @@ about:version template page
<tr><td class="label">$i18n{executable_path_name}</td> <tr><td class="label">$i18n{executable_path_name}</td>
<td class="version" id="executable_path">$i18n{executable_path}</td> <td class="version" id="executable_path">$i18n{executable_path}</td>
</tr> </tr>
@ -276,7 +276,7 @@ index 40c7cc51fc863..b3ee7e7978e93 100644
<td class="version" id="profile_path">$i18n{profile_path}</td> <td class="version" id="profile_path">$i18n{profile_path}</td>
</tr> </tr>
</if> </if>
@@ -191,6 +211,17 @@ about:version template page @@ -192,6 +212,17 @@ about:version template page
<td class="version" id="sanitizer">$i18n{sanitizer}</td> <td class="version" id="sanitizer">$i18n{sanitizer}</td>
</tr> </tr>
</table> </table>

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 345d2729f1802..10d3294221f3b 100644 index 7cc74f595ff57..4e0e494678d75 100644
--- chrome/app/chrome_main_delegate.cc --- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
@ -18,7 +18,7 @@ index 345d2729f1802..10d3294221f3b 100644
// Initializes the user data dir. Must be called before InitializeLocalState(). // Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) { void InitializeUserDataDir(base::CommandLine* command_line) {
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
@@ -622,6 +624,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) { @@ -624,6 +626,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
#endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN)
} }
@ -26,7 +26,7 @@ index 345d2729f1802..10d3294221f3b 100644
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
void InitLogging(const std::string& process_type) { void InitLogging(const std::string& process_type) {
@@ -741,6 +744,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { @@ -743,6 +746,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default; ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID) #endif // !BUILDFLAG(IS_ANDROID)
@ -37,7 +37,7 @@ index 345d2729f1802..10d3294221f3b 100644
std::optional<int> ChromeMainDelegate::PostEarlyInitialization( std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) { InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get()); DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -766,7 +773,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -768,7 +775,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics. // future session's metrics.
DeferBrowserMetrics(user_data_dir); DeferBrowserMetrics(user_data_dir);
@ -46,7 +46,7 @@ index 345d2729f1802..10d3294221f3b 100644
// In the case the process is not the singleton process, the uninstall tasks // 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 // need to be executed here. A window will be displayed asking to close all
// running instances. // running instances.
@@ -851,7 +858,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -853,7 +860,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// Initializes the resource bundle and determines the locale. // Initializes the resource bundle and determines the locale.
std::string actual_locale = LoadLocalState( std::string actual_locale = LoadLocalState(
@ -56,18 +56,18 @@ index 345d2729f1802..10d3294221f3b 100644
chrome_feature_list_creator->SetApplicationLocale(actual_locale); chrome_feature_list_creator->SetApplicationLocale(actual_locale);
chrome_feature_list_creator->OverrideCachedUIStrings(); chrome_feature_list_creator->OverrideCachedUIStrings();
@@ -866,6 +874,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -868,6 +876,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
new net::NetworkChangeNotifierFactoryAndroid()); new net::NetworkChangeNotifierFactoryAndroid());
#endif #endif
+#if !BUILDFLAG(ENABLE_CEF) +#if !BUILDFLAG(ENABLE_CEF)
+ // Avoid CEF crash with multi-threaded-message-loop. + // Avoid CEF crash with multi-threaded-message-loop.
if (base::FeatureList::IsEnabled( bool record = true;
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { #if BUILDFLAG(IS_ANDROID)
bool record = true; record =
@@ -876,6 +886,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -876,6 +886,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (record) if (record) {
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile(); chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
} }
+#endif // !BUILDFLAG(ENABLE_CEF) +#endif // !BUILDFLAG(ENABLE_CEF)
@ -232,10 +232,10 @@ index 72eb096075a05..d3866aae87c60 100644
base::PathService::OverrideAndCreateIfNeeded( base::PathService::OverrideAndCreateIfNeeded(
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 61da14e26c4db..2334d0fab04b5 100644 index 681fd3282078c..8bca99c60d66d 100644
--- chrome/browser/chrome_browser_main.cc --- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc
@@ -27,6 +27,7 @@ @@ -28,6 +28,7 @@
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
@ -243,7 +243,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
#include "chrome/browser/active_use_util.h" #include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/browser_features.h" #include "chrome/browser/browser_features.h"
@@ -432,7 +433,7 @@ void ProcessSingletonNotificationCallbackImpl( @@ -433,7 +434,7 @@ void ProcessSingletonNotificationCallbackImpl(
return; return;
} }
@ -252,7 +252,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// The uninstall command-line switch is handled by the origin process; see // The uninstall command-line switch is handled by the origin process; see
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't // ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
// be able to become the singleton process and will display a window asking // be able to become the singleton process and will display a window asking
@@ -741,7 +742,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { @@ -749,7 +750,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT; return content::RESULT_CODE_NORMAL_EXIT;
} }
@ -261,7 +261,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// If we are running stale binaries then relaunch and exit immediately. // If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) { if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser( if (!upgrade_util::RelaunchChromeBrowser(
@@ -859,7 +860,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( @@ -867,7 +868,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state()); browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback()); platform_management_service->RefreshCache(base::NullCallback());
@ -270,7 +270,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
if (first_run::IsChromeFirstRun()) { if (first_run::IsChromeFirstRun()) {
bool stats_default; bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) { if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -905,6 +906,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { @@ -910,6 +911,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
master_prefs_ = std::make_unique<first_run::MasterPrefs>(); master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@ -278,7 +278,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs = std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs(); startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs) if (!installer_initial_prefs)
@@ -938,6 +940,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { @@ -943,6 +945,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit); master_prefs_->confirm_to_quit);
} }
#endif #endif
@ -286,7 +286,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
return content::RESULT_CODE_NORMAL_EXIT; return content::RESULT_CODE_NORMAL_EXIT;
} }
@@ -1007,6 +1010,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { @@ -1012,6 +1015,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated(); browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@ -294,7 +294,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// Android does first run in Java instead of native. // Android does first run in Java instead of native.
// Chrome OS has its own out-of-box-experience code. // Chrome OS has its own out-of-box-experience code.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@@ -1028,6 +1032,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { @@ -1033,6 +1037,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif #endif
} }
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@ -302,7 +302,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC)
#if defined(ARCH_CPU_X86_64) #if defined(ARCH_CPU_X86_64)
@@ -1395,6 +1400,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1400,6 +1405,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun(); browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
@ -310,7 +310,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// If the command line specifies 'uninstall' then we need to work here // If the command line specifies 'uninstall' then we need to work here
// unless we detect another chrome browser running. // unless we detect another chrome browser running.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) { if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
@@ -1406,6 +1412,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1411,6 +1417,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands( return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess()); *base::CommandLine::ForCurrentProcess());
} }
@ -318,7 +318,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
ui::SelectFileDialog::SetFactory( ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>()); std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1428,6 +1435,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1433,6 +1440,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif #endif
@ -326,7 +326,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) { switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference( bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1441,13 +1449,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1446,13 +1454,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT) ? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(CHROME_RESULT_CODE_SHELL_INTEGRATION_FAILED); : static_cast<int>(CHROME_RESULT_CODE_SHELL_INTEGRATION_FAILED);
} }
@ -342,7 +342,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// We must call DoUpgradeTasks now that we own the browser singleton to // We must call DoUpgradeTasks now that we own the browser singleton to
// finish upgrade tasks (swap) and relaunch if necessary. // finish upgrade tasks (swap) and relaunch if necessary.
if (upgrade_util::DoUpgradeTasks(*base::CommandLine::ForCurrentProcess())) if (upgrade_util::DoUpgradeTasks(*base::CommandLine::ForCurrentProcess()))
@@ -1491,7 +1500,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1496,7 +1505,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif #endif
@ -351,7 +351,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// Check if there is any machine level Chrome installed on the current // 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 // 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 // allow the user level Chrome to run. So we notify the user and uninstall
@@ -1573,7 +1582,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1578,7 +1587,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later. // Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile); profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@ -360,7 +360,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// Execute first run specific code after the PrefService has been initialized // Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends // and preferences have been registered since some of the import code depends
// on preferences. // on preferences.
@@ -1594,7 +1603,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1599,7 +1608,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif #endif
@ -369,7 +369,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// Registers Chrome with the Windows Restart Manager, which will restore the // Registers Chrome with the Windows Restart Manager, which will restore the
// Chrome session when the computer is restarted after a system update. // Chrome session when the computer is restarted after a system update.
// This could be run as late as WM_QUERYENDSESSION for system update reboots, // This could be run as late as WM_QUERYENDSESSION for system update reboots,
@@ -1697,6 +1706,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1702,6 +1711,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles(); g_browser_process->profile_manager()->GetLastOpenedProfiles();
} }
#endif #endif
@ -381,7 +381,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
// This step is costly. // This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(), if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info, base::FilePath(), profile_info,
@@ -1724,11 +1738,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1729,11 +1743,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer // Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess. // ownership of the browser's lifetime to the BrowserProcess.
@ -433,7 +433,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
+#endif +#endif
} }
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 5b8b1bf1bc86e..8d2274c606ef4 100644 index 3ebb85bbe3c48..896b131108218 100644
--- chrome/browser/chrome_content_browser_client.cc --- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc
@@ -48,6 +48,7 @@ @@ -48,6 +48,7 @@
@ -444,7 +444,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/ai/ai_manager.h" #include "chrome/browser/ai/ai_manager.h"
#include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/app_mode/app_mode_utils.h"
@@ -1494,6 +1495,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { @@ -1504,6 +1505,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
} }
ChromeContentBrowserClient::ChromeContentBrowserClient() { ChromeContentBrowserClient::ChromeContentBrowserClient() {
@ -453,7 +453,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back( extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>()); std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1531,6 +1534,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { @@ -1541,6 +1544,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
} }
} }
@ -465,7 +465,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
// static // static
void ChromeContentBrowserClient::RegisterLocalStatePrefs( void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) { PrefRegistrySimple* registry) {
@@ -4792,9 +4800,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( @@ -4837,9 +4845,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite); &search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
@ -477,7 +477,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
} }
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6876,7 +6886,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( @@ -6926,7 +6936,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
} }
} }
@ -486,7 +486,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -6894,6 +6904,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( @@ -6944,6 +6954,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale(); network_context_params->accept_language = GetApplicationLocale();
} }
@ -495,7 +495,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
} }
std::vector<base::FilePath> std::vector<base::FilePath>
@@ -8032,11 +8044,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( @@ -8084,11 +8096,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context); const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -509,7 +509,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
FROM_HERE, keepalive_deadline_ - now, FROM_HERE, keepalive_deadline_ - now,
base::BindOnce( base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired, &ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -8058,7 +8070,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { @@ -8110,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_; --num_keepalive_requests_;
if (num_keepalive_requests_ == 0) { if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer"; DVLOG(1) << "Stopping the keepalive timer";
@ -519,7 +519,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
// This deletes the keep alive handle attached to the timer function and // This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence. // unblock the shutdown sequence.
} }
@@ -8236,7 +8249,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( @@ -8288,7 +8301,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_; const auto then = keepalive_deadline_;
if (now < then) { if (now < then) {
@ -529,7 +529,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(), weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 3542dd8ea5593..dfd89fec1e4a6 100644 index c944bdaf9bbbe..a9e7bd1139c07 100644
--- chrome/browser/chrome_content_browser_client.h --- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h
@@ -159,6 +159,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -159,6 +159,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@ -541,7 +541,7 @@ index 3542dd8ea5593..dfd89fec1e4a6 100644
// TODO(crbug.com/41356866): This file is about calls from content/ out // TODO(crbug.com/41356866): This file is about calls from content/ out
// to chrome/ to get values or notify about events, but both of these // 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. // functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -730,7 +732,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -733,7 +735,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override; override;
void OnNetworkServiceCreated( void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override; network::mojom::NetworkService* network_service) override;
@ -550,7 +550,7 @@ index 3542dd8ea5593..dfd89fec1e4a6 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -1358,7 +1360,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -1370,7 +1372,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0; uint64_t num_keepalive_requests_ = 0;
@ -560,7 +560,7 @@ index 3542dd8ea5593..dfd89fec1e4a6 100644
#endif #endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 7393b3400afe4..e19f464f67640 100644 index 9a00400829ae1..b0007362043bc 100644
--- chrome/browser/prefs/browser_prefs.cc --- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
@ -571,7 +571,7 @@ index 7393b3400afe4..e19f464f67640 100644
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/invert_bubble_prefs.h" #include "chrome/browser/accessibility/invert_bubble_prefs.h"
@@ -208,6 +209,10 @@ @@ -217,6 +218,10 @@
#include "extensions/browser/pref_names.h" #include "extensions/browser/pref_names.h"
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
@ -582,7 +582,7 @@ index 7393b3400afe4..e19f464f67640 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1830,6 +1835,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { @@ -1856,6 +1861,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last. // This is intentionally last.
RegisterLocalStatePrefsForMigration(registry); RegisterLocalStatePrefsForMigration(registry);
@ -594,7 +594,7 @@ index 7393b3400afe4..e19f464f67640 100644
} }
// Register prefs applicable to all profiles. // Register prefs applicable to all profiles.
@@ -2271,6 +2281,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, @@ -2305,6 +2315,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) { const std::string& locale) {
RegisterProfilePrefs(registry, locale); RegisterProfilePrefs(registry, locale);

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 99056d7aff8c7..2741155416953 100644 index d5e652efef5df..a4cc11790658c 100644
--- chrome/browser/ui/browser_command_controller.cc --- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc
@@ -441,6 +441,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( @@ -442,6 +442,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
// choose to not implement CommandUpdaterDelegate inside this class and // choose to not implement CommandUpdaterDelegate inside this class and
// therefore command_updater_ doesn't have the delegate set). // therefore command_updater_ doesn't have the delegate set).
if (!SupportsCommand(id) || !IsCommandEnabled(id)) { if (!SupportsCommand(id) || !IsCommandEnabled(id)) {
@ -10,7 +10,7 @@ index 99056d7aff8c7..2741155416953 100644
return false; return false;
} }
@@ -458,6 +459,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( @@ -459,6 +460,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id)) DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id; << "Invalid/disabled command " << id;
@ -24,7 +24,7 @@ index 99056d7aff8c7..2741155416953 100644
// The order of commands in this switch statement must match the function // The order of commands in this switch statement must match the function
// declaration order in browser.h! // declaration order in browser.h!
switch (id) { switch (id) {
@@ -1271,11 +1279,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( @@ -1297,11 +1305,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private: // BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() { bool BrowserCommandController::IsShowingMainUI() {
@ -40,27 +40,11 @@ index 99056d7aff8c7..2741155416953 100644
} }
void BrowserCommandController::InitCommandState() { void BrowserCommandController::InitCommandState() {
@@ -1523,11 +1533,12 @@ void BrowserCommandController::InitCommandState() {
#if BUILDFLAG(ENABLE_GLIC)
// Glic commands.
command_updater_.UpdateCommandEnabled(
- IDC_GLIC_TOGGLE_PIN, glic::GlicEnabling::IsProfileEligible(profile()));
+ IDC_GLIC_TOGGLE_PIN, glic::GlicEnabling::IsEnabledForProfile(profile()));
command_updater_.UpdateCommandEnabled(
- IDC_OPEN_GLIC, glic::GlicEnabling::IsProfileEligible(profile()));
+ IDC_OPEN_GLIC, glic::GlicEnabling::IsEnabledForProfile(profile()));
command_updater_.UpdateCommandEnabled(
- IDC_GLIC_TOGGLE_FOCUS, glic::GlicEnabling::IsProfileEligible(profile()));
+ IDC_GLIC_TOGGLE_FOCUS,
+ glic::GlicEnabling::IsEnabledForProfile(profile()));
#endif
// Initialize other commands whose state changes based on various conditions.
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 3dc212eb62ae8..4191ffa5f52a8 100644 index 0ac99f7c90ac8..41edc0a895a44 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc --- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -736,10 +736,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel( @@ -722,10 +722,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
ui::SimpleMenuModel::Delegate* delegate) ui::SimpleMenuModel::Delegate* delegate)
: SimpleMenuModel(delegate) { : SimpleMenuModel(delegate) {
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon); AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
@ -73,7 +57,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
} }
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel { class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
@@ -804,6 +806,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( @@ -790,6 +792,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
} }
} }
@ -131,7 +115,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
} // namespace } // namespace
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@@ -1748,7 +1801,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { @@ -1735,7 +1788,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false; return false;
} }
@ -140,7 +124,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
GlobalError* error = GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile()) GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id); ->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1764,6 +1817,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { @@ -1751,6 +1804,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
} }
} }
@ -171,7 +155,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const { bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS || if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) { command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1919,8 +1996,10 @@ void AppMenuModel::Build() { @@ -1914,8 +1991,10 @@ void AppMenuModel::Build() {
IDS_CLEAR_BROWSING_DATA, IDS_CLEAR_BROWSING_DATA,
kTrashCanRefreshIcon); kTrashCanRefreshIcon);
@ -182,7 +166,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
AddSeparator(ui::NORMAL_SEPARATOR); AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon); AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
@@ -2028,6 +2107,11 @@ void AppMenuModel::Build() { @@ -2026,6 +2105,11 @@ void AppMenuModel::Build() {
} }
#endif // !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_CHROMEOS)
@ -195,10 +179,10 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
} }
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index e65c121f225d5..5dddcf5d63555 100644 index ec1f1a15c682e..23163078693fb 100644
--- chrome/browser/ui/toolbar/app_menu_model.h --- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel, @@ -233,6 +233,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override; void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override; bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override; bool IsCommandIdEnabled(int command_id) const override;
@ -206,7 +190,7 @@ index e65c121f225d5..5dddcf5d63555 100644
bool IsCommandIdAlerted(int command_id) const override; bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override; bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id, bool GetAcceleratorForCommandId(int command_id,
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel, @@ -273,6 +274,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module, void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
int event_flags); int event_flags);
@ -235,7 +219,7 @@ index 603a95238c562..dd397451bed5a 100644
return gfx::Rect(); return gfx::Rect();
} }
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 55788d3552a4a..09e526e8e7cda 100644 index 1556caf117746..aa859c8ec0c22 100644
--- chrome/browser/ui/views/frame/browser_frame.cc --- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant( @@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
@ -266,7 +250,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
} }
BrowserFrame::~BrowserFrame() = default; BrowserFrame::~BrowserFrame() = default;
@@ -228,10 +238,20 @@ void BrowserFrame::LayoutWebAppWindowTitle( @@ -229,10 +239,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
} }
int BrowserFrame::GetTopInset() const { int BrowserFrame::GetTopInset() const {
@ -287,7 +271,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
browser_frame_view_->UpdateThrobber(running); browser_frame_view_->UpdateThrobber(running);
} }
@@ -240,6 +260,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { @@ -241,6 +261,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
} }
bool BrowserFrame::UseCustomFrame() const { bool BrowserFrame::UseCustomFrame() const {
@ -296,7 +280,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
return native_browser_frame_->UseCustomFrame(); return native_browser_frame_->UseCustomFrame();
} }
@@ -254,20 +276,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { @@ -255,20 +277,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
void BrowserFrame::GetWindowPlacement( void BrowserFrame::GetWindowPlacement(
gfx::Rect* bounds, gfx::Rect* bounds,
ui::mojom::WindowShowState* show_state) const { ui::mojom::WindowShowState* show_state) const {
@ -327,7 +311,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
browser_frame_view_->OnBrowserViewInitViewsComplete(); browser_frame_view_->OnBrowserViewInitViewsComplete();
} }
@@ -367,6 +399,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() @@ -368,6 +400,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
} }
void BrowserFrame::OnNativeWidgetWorkspaceChanged() { void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
@ -336,7 +320,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
IsVisibleOnAllWorkspaces()); IsVisibleOnAllWorkspaces());
@@ -577,6 +611,13 @@ void BrowserFrame::SelectNativeTheme() { @@ -578,6 +612,13 @@ void BrowserFrame::SelectNativeTheme() {
return; return;
} }
@ -350,7 +334,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
// Ignore the system theme for web apps with window-controls-overlay as the // Ignore the system theme for web apps with window-controls-overlay as the
// display_override so the web contents can blend with the overlay by using // display_override so the web contents can blend with the overlay by using
// the developer-provided theme color for a better experience. Context: // the developer-provided theme color for a better experience. Context:
@@ -642,5 +683,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( @@ -643,5 +684,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
} }
bool BrowserFrame::IsIncognitoBrowser() const { bool BrowserFrame::IsIncognitoBrowser() const {
@ -413,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 100644
// regenerated. // regenerated.
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type); bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index ac0264a452780..1cb030a738ca8 100644 index 43650702e865b..4f814d29ef136 100644
--- chrome/browser/ui/views/frame/browser_view.cc --- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc
@@ -363,10 +363,6 @@ using web_modal::WebContentsModalDialogHost; @@ -366,10 +366,6 @@ using web_modal::WebContentsModalDialogHost;
namespace { namespace {
@ -427,7 +411,7 @@ index ac0264a452780..1cb030a738ca8 100644
// The visible height of the shadow above the tabs. Clicks in this area are // The visible height of the shadow above the tabs. Clicks in this area are
// treated as clicks to the frame, rather than clicks to the tab. // treated as clicks to the frame, rather than clicks to the tab.
const int kTabShadowSize = 2; const int kTabShadowSize = 2;
@@ -792,6 +788,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { @@ -811,6 +807,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y(); return browser_view_->frame()->GetTopInset() - browser_view_->y();
} }
@ -442,7 +426,7 @@ index ac0264a452780..1cb030a738ca8 100644
bool IsToolbarVisible() const override { bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible(); return browser_view_->IsToolbarVisible();
} }
@@ -940,11 +944,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { @@ -935,11 +939,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// BrowserView, public: // BrowserView, public:
@ -465,8 +449,8 @@ index ac0264a452780..1cb030a738ca8 100644
SetShowIcon(::ShouldShowWindowIcon( SetShowIcon(::ShouldShowWindowIcon(
browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed())); browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed()));
@@ -1097,8 +1111,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) @@ -1089,8 +1103,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_scrim_view_, nullptr, watermark_view_)); lens_overlay_view_, contents_scrim_view_, nullptr, watermark_view_));
#endif #endif
- toolbar_ = top_container_->AddChildView( - toolbar_ = top_container_->AddChildView(
@ -483,7 +467,7 @@ index ac0264a452780..1cb030a738ca8 100644
contents_separator_ = contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>()); top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1164,18 +1185,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) @@ -1156,18 +1177,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
} }
BrowserView::~BrowserView() { BrowserView::~BrowserView() {
@ -506,7 +490,7 @@ index ac0264a452780..1cb030a738ca8 100644
tab_search_bubble_host_.reset(); tab_search_bubble_host_.reset();
@@ -1183,9 +1208,11 @@ BrowserView::~BrowserView() { @@ -1175,9 +1200,11 @@ BrowserView::~BrowserView() {
// tabstrip model and the browser frame. // tabstrip model and the browser frame.
top_controls_slide_controller_.reset(); top_controls_slide_controller_.reset();
@ -518,7 +502,7 @@ index ac0264a452780..1cb030a738ca8 100644
// Stop the animation timer explicitly here to avoid running it in a nested // Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor. // message loop, which may run by Browser destructor.
@@ -1194,17 +1221,18 @@ BrowserView::~BrowserView() { @@ -1186,17 +1213,18 @@ BrowserView::~BrowserView() {
// Immersive mode may need to reparent views before they are removed/deleted. // Immersive mode may need to reparent views before they are removed/deleted.
immersive_mode_controller_.reset(); immersive_mode_controller_.reset();
@ -541,7 +525,7 @@ index ac0264a452780..1cb030a738ca8 100644
// These are raw pointers to child views, so they need to be set to null // These are raw pointers to child views, so they need to be set to null
// before `RemoveAllChildViews()` is called to avoid dangling. // before `RemoveAllChildViews()` is called to avoid dangling.
@@ -1865,6 +1893,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { @@ -1897,6 +1925,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y()); ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
} }
@ -570,7 +554,7 @@ index ac0264a452780..1cb030a738ca8 100644
// static: // static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement( BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds, const gfx::Rect& contents_webview_bounds,
@@ -2300,7 +2350,13 @@ void BrowserView::OnExclusiveAccessUserInput() { @@ -2343,7 +2393,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const { bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel. // Immersive mode needs UI for the slide-down top panel.
@ -585,7 +569,7 @@ index ac0264a452780..1cb030a738ca8 100644
return false; return false;
} }
@@ -3527,6 +3583,9 @@ views::View* BrowserView::GetLensOverlayView() { @@ -3574,6 +3630,9 @@ views::View* BrowserView::GetLensOverlayView() {
} }
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -595,7 +579,7 @@ index ac0264a452780..1cb030a738ca8 100644
if (auto* download_controller = if (auto* download_controller =
browser_->GetFeatures().download_toolbar_ui_controller()) { browser_->GetFeatures().download_toolbar_ui_controller()) {
return download_controller->bubble_controller(); return download_controller->bubble_controller();
@@ -4216,7 +4275,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { @@ -4319,7 +4378,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
return; return;
} }
@ -605,7 +589,7 @@ index ac0264a452780..1cb030a738ca8 100644
top_container()->DestroyLayer(); top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0); AddChildViewAt(top_container(), 0);
EnsureFocusOrder(); EnsureFocusOrder();
@@ -4754,11 +4815,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) { @@ -4860,11 +4921,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling( bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child, gfx::NativeView child,
const gfx::Point& location) { const gfx::Point& location) {
@ -646,7 +630,7 @@ index ac0264a452780..1cb030a738ca8 100644
// Draggable regions are defined relative to the web contents. // Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location); gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(), views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4767,7 +4855,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( @@ -4873,7 +4961,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's // Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar. // owned widgets, for example alerts, permission prompts or find bar.
@ -655,7 +639,7 @@ index ac0264a452780..1cb030a738ca8 100644
point_in_contents_web_view_coords.x(), point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) || point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords); WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4999,8 +5087,11 @@ void BrowserView::Layout(PassKey) { @@ -5105,8 +5193,11 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code? // TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -668,7 +652,7 @@ index ac0264a452780..1cb030a738ca8 100644
// Some of the situations when the BrowserView is laid out are: // Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode. // - Enter/exit immersive fullscreen mode.
@@ -5067,6 +5158,12 @@ void BrowserView::AddedToWidget() { @@ -5173,6 +5264,12 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif #endif
@ -681,7 +665,7 @@ index ac0264a452780..1cb030a738ca8 100644
toolbar_->Init(); toolbar_->Init();
if (GetIsNormalType()) { if (GetIsNormalType()) {
@@ -5123,12 +5220,6 @@ void BrowserView::AddedToWidget() { @@ -5232,12 +5329,6 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder(); EnsureFocusOrder();
@ -694,7 +678,7 @@ index ac0264a452780..1cb030a738ca8 100644
if (download::IsDownloadBubbleEnabled()) { if (download::IsDownloadBubbleEnabled()) {
browser_->GetFeatures().download_toolbar_ui_controller()->Init(); browser_->GetFeatures().download_toolbar_ui_controller()->Init();
} }
@@ -5139,7 +5230,9 @@ void BrowserView::AddedToWidget() { @@ -5248,7 +5339,9 @@ void BrowserView::AddedToWidget() {
} }
frame_->OnBrowserViewInitViewsComplete(); frame_->OnBrowserViewInitViewsComplete();
@ -704,7 +688,7 @@ index ac0264a452780..1cb030a738ca8 100644
using_native_frame_ = frame_->ShouldUseNativeFrame(); using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip(); MaybeInitializeWebUITabStrip();
@@ -5556,7 +5649,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) { @@ -5670,7 +5763,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
// Undo our anti-jankiness hacks and force a re-layout. // Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false; in_process_fullscreen_ = false;
ToolbarSizeChanged(false); ToolbarSizeChanged(false);
@ -714,7 +698,7 @@ index ac0264a452780..1cb030a738ca8 100644
} }
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) { void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
@@ -6060,7 +6155,9 @@ Profile* BrowserView::GetProfile() { @@ -6182,7 +6277,9 @@ Profile* BrowserView::GetProfile() {
} }
void BrowserView::UpdateUIForTabFullscreen() { void BrowserView::UpdateUIForTabFullscreen() {
@ -724,7 +708,7 @@ index ac0264a452780..1cb030a738ca8 100644
} }
WebContents* BrowserView::GetWebContentsForExclusiveAccess() { WebContents* BrowserView::GetWebContentsForExclusiveAccess() {
@@ -6089,6 +6186,9 @@ bool BrowserView::CanUserEnterFullscreen() const { @@ -6211,6 +6308,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
} }
bool BrowserView::CanUserExitFullscreen() const { bool BrowserView::CanUserExitFullscreen() const {
@ -735,10 +719,10 @@ index ac0264a452780..1cb030a738ca8 100644
} }
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 7a2f7b5d43762..ef55ed7e6cd43 100644 index 8a06d49d2abe1..7874429a9a090 100644
--- chrome/browser/ui/views/frame/browser_view.h --- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h
@@ -144,11 +144,16 @@ class BrowserView : public BrowserWindow, @@ -148,11 +148,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView) METADATA_HEADER(BrowserView, views::ClientView)
public: public:
@ -755,7 +739,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 100644
void set_frame(BrowserFrame* frame) { void set_frame(BrowserFrame* frame) {
frame_ = frame; frame_ = frame;
paint_as_active_subscription_ = paint_as_active_subscription_ =
@@ -911,6 +916,10 @@ class BrowserView : public BrowserWindow, @@ -938,6 +943,10 @@ class BrowserView : public BrowserWindow,
void Copy(); void Copy();
void Paste(); void Paste();
@ -766,7 +750,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 100644
protected: protected:
// Enumerates where the devtools are docked relative to the browser's main // Enumerates where the devtools are docked relative to the browser's main
// web contents. // web contents.
@@ -934,6 +943,8 @@ class BrowserView : public BrowserWindow, @@ -961,6 +970,8 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds, const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds); const gfx::Rect& local_webview_container_bounds);
@ -776,7 +760,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable. // 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 diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index 7cfadb577326f..5d97370b499c7 100644 index 39fc0f21ff96c..4b575fd3877d5 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc --- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -53,6 +53,10 @@ @@ -53,6 +53,10 @@
@ -833,7 +817,7 @@ index 7cfadb577326f..5d97370b499c7 100644
// Add/remove observer. // Add/remove observer.
void AddObserver(ModalDialogHostObserver* observer) override { void AddObserver(ModalDialogHostObserver* observer) override {
observer_list_.AddObserver(observer); observer_list_.AddObserver(observer);
@@ -362,6 +377,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) { @@ -361,6 +376,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
exclusive_access_bubble->RepositionIfVisible(); exclusive_access_bubble->RepositionIfVisible();
} }
@ -842,7 +826,7 @@ index 7cfadb577326f..5d97370b499c7 100644
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed. // Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()), const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
dialog_host_->GetMaximumDialogSize()); dialog_host_->GetMaximumDialogSize());
@@ -375,6 +392,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) { @@ -374,6 +391,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen; latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
dialog_host_->NotifyPositionRequiresUpdate(); dialog_host_->NotifyPositionRequiresUpdate();
} }
@ -850,7 +834,7 @@ index 7cfadb577326f..5d97370b499c7 100644
} }
gfx::Size BrowserViewLayout::GetPreferredSize( gfx::Size BrowserViewLayout::GetPreferredSize(
@@ -511,6 +529,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { @@ -510,6 +528,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) { int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -865,19 +849,19 @@ index 7cfadb577326f..5d97370b499c7 100644
bool toolbar_visible = delegate_->IsToolbarVisible(); bool toolbar_visible = delegate_->IsToolbarVisible();
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0; int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
diff --git chrome/browser/ui/views/frame/browser_view_layout.h chrome/browser/ui/views/frame/browser_view_layout.h diff --git chrome/browser/ui/views/frame/browser_view_layout.h chrome/browser/ui/views/frame/browser_view_layout.h
index bab68486e2005..5e988918b9553 100644 index a4602bd1f5d01..1c0435c03d323 100644
--- chrome/browser/ui/views/frame/browser_view_layout.h --- chrome/browser/ui/views/frame/browser_view_layout.h
+++ chrome/browser/ui/views/frame/browser_view_layout.h +++ chrome/browser/ui/views/frame/browser_view_layout.h
@@ -86,6 +86,8 @@ class BrowserViewLayout : public views::LayoutManager { @@ -87,6 +87,8 @@ class BrowserViewLayout : public views::LayoutManager {
contents_border_widget_ = contents_border_widget;
} }
views::Widget* contents_border_widget() { return contents_border_widget_; }
+ void reset_toolbar() { toolbar_ = nullptr; } + void reset_toolbar() { toolbar_ = nullptr; }
+ +
views::Widget* contents_border_widget() { return contents_border_widget_; } void SetUseBrowserContentMinimumSize(bool use_browser_content_minimum_size);
// Sets the bounds for the contents border. // Sets the bounds for the contents border.
@@ -176,7 +178,7 @@ class BrowserViewLayout : public views::LayoutManager { @@ -174,7 +176,7 @@ class BrowserViewLayout : public views::LayoutManager {
const raw_ptr<WebAppFrameToolbarView> web_app_frame_toolbar_; const raw_ptr<WebAppFrameToolbarView> web_app_frame_toolbar_;
const raw_ptr<views::Label> web_app_window_title_; const raw_ptr<views::Label> web_app_window_title_;
const raw_ptr<TabStripRegionView> tab_strip_region_view_; const raw_ptr<TabStripRegionView> tab_strip_region_view_;
@ -887,7 +871,7 @@ index bab68486e2005..5e988918b9553 100644
const raw_ptr<views::View> contents_container_; const raw_ptr<views::View> contents_container_;
const raw_ptr<views::View> left_aligned_side_panel_separator_; const raw_ptr<views::View> left_aligned_side_panel_separator_;
diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h
index 451c5ad63337b..66f946c95b9b4 100644 index 9f393a42d1655..8597a655c4fac 100644
--- chrome/browser/ui/views/frame/browser_view_layout_delegate.h --- chrome/browser/ui/views/frame/browser_view_layout_delegate.h
+++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h +++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h
@@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate { @@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate {
@ -899,10 +883,10 @@ index 451c5ad63337b..66f946c95b9b4 100644
virtual bool IsBookmarkBarVisible() const = 0; virtual bool IsBookmarkBarVisible() const = 0;
virtual bool IsContentsSeparatorEnabled() const = 0; virtual bool IsContentsSeparatorEnabled() const = 0;
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
index 09de746cc67e4..6ddb95a4de303 100644 index d80ac44127421..f09f382e24344 100644
--- chrome/browser/ui/views/frame/contents_web_view.cc --- chrome/browser/ui/views/frame/contents_web_view.cc
+++ chrome/browser/ui/views/frame/contents_web_view.cc +++ chrome/browser/ui/views/frame/contents_web_view.cc
@@ -33,6 +33,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context) @@ -35,6 +35,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
status_bubble_ = std::make_unique<StatusBubbleViews>(this); status_bubble_ = std::make_unique<StatusBubbleViews>(this);
status_bubble_->Reposition(); status_bubble_->Reposition();
web_contents_close_handler_ = std::make_unique<WebContentsCloseHandler>(this); web_contents_close_handler_ = std::make_unique<WebContentsCloseHandler>(this);
@ -916,13 +900,13 @@ index 09de746cc67e4..6ddb95a4de303 100644
ContentsWebView::~ContentsWebView() = default; ContentsWebView::~ContentsWebView() = default;
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 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 aacb186656d41..6987958bb6674 100644 index 919f2496b089d..f541e3836f4fd 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
+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
@@ -650,6 +650,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( @@ -605,6 +605,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame_background_ = std::make_unique<views::FrameBackground>(); auto_pip_setting_overlay_ =
AddChildView(std::move(auto_pip_setting_overlay));
} }
#endif
+ +
+ if (!browser_view->browser()->SupportsWindowFeature( + if (!browser_view->browser()->SupportsWindowFeature(
+ Browser::FEATURE_TITLEBAR)) { + Browser::FEATURE_TITLEBAR)) {
@ -931,7 +915,7 @@ index aacb186656d41..6987958bb6674 100644
} }
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() { PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -783,18 +788,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( @@ -738,18 +743,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest( int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) { const gfx::Point& point) {
@ -982,7 +966,7 @@ index aacb186656d41..6987958bb6674 100644
// Allow dragging and resizing the window. // Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame( int window_component = GetHTComponentForFrame(
@@ -868,7 +897,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { @@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
gfx::Rect content_area = GetLocalBounds(); gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets()); content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area; gfx::Rect top_bar = content_area;
@ -992,7 +976,7 @@ index aacb186656d41..6987958bb6674 100644
top_bar_container_view_->SetBoundsRect(top_bar); top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) { if (auto_pip_setting_overlay_) {
@@ -1418,7 +1448,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { @@ -1280,7 +1310,8 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const {
} }
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const { int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@ -1017,7 +1001,7 @@ index 33c6444869375..d74818698d81a 100644
LocationBarView* location_bar_view = browser_view_->GetLocationBarView(); LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view); 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 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 c0d519f033713..6df5e004f43d2 100644 index 20c0861c46610..8cd44c0d95a17 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -109,6 +109,14 @@ void PageActionIconController::Init(const PageActionIconParams& params, @@ -109,6 +109,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@ -1036,10 +1020,10 @@ index c0d519f033713..6df5e004f43d2 100644
case PageActionIconType::kPaymentsOfferNotification: case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon( 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 diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 9454a78b72cc3..e3aab475b2465 100644 index 6083cd2c41420..1da3e7881016d 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -698,29 +698,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( @@ -720,29 +720,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
} }
bool BrowserTabStripController::IsFrameCondensed() const { bool BrowserTabStripController::IsFrameCondensed() const {
@ -1082,10 +1066,10 @@ index 9454a78b72cc3..e3aab475b2465 100644
} }
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index af3d65c89950b..f04c923a37be9 100644 index ab1b0d88b5a37..4e776a93ee8e2 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc --- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -185,7 +185,7 @@ class TabstripLikeBackground : public views::Background { @@ -187,7 +187,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override { void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view, bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_); browser_view_);
@ -1094,7 +1078,7 @@ index af3d65c89950b..f04c923a37be9 100644
SkColor frame_color = SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor( browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent); BrowserFrameActiveState::kUseCurrent);
@@ -219,12 +219,13 @@ END_METADATA @@ -221,12 +221,13 @@ END_METADATA
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId); DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId); DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId);
@ -1110,7 +1094,7 @@ index af3d65c89950b..f04c923a37be9 100644
SetID(VIEW_ID_TOOLBAR); SetID(VIEW_ID_TOOLBAR);
SetProperty(views::kElementIdentifierKey, kToolbarElementId); SetProperty(views::kElementIdentifierKey, kToolbarElementId);
@@ -256,9 +257,24 @@ ToolbarView::~ToolbarView() { @@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
for (const auto& view_and_command : GetViewCommandMap()) { for (const auto& view_and_command : GetViewCommandMap()) {
chrome::RemoveCommandObserver(browser_, view_and_command.second, this); chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
} }
@ -1135,7 +1119,7 @@ index af3d65c89950b..f04c923a37be9 100644
#if defined(USE_AURA) #if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this // Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this // function returns. The occlusion status will be computed only once once this
@@ -281,7 +297,7 @@ void ToolbarView::Init() { @@ -283,7 +299,7 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>( auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this, browser_, browser_->profile(), browser_->command_controller(), this,
@ -1144,7 +1128,7 @@ index af3d65c89950b..f04c923a37be9 100644
// Make sure the toolbar shows by default. // Make sure the toolbar shows by default.
size_animation_.Reset(1); size_animation_.Reset(1);
@@ -350,7 +366,8 @@ void ToolbarView::Init() { @@ -356,7 +372,8 @@ void ToolbarView::Init() {
} }
std::unique_ptr<media_router::CastToolbarButton> cast; std::unique_ptr<media_router::CastToolbarButton> cast;
if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) { if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) {
@ -1154,7 +1138,7 @@ index af3d65c89950b..f04c923a37be9 100644
cast = media_router::CastToolbarButton::Create(browser_); cast = media_router::CastToolbarButton::Create(browser_);
} }
} }
@@ -814,7 +831,8 @@ void ToolbarView::Layout(PassKey) { @@ -821,7 +838,8 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) { if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon(); LayoutCommon();
@ -1165,7 +1149,7 @@ index af3d65c89950b..f04c923a37be9 100644
if (toolbar_controller_) { if (toolbar_controller_) {
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index ed47967198d0a..681d20ade8433 100644 index b34fdea7f98b4..58e65bb7aff07 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h --- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -97,7 +97,8 @@ class ToolbarView : public views::AccessiblePaneView, @@ -97,7 +97,8 @@ class ToolbarView : public views::AccessiblePaneView,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
index 845dc1067447c..7927dd29fac6f 100644 index 944ce2e3bfaea..6db63a7858b0e 100644
--- chrome/browser/ui/views/sad_tab_view.cc --- chrome/browser/ui/views/sad_tab_view.cc
+++ chrome/browser/ui/views/sad_tab_view.cc +++ chrome/browser/ui/views/sad_tab_view.cc
@@ -707,6 +707,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) { @@ -707,6 +707,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {

View File

@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index a10ce7680779f..df174ce52288b 100644 index dbd35f1300604..1c890c637d852 100644
--- content/browser/devtools/devtools_instrumentation.h --- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h
@@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides(

View File

@ -12,7 +12,7 @@ index a28237bf93ef4..9a01b185e76f4 100644
version.Set("V8-Version", V8_VERSION_STRING); version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host"); std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 085e9a60031ea..15e8ba49573e9 100644 index a65b70e7ac2e1..9b11bf620cdbd 100644
--- content/browser/loader/navigation_url_loader_impl.cc --- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc
@@ -978,7 +978,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( @@ -978,7 +978,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@ -47,10 +47,10 @@ index 085e9a60031ea..15e8ba49573e9 100644
return std::make_pair( return std::make_pair(
/*is_cacheable=*/false, /*is_cacheable=*/false,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index 47750f538148c..3260524e74306 100644 index 9c36ad70531bd..3546f7f9faf4e 100644
--- content/public/browser/content_browser_client.cc --- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc
@@ -1181,7 +1181,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( @@ -1180,7 +1180,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated( void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {} network::mojom::NetworkService* network_service) {}
@ -59,7 +59,7 @@ index 47750f538148c..3260524e74306 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -1190,6 +1190,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( @@ -1189,6 +1189,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) { cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en"; network_context_params->accept_language = "en-us,en";
@ -68,10 +68,10 @@ index 47750f538148c..3260524e74306 100644
std::vector<base::FilePath> std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index b7864a93b53a3..5b6174340e2cc 100644 index f1fee091b84ae..8c9feee790c91 100644
--- content/public/browser/content_browser_client.h --- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h
@@ -1379,6 +1379,12 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -1381,6 +1381,12 @@ class CONTENT_EXPORT ContentBrowserClient {
bool opener_suppressed, bool opener_suppressed,
bool* no_javascript_access); bool* no_javascript_access);
@ -84,7 +84,7 @@ index b7864a93b53a3..5b6174340e2cc 100644
// Allows the embedder to return a delegate for the SpeechRecognitionManager. // Allows the embedder to return a delegate for the SpeechRecognitionManager.
// The delegate will be owned by the manager. It's valid to return nullptr. // The delegate will be owned by the manager. It's valid to return nullptr.
virtual SpeechRecognitionManagerDelegate* virtual SpeechRecognitionManagerDelegate*
@@ -2230,7 +2236,7 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2226,7 +2232,7 @@ class CONTENT_EXPORT ContentBrowserClient {
// //
// If |relative_partition_path| is the empty string, it means this needs to // If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext. // create the default NetworkContext for the BrowserContext.
@ -93,7 +93,7 @@ index b7864a93b53a3..5b6174340e2cc 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -2472,6 +2478,22 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2468,6 +2474,22 @@ class CONTENT_EXPORT ContentBrowserClient {
const net::IsolationInfo& isolation_info, const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory); mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -116,7 +116,7 @@ index b7864a93b53a3..5b6174340e2cc 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture. // 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 window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow. // This will return a new OverlayWindow.
@@ -2537,6 +2559,10 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2533,6 +2555,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string. // Used as part of the user agent string.
virtual std::string GetProduct(); virtual std::string GetProduct();
@ -166,10 +166,10 @@ index 0a5556cb6eac8..cecc0ae19bc62 100644
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
base::Unretained(this))); base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index c1d1c8a094a91..0978d3dba378f 100644 index 5747f94527887..d54aeac829007 100644
--- content/renderer/renderer_blink_platform_impl.cc --- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc
@@ -1051,6 +1051,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { @@ -1049,6 +1049,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -186,10 +186,10 @@ index c1d1c8a094a91..0978d3dba378f 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>(); return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index ce5aee7746ba0..082fdfaab60de 100644 index 206b8df48273a..e10852779c209 100644
--- content/renderer/renderer_blink_platform_impl.h --- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h
@@ -251,6 +251,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -250,6 +250,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override; InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
@ -200,10 +200,10 @@ index ce5aee7746ba0..082fdfaab60de 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin. // plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite(); void SetIsLockedToSite();
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
index 0ac15538441aa..cc0f42fc3ebbd 100644 index 3993da6d53843..78784b4dd8842 100644
--- content/shell/browser/shell_content_browser_client.cc --- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc +++ content/shell/browser/shell_content_browser_client.cc
@@ -816,7 +816,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( @@ -820,7 +820,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
#endif #endif
} }
@ -212,7 +212,7 @@ index 0ac15538441aa..cc0f42fc3ebbd 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -825,6 +825,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( @@ -829,6 +829,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) { cert_verifier_creation_params) {
ConfigureNetworkContextParamsForShell(context, network_context_params, ConfigureNetworkContextParamsForShell(context, network_context_params,
cert_verifier_creation_params); cert_verifier_creation_params);
@ -221,10 +221,10 @@ index 0ac15538441aa..cc0f42fc3ebbd 100644
std::vector<base::FilePath> std::vector<base::FilePath>
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
index 0a99e5b919cd0..4d6f04fbbfd6e 100644 index 29f0d888bcc9a..d870ed9844bb7 100644
--- content/shell/browser/shell_content_browser_client.h --- content/shell/browser/shell_content_browser_client.h
+++ content/shell/browser/shell_content_browser_client.h +++ content/shell/browser/shell_content_browser_client.h
@@ -160,7 +160,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { @@ -161,7 +161,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
GetGeolocationSystemPermissionManager() override; GetGeolocationSystemPermissionManager() override;
void OnNetworkServiceCreated( void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override; network::mojom::NetworkService* network_service) override;

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc
index 4ec9c72f01480..7b033e2f9db11 100644 index 100eea6a4d7f3..fecc3a95130d7 100644
--- content/browser/renderer_host/navigation_policy_container_builder.cc --- content/browser/renderer_host/navigation_policy_container_builder.cc
+++ content/browser/renderer_host/navigation_policy_container_builder.cc +++ content/browser/renderer_host/navigation_policy_container_builder.cc
@@ -45,7 +45,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies( @@ -45,7 +45,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies(

View File

@ -108,7 +108,7 @@ index ffc5c37742800..82e1c22b0f073 100644
} }
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index e81e89be0e190..a369b2086fa22 100644 index 24f6f89cfa430..da28867d34ef5 100644
--- content/app/content_main_runner_impl.cc --- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc
@@ -50,6 +50,7 @@ @@ -50,6 +50,7 @@
@ -119,7 +119,7 @@ index e81e89be0e190..a369b2086fa22 100644
#include "base/time/time.h" #include "base/time/time.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "build/branding_buildflags.h" #include "build/branding_buildflags.h"
@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() { @@ -1340,6 +1341,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true; is_shutdown_ = true;
} }

View File

@ -398,10 +398,10 @@ index 42fe73aefe44f..9f150e30336ef 100644
handler_path, *database_path, metrics_path, url, handler_path, *database_path, metrics_path, url,
GetProcessSimpleAnnotations(), arguments, true, false); GetProcessSimpleAnnotations(), arguments, true, false);
diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc
index 0e00d26f79231..fdd2b4bc73f8e 100644 index 5b811cbbc5154..e35f8f663b92e 100644
--- components/crash/core/app/crashpad_win.cc --- components/crash/core/app/crashpad_win.cc
+++ components/crash/core/app/crashpad_win.cc +++ components/crash/core/app/crashpad_win.cc
@@ -37,8 +37,8 @@ void GetPlatformCrashpadAnnotations( @@ -38,8 +38,8 @@ void GetPlatformCrashpadAnnotations(
std::wstring product_name, version, special_build, channel_name; std::wstring product_name, version, special_build, channel_name;
crash_reporter_client->GetProductNameAndVersion( crash_reporter_client->GetProductNameAndVersion(
exe_file, &product_name, &version, &special_build, &channel_name); exe_file, &product_name, &version, &special_build, &channel_name);
@ -412,7 +412,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Empty means stable. // Empty means stable.
const bool allow_empty_channel = true; const bool allow_empty_channel = true;
@@ -55,9 +55,11 @@ void GetPlatformCrashpadAnnotations( @@ -56,9 +56,11 @@ void GetPlatformCrashpadAnnotations(
if (!special_build.empty()) if (!special_build.empty())
(*annotations)["special"] = base::WideToUTF8(special_build); (*annotations)["special"] = base::WideToUTF8(special_build);
#if defined(ARCH_CPU_X86) #if defined(ARCH_CPU_X86)
@ -426,29 +426,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
#endif #endif
} }
@@ -72,7 +74,9 @@ bool PlatformCrashpadInitialization( @@ -112,13 +114,14 @@ bool PlatformCrashpadInitialization(
base::FilePath metrics_path; // Only valid in the browser process.
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
+#if defined(GOOGLE_CHROME_BUILD)
const char kServerUrlVar[] = "CHROME_CRASHPAD_SERVER_URL";
+#endif
std::unique_ptr<base::Environment> env(base::Environment::Create());
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
@@ -95,9 +99,11 @@ bool PlatformCrashpadInitialization(
std::string url = crash_reporter_client->GetUploadUrl();
+#if defined(GOOGLE_CHROME_BUILD)
// Allow the crash server to be overridden for testing. If the variable
// isn't present in the environment then the default URL will remain.
env->GetVar(kServerUrlVar, &url);
+#endif
base::FilePath exe_file(exe_path);
if (exe_file.empty()) {
@@ -108,13 +114,14 @@ bool PlatformCrashpadInitialization(
exe_file = base::FilePath(exe_file_path); exe_file = base::FilePath(exe_file_path);
} }
@ -468,7 +446,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
if (!user_data_dir.empty()) { if (!user_data_dir.empty()) {
start_arguments.push_back(std::string("--user-data-dir=") + start_arguments.push_back(std::string("--user-data-dir=") +
user_data_dir); user_data_dir);
@@ -124,9 +131,12 @@ bool PlatformCrashpadInitialization( @@ -128,9 +131,12 @@ bool PlatformCrashpadInitialization(
app_launch_prefetch::SubprocessType::kCrashpad))); app_launch_prefetch::SubprocessType::kCrashpad)));
} else { } else {
base::FilePath exe_dir = exe_file.DirName(); base::FilePath exe_dir = exe_file.DirName();

View File

@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index 941788ea3ea81..c98e054107123 100644 index 47abbd2835a36..4eb995232a7d8 100644
--- components/embedder_support/user_agent_utils.cc --- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@

View File

@ -1,18 +1,18 @@
diff --git .gn .gn diff --git .gn .gn
index 54d2631ec2032..b5bc7d4e97a91 100644 index ae58a0b0a64ae..35e01ee64e5d7 100644
--- .gn --- .gn
+++ .gn +++ .gn
@@ -159,6 +159,8 @@ exec_script_allowlist = @@ -156,6 +156,8 @@ exec_script_allowlist =
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", # in the Chromium repo outside of //build.
"//chrome/version.gni", "//build_overrides/build.gni",
+ "//cef/BUILD.gn", + "//cef/BUILD.gn",
+ +
# TODO(dgn): Layer violation but breaks the build otherwise, see "//chrome/version.gni",
# https://crbug.com/474506.
"//clank/java/BUILD.gn", "//google_apis/BUILD.gn",
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index f7307e92c4e94..8d4a80cef7997 100644 index c0a9639d27232..e1cfab3d24c4f 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/ui.gni") @@ -19,6 +19,7 @@ import("//build/config/ui.gni")
@ -78,7 +78,7 @@ index bd41166938952..fba7843d79796 100644
visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ] visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ]
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index f9741697fdc82..f956cc3421255 100644 index 845b473d56165..d1ffe4a9e54b1 100644
--- chrome/chrome_paks.gni --- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni +++ chrome/chrome_paks.gni
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -89,7 +89,7 @@ index f9741697fdc82..f956cc3421255 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/compose/features.gni") import("//components/compose/features.gni")
@@ -478,6 +479,11 @@ template("chrome_extra_paks") { @@ -479,6 +480,11 @@ template("chrome_extra_paks") {
deps += [ "//components/headless/command_handler" ] deps += [ "//components/headless/command_handler" ]
} }

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 2f5be98233528..283bf667b3fa9 100644 index 342b54311138a..037a8da0884ec 100644
--- tools/gritsettings/resource_ids.spec --- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec
@@ -1504,11 +1504,18 @@ @@ -1508,11 +1508,18 @@
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": { "<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
"META": {"sizes": {"messages": [2000],}}, "META": {"sizes": {"messages": [2000],}},
"messages": [10080], "messages": [10080],

View File

@ -1,8 +1,8 @@
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
index 73c974cc34aba..2249501a1e0ad 100644 index ca67bf2efd14f..762013992a988 100644
--- third_party/libxml/BUILD.gn --- third_party/libxml/BUILD.gn
+++ third_party/libxml/BUILD.gn +++ third_party/libxml/BUILD.gn
@@ -140,6 +140,7 @@ static_library("libxml") { @@ -142,6 +142,7 @@ static_library("libxml") {
":libxml_utils", ":libxml_utils",
":xml_reader", ":xml_reader",
":xml_writer", ":xml_writer",

View File

@ -32,10 +32,10 @@ index daecebb507070..aed51c2e6b06e 100644
return (dark_mode_support.allow_dark_mode_for_app || return (dark_mode_support.allow_dark_mode_for_app ||
dark_mode_support.set_preferred_app_mode) && dark_mode_support.set_preferred_app_mode) &&
diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
index 963360a3247e1..18e6a1db9a73e 100644 index 8eca0f15ad724..214eb82df050d 100644
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc --- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -56,7 +56,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { @@ -58,7 +58,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
ui::CursorFactory::GetInstance()->ObserveThemeChanges(); ui::CursorFactory::GetInstance()->ObserveThemeChanges();
} }
#if BUILDFLAG(USE_DBUS) #if BUILDFLAG(USE_DBUS)
@ -129,10 +129,10 @@ index e41728dd81663..a6396a778cae6 100644
theme->NotifyOnNativeThemeUpdated(); theme->NotifyOnNativeThemeUpdated();
}]; }];
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
index dcf2d14d92f8b..ec99022b1f2ae 100644 index 0c6d689295a03..dd63350a153c5 100644
--- ui/native_theme/native_theme_win.cc --- ui/native_theme/native_theme_win.cc
+++ ui/native_theme/native_theme_win.cc +++ ui/native_theme/native_theme_win.cc
@@ -693,7 +693,10 @@ bool NativeThemeWin::ShouldUseDarkColors() const { @@ -694,7 +694,10 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// Windows high contrast modes are entirely different themes, // Windows high contrast modes are entirely different themes,
// so let them take priority over dark mode. // so let them take priority over dark mode.
// ...unless --force-dark-mode was specified in which case caveat emptor. // ...unless --force-dark-mode was specified in which case caveat emptor.
@ -144,7 +144,7 @@ index dcf2d14d92f8b..ec99022b1f2ae 100644
return false; return false;
} }
return NativeTheme::ShouldUseDarkColors(); return NativeTheme::ShouldUseDarkColors();
@@ -701,7 +704,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const { @@ -702,7 +705,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
NativeTheme::PreferredColorScheme NativeTheme::PreferredColorScheme
NativeThemeWin::CalculatePreferredColorScheme() const { NativeThemeWin::CalculatePreferredColorScheme() const {
@ -153,7 +153,7 @@ index dcf2d14d92f8b..ec99022b1f2ae 100644
return NativeTheme::CalculatePreferredColorScheme(); return NativeTheme::CalculatePreferredColorScheme();
} }
@@ -1687,9 +1690,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() { @@ -1688,9 +1691,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
} }
void NativeThemeWin::UpdateDarkModeStatus() { void NativeThemeWin::UpdateDarkModeStatus() {

View File

@ -12,10 +12,10 @@ index add20a2f81d66..97071092ff768 100644
base::File file(exe_dir.Append(path), base::File file(exe_dir.Append(path),
base::File::FLAG_OPEN | base::File::FLAG_READ); base::File::FLAG_OPEN | base::File::FLAG_READ);
diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc
index cdabcf3e5b2c7..2a12480efb68c 100644 index f3a6d25be41ed..c826aa9e9ab6c 100644
--- sandbox/linux/suid/client/setuid_sandbox_host.cc --- sandbox/linux/suid/client/setuid_sandbox_host.cc
+++ sandbox/linux/suid/client/setuid_sandbox_host.cc +++ sandbox/linux/suid/client/setuid_sandbox_host.cc
@@ -125,7 +125,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { @@ -131,7 +131,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() {
base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() { base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() {
base::FilePath sandbox_binary; base::FilePath sandbox_binary;
base::FilePath exe_dir; base::FilePath exe_dir;

View File

@ -1,8 +1,8 @@
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
index 6207f4941839f..11d359dcab78c 100644 index 30440d1b5ba07..c16bda68afbd2 100644
--- ui/accessibility/platform/BUILD.gn --- ui/accessibility/platform/BUILD.gn
+++ ui/accessibility/platform/BUILD.gn +++ ui/accessibility/platform/BUILD.gn
@@ -354,6 +354,10 @@ component("platform") { @@ -355,6 +355,10 @@ component("platform") {
if (use_gio) { if (use_gio) {
configs += [ "//build/linux:gio_config" ] configs += [ "//build/linux:gio_config" ]
} }
@ -14,10 +14,10 @@ index 6207f4941839f..11d359dcab78c 100644
} }
} }
diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn
index 80e8ba9452862..77272e01247a8 100644 index 539cc383b43be..574a7a48787fe 100644
--- ui/gtk/BUILD.gn --- ui/gtk/BUILD.gn
+++ ui/gtk/BUILD.gn +++ ui/gtk/BUILD.gn
@@ -174,4 +174,8 @@ component("gtk") { @@ -173,4 +173,8 @@ component("gtk") {
# TODO: This should be removed. # TODO: This should be removed.
deps += [ "//ui/ozone" ] deps += [ "//ui/ozone" ]

View File

@ -1,5 +1,5 @@
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
index aba9091667b74..6921c64b60cad 100644 index 95bdbe6ae04af..913719635a342 100644
--- ui/gtk/gtk_ui.cc --- ui/gtk/gtk_ui.cc
+++ ui/gtk/gtk_ui.cc +++ ui/gtk/gtk_ui.cc
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
@ -27,10 +27,10 @@ index aba9091667b74..6921c64b60cad 100644
&GtkUi::OnCursorThemeNameChanged); &GtkUi::OnCursorThemeNameChanged);
connect(settings, "notify::gtk-cursor-theme-size", connect(settings, "notify::gtk-cursor-theme-size",
diff --git ui/ozone/platform/x11/ozone_platform_x11.cc ui/ozone/platform/x11/ozone_platform_x11.cc diff --git ui/ozone/platform/x11/ozone_platform_x11.cc ui/ozone/platform/x11/ozone_platform_x11.cc
index 35023e37a34bb..c466ba7f3c251 100644 index 14a38b11d595c..84174ea74f7d2 100644
--- ui/ozone/platform/x11/ozone_platform_x11.cc --- ui/ozone/platform/x11/ozone_platform_x11.cc
+++ ui/ozone/platform/x11/ozone_platform_x11.cc +++ ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -65,6 +65,8 @@ namespace ui { @@ -64,6 +64,8 @@ namespace ui {
namespace { namespace {
@ -39,7 +39,7 @@ index 35023e37a34bb..c466ba7f3c251 100644
// Singleton OzonePlatform implementation for X11 platform. // Singleton OzonePlatform implementation for X11 platform.
class OzonePlatformX11 : public OzonePlatform, class OzonePlatformX11 : public OzonePlatform,
public OSExchangeDataProviderFactoryOzone { public OSExchangeDataProviderFactoryOzone {
@@ -266,7 +268,15 @@ class OzonePlatformX11 : public OzonePlatform, @@ -265,7 +267,15 @@ class OzonePlatformX11 : public OzonePlatform,
TouchFactory::SetTouchDeviceListFromCommandLine(); TouchFactory::SetTouchDeviceListFromCommandLine();
#if BUILDFLAG(USE_GTK) #if BUILDFLAG(USE_GTK)
@ -56,7 +56,7 @@ index 35023e37a34bb..c466ba7f3c251 100644
#endif #endif
menu_utils_ = std::make_unique<X11MenuUtils>(); menu_utils_ = std::make_unique<X11MenuUtils>();
@@ -361,4 +371,8 @@ OzonePlatform* CreateOzonePlatformX11() { @@ -364,4 +374,8 @@ OzonePlatform* CreateOzonePlatformX11() {
return new OzonePlatformX11; return new OzonePlatformX11;
} }

View File

@ -1,8 +1,8 @@
diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc
index fa55d2a1c5f42..9eaf306672220 100644 index 1bf52330b555e..5659403e4d4f5 100644
--- printing/printing_context_linux.cc --- printing/printing_context_linux.cc
+++ printing/printing_context_linux.cc +++ printing/printing_context_linux.cc
@@ -67,11 +67,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { @@ -70,11 +70,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
ResetSettings(); ResetSettings();
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -16,7 +16,7 @@ index fa55d2a1c5f42..9eaf306672220 100644
if (print_dialog_) { if (print_dialog_) {
print_dialog_->UseDefaultSettings(); print_dialog_->UseDefaultSettings();
@@ -83,8 +83,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { @@ -86,8 +86,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -27,7 +27,7 @@ index fa55d2a1c5f42..9eaf306672220 100644
#endif #endif
return gfx::Size(); return gfx::Size();
@@ -96,11 +96,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings( @@ -99,11 +99,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
DCHECK(!in_print_job_); DCHECK(!in_print_job_);
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -100,7 +100,7 @@ index 3ab395e3b0b45..c012641a5dc7e 100644
} }
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
index 15db1bd5271cd..cb2d4090c7655 100644 index 4ce8218e5d809..908397b968415 100644
--- ui/linux/linux_ui.h --- ui/linux/linux_ui.h
+++ ui/linux/linux_ui.h +++ ui/linux/linux_ui.h
@@ -20,6 +20,10 @@ @@ -20,6 +20,10 @@

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 541f4be99633e..bbfda1b3d9b59 100644 index 83d21fd2cf3ab..00dc68165c4ee 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1231,8 +1231,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { @@ -745,8 +745,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint()) ->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area(); .work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom(); int available_space = screen_space.bottom() - anchor_rect.bottom();

View File

@ -1,5 +1,5 @@
diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 22ee05153569d..e957efa72066d 100644 index a6b6917ee2c02..3033900be5c83 100644
--- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm --- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -172,6 +172,13 @@ void ExtractUnderlines(NSAttributedString* string, @@ -172,6 +172,13 @@ void ExtractUnderlines(NSAttributedString* string,

View File

@ -30,7 +30,7 @@ index 1a263dc22f472..09fa613e35649 100644
} }
if (has_msg) { if (has_msg) {
diff --git base/task/current_thread.cc base/task/current_thread.cc diff --git base/task/current_thread.cc base/task/current_thread.cc
index 024422b65775b..773d856dff353 100644 index 53a6213a76b92..2177265e9b1b2 100644
--- base/task/current_thread.cc --- base/task/current_thread.cc
+++ base/task/current_thread.cc +++ base/task/current_thread.cc
@@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver( @@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver(
@ -43,7 +43,7 @@ index 024422b65775b..773d856dff353 100644
current_->RemoveDestructionObserver(destruction_observer); current_->RemoveDestructionObserver(destruction_observer);
} }
diff --git base/task/current_thread.h base/task/current_thread.h diff --git base/task/current_thread.h base/task/current_thread.h
index c44d2c1417f8d..6d4c218185c65 100644 index b6e265e2d7628..d072fae0fd588 100644
--- base/task/current_thread.h --- base/task/current_thread.h
+++ base/task/current_thread.h +++ base/task/current_thread.h
@@ -165,6 +165,12 @@ class BASE_EXPORT CurrentThread { @@ -165,6 +165,12 @@ class BASE_EXPORT CurrentThread {

View File

@ -101,7 +101,7 @@ index 332ab5c181ec5..d4ccf2e023cd3 100644
bool enforce_errors_from_incoming_receiver_ = true; bool enforce_errors_from_incoming_receiver_ = true;
diff --git mojo/public/cpp/bindings/interface_endpoint_client.h mojo/public/cpp/bindings/interface_endpoint_client.h diff --git mojo/public/cpp/bindings/interface_endpoint_client.h mojo/public/cpp/bindings/interface_endpoint_client.h
index 2d796cec6e42e..dc2c0667afec9 100644 index f683feadb176d..e67b8b41d4efe 100644
--- mojo/public/cpp/bindings/interface_endpoint_client.h --- mojo/public/cpp/bindings/interface_endpoint_client.h
+++ mojo/public/cpp/bindings/interface_endpoint_client.h +++ mojo/public/cpp/bindings/interface_endpoint_client.h
@@ -77,6 +77,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient @@ -77,6 +77,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
@ -128,7 +128,7 @@ index 2d796cec6e42e..dc2c0667afec9 100644
} }
// Returns true if an error was encountered. // Returns true if an error was encountered.
@@ -155,7 +165,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient @@ -156,7 +166,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
// NOTE: |message| must have passed message header validation. // NOTE: |message| must have passed message header validation.
bool HandleIncomingMessage(Message* message); bool HandleIncomingMessage(Message* message);
@ -138,7 +138,7 @@ index 2d796cec6e42e..dc2c0667afec9 100644
// The following methods send interface control messages. // The following methods send interface control messages.
// They must only be called when the handle is not in pending association // They must only be called when the handle is not in pending association
@@ -345,6 +356,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient @@ -346,6 +357,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
base::OnceClosure error_handler_; base::OnceClosure error_handler_;
ConnectionErrorWithReasonCallback error_with_reason_handler_; ConnectionErrorWithReasonCallback error_with_reason_handler_;
@ -148,10 +148,10 @@ index 2d796cec6e42e..dc2c0667afec9 100644
const scoped_refptr<base::SequencedTaskRunner> task_runner_; const scoped_refptr<base::SequencedTaskRunner> task_runner_;
diff --git mojo/public/cpp/bindings/lib/associated_receiver.cc mojo/public/cpp/bindings/lib/associated_receiver.cc diff --git mojo/public/cpp/bindings/lib/associated_receiver.cc mojo/public/cpp/bindings/lib/associated_receiver.cc
index 4a0fbb27c1163..75a5c5fe70423 100644 index 7134c119865e9..a53beb998abc2 100644
--- mojo/public/cpp/bindings/lib/associated_receiver.cc --- mojo/public/cpp/bindings/lib/associated_receiver.cc
+++ mojo/public/cpp/bindings/lib/associated_receiver.cc +++ mojo/public/cpp/bindings/lib/associated_receiver.cc
@@ -49,6 +49,13 @@ void AssociatedReceiverBase::set_disconnect_with_reason_handler( @@ -55,6 +55,13 @@ void AssociatedReceiverBase::set_disconnect_with_reason_handler(
std::move(error_handler)); std::move(error_handler));
} }
@ -166,10 +166,10 @@ index 4a0fbb27c1163..75a5c5fe70423 100644
DCHECK(is_bound()); DCHECK(is_bound());
set_disconnect_handler( set_disconnect_handler(
diff --git mojo/public/cpp/bindings/lib/binding_state.h mojo/public/cpp/bindings/lib/binding_state.h diff --git mojo/public/cpp/bindings/lib/binding_state.h mojo/public/cpp/bindings/lib/binding_state.h
index 3de514b2696ba..ac057000ea20b 100644 index 60544ea4c9fbb..83da55f4c50b9 100644
--- mojo/public/cpp/bindings/lib/binding_state.h --- mojo/public/cpp/bindings/lib/binding_state.h
+++ mojo/public/cpp/bindings/lib/binding_state.h +++ mojo/public/cpp/bindings/lib/binding_state.h
@@ -70,6 +70,13 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) BindingStateBase { @@ -65,6 +65,13 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) BindingStateBase {
std::move(error_handler)); std::move(error_handler));
} }
@ -184,10 +184,10 @@ index 3de514b2696ba..ac057000ea20b 100644
MessagePipeHandle handle() const { MessagePipeHandle handle() const {
diff --git mojo/public/cpp/bindings/lib/connector.cc mojo/public/cpp/bindings/lib/connector.cc diff --git mojo/public/cpp/bindings/lib/connector.cc mojo/public/cpp/bindings/lib/connector.cc
index 6127288d3fbbc..9713b21569bf3 100644 index d2606acaabd0a..8bf169d246b6b 100644
--- mojo/public/cpp/bindings/lib/connector.cc --- mojo/public/cpp/bindings/lib/connector.cc
+++ mojo/public/cpp/bindings/lib/connector.cc +++ mojo/public/cpp/bindings/lib/connector.cc
@@ -438,6 +438,8 @@ void Connector::OnSyncHandleWatcherHandleReady(const char* interface_name, @@ -436,6 +436,8 @@ void Connector::OnSyncHandleWatcherHandleReady(const char* interface_name,
void Connector::OnHandleReadyInternal(MojoResult result) { void Connector::OnHandleReadyInternal(MojoResult result) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@ -197,10 +197,10 @@ index 6127288d3fbbc..9713b21569bf3 100644
// No more messages on the pipe and the peer is closed. // No more messages on the pipe and the peer is closed.
HandleError(false /* force_pipe_reset */, false /* force_async_handler */); HandleError(false /* force_pipe_reset */, false /* force_async_handler */);
diff --git mojo/public/cpp/bindings/lib/interface_endpoint_client.cc mojo/public/cpp/bindings/lib/interface_endpoint_client.cc diff --git mojo/public/cpp/bindings/lib/interface_endpoint_client.cc mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
index 9615abc747135..face0222f6023 100644 index 0ecfee48e474e..6d2309659c9e0 100644
--- mojo/public/cpp/bindings/lib/interface_endpoint_client.cc --- mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
+++ mojo/public/cpp/bindings/lib/interface_endpoint_client.cc +++ mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
@@ -731,7 +731,8 @@ bool InterfaceEndpointClient::HandleIncomingMessage(Message* message) { @@ -738,7 +738,8 @@ bool InterfaceEndpointClient::HandleIncomingMessage(Message* message) {
} }
void InterfaceEndpointClient::NotifyError( void InterfaceEndpointClient::NotifyError(
@ -210,7 +210,7 @@ index 9615abc747135..face0222f6023 100644
TRACE_EVENT("toplevel", "Closed mojo endpoint", TRACE_EVENT("toplevel", "Closed mojo endpoint",
[&](perfetto::EventContext& ctx) { [&](perfetto::EventContext& ctx) {
auto* info = ctx.event()->set_chrome_mojo_event_info(); auto* info = ctx.event()->set_chrome_mojo_event_info();
@@ -767,6 +768,14 @@ void InterfaceEndpointClient::NotifyError( @@ -774,6 +775,14 @@ void InterfaceEndpointClient::NotifyError(
} else { } else {
std::move(error_with_reason_handler_).Run(0, std::string()); std::move(error_with_reason_handler_).Run(0, std::string());
} }
@ -225,7 +225,7 @@ index 9615abc747135..face0222f6023 100644
} }
} }
@@ -905,7 +914,8 @@ void InterfaceEndpointClient::OnAssociationEvent( @@ -912,7 +921,8 @@ void InterfaceEndpointClient::OnAssociationEvent(
task_runner_->PostTask(FROM_HERE, task_runner_->PostTask(FROM_HERE,
base::BindOnce(&InterfaceEndpointClient::NotifyError, base::BindOnce(&InterfaceEndpointClient::NotifyError,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
@ -236,10 +236,10 @@ index 9615abc747135..face0222f6023 100644
} }
diff --git mojo/public/cpp/bindings/lib/interface_ptr_state.h mojo/public/cpp/bindings/lib/interface_ptr_state.h diff --git mojo/public/cpp/bindings/lib/interface_ptr_state.h mojo/public/cpp/bindings/lib/interface_ptr_state.h
index b6b88ee9651ba..6d75cb0cbd531 100644 index 0cff2435770ed..648678e152338 100644
--- mojo/public/cpp/bindings/lib/interface_ptr_state.h --- mojo/public/cpp/bindings/lib/interface_ptr_state.h
+++ mojo/public/cpp/bindings/lib/interface_ptr_state.h +++ mojo/public/cpp/bindings/lib/interface_ptr_state.h
@@ -224,6 +224,15 @@ class InterfacePtrState : public InterfacePtrStateBase { @@ -225,6 +225,15 @@ class InterfacePtrState : public InterfacePtrStateBase {
std::move(error_handler)); std::move(error_handler));
} }
@ -256,10 +256,10 @@ index b6b88ee9651ba..6d75cb0cbd531 100644
base::RepeatingClosure handler) { base::RepeatingClosure handler) {
ConfigureProxyIfNecessary(); ConfigureProxyIfNecessary();
diff --git mojo/public/cpp/bindings/lib/multiplex_router.cc mojo/public/cpp/bindings/lib/multiplex_router.cc diff --git mojo/public/cpp/bindings/lib/multiplex_router.cc mojo/public/cpp/bindings/lib/multiplex_router.cc
index c7d6a0e7b5e96..399016fbd5e71 100644 index 09ca485ab9ec2..9ec966e561a6a 100644
--- mojo/public/cpp/bindings/lib/multiplex_router.cc --- mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ mojo/public/cpp/bindings/lib/multiplex_router.cc +++ mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -90,6 +90,12 @@ class MultiplexRouter::InterfaceEndpoint @@ -89,6 +89,12 @@ class MultiplexRouter::InterfaceEndpoint
disconnect_reason_ = disconnect_reason; disconnect_reason_ = disconnect_reason;
} }
@ -272,7 +272,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); } base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); }
InterfaceEndpointClient* client() const { return client_; } InterfaceEndpointClient* client() const { return client_; }
@@ -245,6 +251,7 @@ class MultiplexRouter::InterfaceEndpoint @@ -244,6 +250,7 @@ class MultiplexRouter::InterfaceEndpoint
bool handle_created_; bool handle_created_;
std::optional<DisconnectReason> disconnect_reason_; std::optional<DisconnectReason> disconnect_reason_;
@ -280,7 +280,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
// The task runner on which |client_|'s methods can be called. // The task runner on which |client_|'s methods can be called.
scoped_refptr<base::SequencedTaskRunner> task_runner_; scoped_refptr<base::SequencedTaskRunner> task_runner_;
@@ -842,6 +849,8 @@ void MultiplexRouter::OnPipeConnectionError(bool force_async_dispatch) { @@ -841,6 +848,8 @@ void MultiplexRouter::OnPipeConnectionError(bool force_async_dispatch) {
for (uint64_t request_id : request_ids) for (uint64_t request_id : request_ids)
endpoint->client()->ForgetAsyncRequest(request_id); endpoint->client()->ForgetAsyncRequest(request_id);
@ -289,7 +289,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
tasks_.push_back(Task::CreateNotifyErrorTask(endpoint.get())); tasks_.push_back(Task::CreateNotifyErrorTask(endpoint.get()));
} }
@@ -1032,7 +1041,7 @@ bool MultiplexRouter::ProcessNotifyErrorTask( @@ -1031,7 +1040,7 @@ bool MultiplexRouter::ProcessNotifyErrorTask(
// It is safe to call into |client| without the lock. Because |client| is // It is safe to call into |client| without the lock. Because |client| is
// always accessed on the same sequence, including DetachEndpointClient(). // always accessed on the same sequence, including DetachEndpointClient().
MayAutoUnlock unlocker(&lock_); MayAutoUnlock unlocker(&lock_);
@ -376,7 +376,7 @@ index ede8e5973b576..6f22981831ede 100644
} // namespace mojo } // namespace mojo
diff --git mojo/public/cpp/bindings/receiver_set.h mojo/public/cpp/bindings/receiver_set.h diff --git mojo/public/cpp/bindings/receiver_set.h mojo/public/cpp/bindings/receiver_set.h
index 41b31247e9e50..ecd699772381b 100644 index 8d3062f40b887..d1364cbf14323 100644
--- mojo/public/cpp/bindings/receiver_set.h --- mojo/public/cpp/bindings/receiver_set.h
+++ mojo/public/cpp/bindings/receiver_set.h +++ mojo/public/cpp/bindings/receiver_set.h
@@ -72,7 +72,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) ReceiverSetState { @@ -72,7 +72,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) ReceiverSetState {
@ -424,7 +424,7 @@ index 41b31247e9e50..ecd699772381b 100644
ReceiverId next_receiver_id_ = 0; ReceiverId next_receiver_id_ = 0;
EntryMap entries_; EntryMap entries_;
raw_ptr<void, DanglingUntriaged> current_context_ = nullptr; raw_ptr<void, DanglingUntriaged> current_context_ = nullptr;
@@ -489,11 +496,12 @@ class ReceiverSetBase { @@ -507,11 +514,12 @@ class ReceiverSetBase {
const void* GetContext() const override { return &context_; } const void* GetContext() const override { return &context_; }
void* GetContext() override { return &context_; } void* GetContext() override { return &context_; }

View File

@ -10,10 +10,10 @@ index aeb79b46f5d21..bd57e874c1240 100644
+// This load will not send any cookies. For CEF usage. +// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20) +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 diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 271c601381a0d..0e22f8ea606e7 100644 index 125529ce550ca..095da663062e9 100644
--- net/url_request/url_request_http_job.cc --- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc
@@ -2106,7 +2106,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { @@ -2136,7 +2136,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode // Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as // is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case. // blocked cookies still need to be logged in that case.
@ -24,10 +24,10 @@ index 271c601381a0d..0e22f8ea606e7 100644
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const { bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index 7d97d0fd5481b..307e5f2beb370 100644 index 28355f4c6c3cb..f36b0b658aef5 100644
--- services/network/public/cpp/resource_request.cc --- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc
@@ -356,7 +356,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { @@ -353,7 +353,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
} }
bool ResourceRequest::SendsCookies() const { bool ResourceRequest::SendsCookies() const {

View File

@ -1,18 +0,0 @@
diff --git net/base/schemeful_site.cc net/base/schemeful_site.cc
index 4b9760d916213..87556e7e0dc99 100644
--- net/base/schemeful_site.cc
+++ net/base/schemeful_site.cc
@@ -43,6 +43,13 @@ bool IsSameSiteInternal(const url::Origin& a,
return true;
}
+ // If host equality is false, then the only way the origins can be same site
+ // is if we have a standard scheme with a network host, which is the only case
+ // when SchemefulSite looks at the registerable domain.
+ if (!IsStandardSchemeWithNetworkHost(a.scheme())) {
+ return false;
+ }
+
std::string_view b_site = GetDomainAndRegistryAsStringPiece(
b, net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);

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 diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index fb9d8d1d33042..e1f46a36f435e 100644 index 851fc95900e7b..8b52702ae254e 100644
--- net/test/embedded_test_server/embedded_test_server.cc --- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc
@@ -1120,7 +1120,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { @@ -1132,7 +1132,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get()) if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>(); temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@ -11,7 +11,7 @@ index fb9d8d1d33042..e1f46a36f435e 100644
if (!io_thread_->task_runner()->PostTaskAndReply( if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) { FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false; return false;
@@ -1147,7 +1147,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( @@ -1159,7 +1159,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get()) if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>(); temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@ -1,13 +1,14 @@
diff --git components/input/fling_scheduler_base.h components/input/fling_scheduler_base.h diff --git components/input/fling_scheduler_base.h components/input/fling_scheduler_base.h
index 76057b3e50f78..d3b63a3b07805 100644 index 6e331ee24bddf..ab6c61c2e57ac 100644
--- components/input/fling_scheduler_base.h --- components/input/fling_scheduler_base.h
+++ components/input/fling_scheduler_base.h +++ components/input/fling_scheduler_base.h
@@ -5,14 +5,26 @@ @@ -5,9 +5,14 @@
#ifndef COMPONENTS_INPUT_FLING_SCHEDULER_BASE_H_ #ifndef COMPONENTS_INPUT_FLING_SCHEDULER_BASE_H_
#define COMPONENTS_INPUT_FLING_SCHEDULER_BASE_H_ #define COMPONENTS_INPUT_FLING_SCHEDULER_BASE_H_
+#include "base/memory/raw_ptr.h" +#include "base/memory/raw_ptr.h"
#include "components/input/fling_controller.h" #include "components/input/fling_controller.h"
#include "components/viz/common/frame_sinks/begin_frame_source.h"
+namespace ui { +namespace ui {
+class Compositor; +class Compositor;
@ -16,9 +17,10 @@ index 76057b3e50f78..d3b63a3b07805 100644
namespace input { namespace input {
class FlingSchedulerBase : public FlingControllerSchedulerClient { class FlingSchedulerBase : public FlingControllerSchedulerClient {
public: @@ -19,6 +24,13 @@ class FlingSchedulerBase : public FlingControllerSchedulerClient {
virtual void ProgressFlingOnBeginFrameIfneeded( // in Viz currently, but in future we would want to migrate browser's
base::TimeTicks current_time) = 0; // implementations to use this to progress flings.
virtual void SetBeginFrameSource(viz::BeginFrameSource* begin_frame_source) {}
+ +
+ void SetCompositor(ui::Compositor* compositor) { + void SetCompositor(ui::Compositor* compositor) {
+ compositor_ = compositor; + compositor_ = compositor;
@ -30,7 +32,7 @@ index 76057b3e50f78..d3b63a3b07805 100644
} // namespace input } // namespace input
diff --git components/input/render_input_router.h components/input/render_input_router.h diff --git components/input/render_input_router.h components/input/render_input_router.h
index 09111425370d3..900b325dce683 100644 index d29c03fddd2a5..f855afb39deb7 100644
--- components/input/render_input_router.h --- components/input/render_input_router.h
+++ components/input/render_input_router.h +++ components/input/render_input_router.h
@@ -68,6 +68,7 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter @@ -68,6 +68,7 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter
@ -42,7 +44,7 @@ index 09111425370d3..900b325dce683 100644
void SetForceEnableZoom(bool); void SetForceEnableZoom(bool);
void SetDeviceScaleFactor(float device_scale_factor); void SetDeviceScaleFactor(float device_scale_factor);
diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc
index f1030a744809c..c222a209949e6 100644 index 477389a1cb1d3..b7b7edbfbdf5d 100644
--- content/browser/renderer_host/input/fling_scheduler.cc --- content/browser/renderer_host/input/fling_scheduler.cc
+++ content/browser/renderer_host/input/fling_scheduler.cc +++ content/browser/renderer_host/input/fling_scheduler.cc
@@ -98,6 +98,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded( @@ -98,6 +98,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded(
@ -56,10 +58,10 @@ index f1030a744809c..c222a209949e6 100644
return nullptr; return nullptr;
} }
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 573269ba54150..a51715e7dc6cc 100644 index 7b11077760d2a..1f67d3ccbe94d 100644
--- content/browser/renderer_host/render_widget_host_impl.cc --- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3718,6 +3718,11 @@ void RenderWidgetHostImpl::StopFling() { @@ -3727,6 +3727,11 @@ void RenderWidgetHostImpl::StopFling() {
GetRenderInputRouter()->StopFling(); GetRenderInputRouter()->StopFling();
} }
@ -72,10 +74,10 @@ index 573269ba54150..a51715e7dc6cc 100644
uint16_t angle, uint16_t angle,
display::mojom::ScreenOrientation type) { display::mojom::ScreenOrientation type) {
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index c201cff9e5c3b..900af39ae4b09 100644 index c11b7183397d2..61a20efe04f7a 100644
--- content/browser/renderer_host/render_widget_host_impl.h --- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h
@@ -843,6 +843,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -844,6 +844,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time); void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling(); void StopFling();

View File

@ -1,5 +1,5 @@
diff --git gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc diff --git gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
index f51591d21a0ce..6393280a99f38 100644 index c821349f35116..7ab80c7464b49 100644
--- gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc --- gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
+++ gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc +++ gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
@@ -178,7 +178,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( @@ -178,7 +178,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
index 4f2e70c243550..59257dc71304b 100644 index 4b1775f4a882f..44d128154335a 100644
--- chrome/browser/printing/printer_query.cc --- chrome/browser/printing/printer_query.cc
+++ chrome/browser/printing/printer_query.cc +++ chrome/browser/printing/printer_query.cc
@@ -125,6 +125,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id) @@ -125,6 +125,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
@ -11,10 +11,10 @@ index 4f2e70c243550..59257dc71304b 100644
PrinterQuery::~PrinterQuery() { PrinterQuery::~PrinterQuery() {
diff --git printing/printing_context.h printing/printing_context.h diff --git printing/printing_context.h printing/printing_context.h
index 63f170c950504..962e60d23da59 100644 index 3a98838e27621..f5cbe1c561189 100644
--- printing/printing_context.h --- printing/printing_context.h
+++ printing/printing_context.h +++ printing/printing_context.h
@@ -215,6 +215,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { @@ -217,6 +217,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
void SetJobId(int job_id); void SetJobId(int job_id);
#endif #endif
@ -26,9 +26,9 @@ index 63f170c950504..962e60d23da59 100644
+ int render_frame_id() const { return render_frame_id_; } + int render_frame_id() const { return render_frame_id_; }
+ +
protected: protected:
PrintingContext(Delegate* delegate, ProcessBehavior process_behavior); PrintingContext(Delegate* delegate,
OutOfProcessBehavior out_of_process_behavior);
@@ -248,6 +255,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { @@ -251,6 +258,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
// management. // management.
int job_id_ = kNoPrintJobId; int job_id_ = kNoPrintJobId;
@ -37,5 +37,5 @@ index 63f170c950504..962e60d23da59 100644
+ int render_frame_id_ = 0; + int render_frame_id_ = 0;
+ +
private: private:
const ProcessBehavior process_behavior_; const OutOfProcessBehavior out_of_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 diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 6c1e46e58d975..dbf513a643697 100644 index 00b1dc2ab7661..7b54617d1443d 100644
--- content/browser/renderer_host/render_view_host_impl.cc --- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc
@@ -762,6 +762,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { @@ -760,6 +760,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
} }
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@ -1,5 +1,5 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index f43a7a7f0bba1..da904e0407475 100644 index 92f2c53333fd5..114c89aa6717b 100644
--- ui/base/resource/resource_bundle.cc --- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc
@@ -947,6 +947,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) @@ -947,6 +947,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index 7d8baae182adb..a9b5cb4c8b43d 100644 index ebf407904b9b9..2bfdce0253d62 100644
--- content/browser/renderer_host/render_frame_host_impl.cc --- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc +++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -9654,6 +9654,16 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -9788,6 +9788,16 @@ void RenderFrameHostImpl::CreateNewWindow(
return; return;
} }
@ -19,7 +19,7 @@ index 7d8baae182adb..a9b5cb4c8b43d 100644
// Otherwise, consume user activation before we proceed. In particular, it is // Otherwise, consume user activation before we proceed. In particular, it is
// important to do this before we return from the |opener_suppressed| case // important to do this before we return from the |opener_suppressed| case
// below. // below.
@@ -12061,6 +12071,7 @@ void RenderFrameHostImpl::CommitNavigation( @@ -12205,6 +12215,7 @@ void RenderFrameHostImpl::CommitNavigation(
auto browser_calc_origin_to_commit = auto browser_calc_origin_to_commit =
navigation_request->GetOriginToCommitWithDebugInfo(); navigation_request->GetOriginToCommitWithDebugInfo();
if (!process_lock.is_error_page() && !is_mhtml_subframe && if (!process_lock.is_error_page() && !is_mhtml_subframe &&

View File

@ -26,7 +26,7 @@ index d6598893c06a6..0b1adcf999dac 100644
if (cpu != 'x64'): if (cpu != 'x64'):
# x64 is default target CPU thus any other CPU requires a target set # x64 is default target CPU thus any other CPU requires a target set
diff --git build/vs_toolchain.py build/vs_toolchain.py diff --git build/vs_toolchain.py build/vs_toolchain.py
index e0f89a555492c..0f8dc1dbb3525 100755 index 61b3229502571..6bb14f7cf7e28 100755
--- build/vs_toolchain.py --- build/vs_toolchain.py
+++ build/vs_toolchain.py +++ build/vs_toolchain.py
@@ -136,9 +136,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -136,9 +136,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():

View File

@ -1,8 +1,8 @@
diff --git ui/display/screen.cc ui/display/screen.cc diff --git ui/display/screen.cc ui/display/screen.cc
index a3accb800e24a..61d4b48d43707 100644 index 1ee1f561eb03a..13a86d95bff9d 100644
--- ui/display/screen.cc --- ui/display/screen.cc
+++ ui/display/screen.cc +++ ui/display/screen.cc
@@ -108,13 +108,13 @@ base::TimeDelta Screen::CalculateIdleTime() const { @@ -104,13 +104,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {
gfx::Rect Screen::ScreenToDIPRectInWindow(gfx::NativeWindow window, gfx::Rect Screen::ScreenToDIPRectInWindow(gfx::NativeWindow window,
const gfx::Rect& screen_rect) const { const gfx::Rect& screen_rect) const {
float scale = GetDisplayNearestWindow(window).device_scale_factor(); float scale = GetDisplayNearestWindow(window).device_scale_factor();
@ -19,10 +19,10 @@ index a3accb800e24a..61d4b48d43707 100644
bool Screen::GetDisplayWithDisplayId(int64_t display_id, bool Screen::GetDisplayWithDisplayId(int64_t display_id,
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
index 3a0dc73315d90..aa645eb1ba974 100644 index fc36188c6ae47..06a07b3fd85e8 100644
--- ui/display/win/screen_win.cc --- ui/display/win/screen_win.cc
+++ ui/display/win/screen_win.cc +++ ui/display/win/screen_win.cc
@@ -633,7 +633,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) { @@ -692,7 +692,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd,
gfx::PointF(pixel_bounds.origin()), screen_win_display)); gfx::PointF(pixel_bounds.origin()), screen_win_display));
const float scale_factor = const float scale_factor =
1.0f / screen_win_display.display().device_scale_factor(); 1.0f / screen_win_display.display().device_scale_factor();
@ -30,8 +30,8 @@ index 3a0dc73315d90..aa645eb1ba974 100644
+ return {origin, ScaleToRoundedRect(pixel_bounds, scale_factor).size()}; + return {origin, ScaleToRoundedRect(pixel_bounds, scale_factor).size()};
} }
// static gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd,
@@ -648,7 +648,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) { @@ -707,7 +707,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd,
const gfx::Point origin = const gfx::Point origin =
display::win::DIPToScreenPoint(dip_bounds.origin(), screen_win_display); display::win::DIPToScreenPoint(dip_bounds.origin(), screen_win_display);
const float scale_factor = screen_win_display.display().device_scale_factor(); const float scale_factor = screen_win_display.display().device_scale_factor();
@ -39,4 +39,4 @@ index 3a0dc73315d90..aa645eb1ba974 100644
+ return {origin, ScaleToRoundedRect(dip_bounds, scale_factor).size()}; + return {origin, ScaleToRoundedRect(dip_bounds, scale_factor).size()};
} }
// static gfx::Rect ScreenWin::ClientToDIPRect(HWND hwnd,

View File

@ -1,8 +1,16 @@
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 274e997b7c3c4..fc2f8b5e17680 100644 index b914ce39d47f8..bbacc1e021d3d 100644
--- net/cookies/cookie_monster.cc --- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc
@@ -668,6 +668,25 @@ void CookieMonster::SetCookieableSchemes( @@ -55,6 +55,7 @@
#include <set>
#include <string_view>
#include <tuple>
+#include <unordered_set>
#include <utility>
#include <vector>
@@ -669,6 +670,50 @@ void CookieMonster::SetCookieableSchemes(
MaybeRunCookieCallback(std::move(callback), true); MaybeRunCookieCallback(std::move(callback), true);
} }
@ -18,9 +26,34 @@ index 274e997b7c3c4..fc2f8b5e17680 100644
+ return; + return;
+ } + }
+ +
+ for (const auto& element : schemes) {
+ if (std::find(cookieable_schemes_.begin(), cookieable_schemes_.end(),
+ element) == cookieable_schemes_.end()) {
+ cookieable_schemes_.push_back(element);
+ }
+ }
+ MaybeRunCookieCallback(std::move(callback), true);
+}
+
+void CookieMonster::RemoveCookieableSchemes(
+ const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+
+ // Calls to this method will have no effect if made after a WebView or
+ // CookieManager instance has been created.
+ if (initialized_) {
+ MaybeRunCookieCallback(std::move(callback), false);
+ return;
+ }
+
+ if (!schemes.empty()) { + if (!schemes.empty()) {
+ cookieable_schemes_.insert(cookieable_schemes_.begin(), schemes.begin(), + std::unordered_set<std::string> set(schemes.begin(), schemes.end());
+ schemes.end()); + auto it = std::remove_if(
+ cookieable_schemes_.begin(),
+ cookieable_schemes_.end(),
+ [&](const auto& s) { return set.count(s); });
+ cookieable_schemes_.erase(it, cookieable_schemes_.end());
+ } + }
+ MaybeRunCookieCallback(std::move(callback), true); + MaybeRunCookieCallback(std::move(callback), true);
+} +}
@ -29,23 +62,25 @@ index 274e997b7c3c4..fc2f8b5e17680 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 66fc28e1eae7c..243fd76546952 100644 index df271609ba4a2..151e7627b8230 100644
--- net/cookies/cookie_monster.h --- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h
@@ -238,6 +238,8 @@ class NET_EXPORT CookieMonster : public CookieStore { @@ -238,6 +238,10 @@ class NET_EXPORT CookieMonster : public CookieStore {
CookieChangeDispatcher& GetChangeDispatcher() override; CookieChangeDispatcher& GetChangeDispatcher() override;
void SetCookieableSchemes(const std::vector<std::string>& schemes, void SetCookieableSchemes(std::vector<std::string> schemes,
SetCookieableSchemesCallback callback) override; SetCookieableSchemesCallback callback) override;
+ void AddCookieableSchemes(const std::vector<std::string>& schemes, + void AddCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) override; + SetCookieableSchemesCallback callback) override;
+ void RemoveCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) override;
std::optional<bool> SiteHasCookieInOtherPartition( std::optional<bool> SiteHasCookieInOtherPartition(
const net::SchemefulSite& site, const net::SchemefulSite& site,
const std::optional<CookiePartitionKey>& partition_key) const override; const CookiePartitionKey& partition_key) const override;
diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h
index 7c76c93f798b2..09f62ad48ccb4 100644 index 441765abb8cd8..1c927eb59cc2a 100644
--- net/cookies/cookie_store.h --- net/cookies/cookie_store.h
+++ net/cookies/cookie_store.h +++ net/cookies/cookie_store.h
@@ -171,6 +171,11 @@ class NET_EXPORT CookieStore { @@ -171,6 +171,17 @@ class NET_EXPORT CookieStore {
// Transfer ownership of a CookieAccessDelegate. // Transfer ownership of a CookieAccessDelegate.
void SetCookieAccessDelegate(std::unique_ptr<CookieAccessDelegate> delegate); void SetCookieAccessDelegate(std::unique_ptr<CookieAccessDelegate> delegate);
@ -53,37 +88,44 @@ index 7c76c93f798b2..09f62ad48ccb4 100644
+ // use of the instance (i.e. after the instance initialization process). + // use of the instance (i.e. after the instance initialization process).
+ virtual void AddCookieableSchemes(const std::vector<std::string>& schemes, + virtual void AddCookieableSchemes(const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) = 0; + SetCookieableSchemesCallback callback) = 0;
+
+ // Removes from the list of cookieable schemes. Does nothing if called after
+ // first use of the instance (i.e. after the instance initialization process).
+ virtual void RemoveCookieableSchemes(
+ const std::vector<std::string>& schemes,
+ SetCookieableSchemesCallback callback) = 0;
+ +
// This may be null if no delegate has been set yet, or the delegate has been // This may be null if no delegate has been set yet, or the delegate has been
// reset to null. // reset to null.
const CookieAccessDelegate* cookie_access_delegate() const { const CookieAccessDelegate* cookie_access_delegate() const {
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index 95f73bcb9fb40..e17a93f69c089 100644 index fb47ecfba4a4d..0896266df56e7 100644
--- services/network/cookie_manager.cc --- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc +++ services/network/cookie_manager.cc
@@ -355,14 +355,9 @@ void CookieManager::AllowFileSchemeCookies( @@ -342,13 +342,13 @@ void CookieManager::AllowFileSchemeCookies(
AllowFileSchemeCookiesCallback callback) { AllowFileSchemeCookiesCallback callback) {
OnSettingsWillChange(); OnSettingsWillChange();
- std::vector<std::string> cookieable_schemes( - std::vector<std::string> cookieable_schemes =
- net::CookieMonster::kDefaultCookieableSchemes, - net::CookieMonster::GetDefaultCookieableSchemes();
- net::CookieMonster::kDefaultCookieableSchemes + if (allow) {
- net::CookieMonster::kDefaultCookieableSchemesCount); - cookieable_schemes.emplace_back(url::kFileScheme);
- if (allow) { + cookie_store_->AddCookieableSchemes({url::kFileScheme},
- cookieable_schemes.push_back(url::kFileScheme); + std::move(callback));
- } + } else {
- cookie_store_->SetCookieableSchemes(cookieable_schemes, std::move(callback)); + cookie_store_->RemoveCookieableSchemes({url::kFileScheme},
+ if (!allow) + std::move(callback));
+ return; }
+ cookie_store_->AddCookieableSchemes({url::kFileScheme}, std::move(callback)); - cookie_store_->SetCookieableSchemes(std::move(cookieable_schemes),
- std::move(callback));
} }
void CookieManager::SetForceKeepSessionState() { void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc diff --git services/network/network_context.cc services/network/network_context.cc
index 8014bb16d8108..bc8e80e9eb9c3 100644 index 616f639ce1cad..685178b2fbd5d 100644
--- services/network/network_context.cc --- services/network/network_context.cc
+++ services/network/network_context.cc +++ services/network/network_context.cc
@@ -2821,22 +2821,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( @@ -2807,22 +2807,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
pref_service.get(), network_service_->network_quality_estimator()); pref_service.get(), network_service_->network_quality_estimator());
} }
@ -127,10 +169,10 @@ index 8014bb16d8108..bc8e80e9eb9c3 100644
base::FilePath transport_security_persister_file_name; base::FilePath transport_security_persister_file_name;
if (GetFullDataFilePath(params_->file_paths, if (GetFullDataFilePath(params_->file_paths,
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index a9c82bcf9a4eb..61afe5bf737ce 100644 index 4ea464b2b6c00..accfb976c960b 100644
--- services/network/public/mojom/network_context.mojom --- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom
@@ -361,6 +361,9 @@ struct NetworkContextParams { @@ -362,6 +362,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false. // cookies. Otherwise it should be false.
bool persist_session_cookies = false; bool persist_session_cookies = false;

View File

@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 861d6c3b3e71a..7db0effe43f45 100644 index 2b63e244ddaae..7d3e5017cf125 100644
--- content/browser/storage_partition_impl.cc --- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc
@@ -3504,9 +3504,12 @@ void StoragePartitionImpl::InitNetworkContext() { @@ -3498,9 +3498,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params = cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New(); cert_verifier::mojom::CertVerifierCreationParams::New();

View File

@ -1,5 +1,5 @@
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
index 0414d4c020839..62c4367b23d06 100644 index 3ccdf84f3c2db..c0042a82da63a 100644
--- ui/views/controls/webview/webview.cc --- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc
@@ -171,6 +171,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, @@ -171,6 +171,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
@ -14,10 +14,10 @@ index 0414d4c020839..62c4367b23d06 100644
if (crashed_overlay_view_.view() == crashed_overlay_view) { if (crashed_overlay_view_.view() == crashed_overlay_view) {
return; return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index e34f94cec2d89..fcecfac138244 100644 index b626c7abff2a9..4a157a068d867 100644
--- ui/views/controls/webview/webview.h --- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h
@@ -107,6 +107,10 @@ class WEBVIEW_EXPORT WebView : public View, @@ -108,6 +108,10 @@ class WEBVIEW_EXPORT WebView : public View,
void EnableSizingFromWebContents(const gfx::Size& min_size, void EnableSizingFromWebContents(const gfx::Size& min_size,
const gfx::Size& max_size); const gfx::Size& max_size);

View File

@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index 19e3f2fc7b3e0..c9469d3da6409 100644 index 5e0f05804e814..2ac172b386c8b 100644
--- base/trace_event/builtin_categories.h --- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h
@@ -69,6 +69,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( @@ -69,6 +69,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(

View File

@ -1,9 +1,9 @@
diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc
index caf41f43c700d..ba15a09e1b231 100644 index 73f88919983fb..942bc8290b318 100644
--- ui/base/x/x11_os_exchange_data_provider.cc --- ui/base/x/x11_os_exchange_data_provider.cc
+++ ui/base/x/x11_os_exchange_data_provider.cc +++ ui/base/x/x11_os_exchange_data_provider.cc
@@ -164,7 +164,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, @@ -164,7 +164,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url,
format_map_.Insert(x11::GetAtom(kMimeTypeMozillaURL), mem); format_map_.Insert(x11::GetAtom(kMimeTypeMozillaUrl), mem);
// Set a string fallback as well. // Set a string fallback as well.
- SetString(spec); - SetString(spec);

View File

@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index 9a2b2cdd94f..dd05f318329 100644 index 818f13802c6..4aa889bc3ad 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/riscv.gni") @@ -12,6 +12,7 @@ import("//build/config/riscv.gni")
@ -10,7 +10,7 @@ index 9a2b2cdd94f..dd05f318329 100644
import("//third_party/icu/config.gni") import("//third_party/icu/config.gni")
import("gni/snapshot_toolchain.gni") import("gni/snapshot_toolchain.gni")
@@ -496,6 +497,9 @@ declare_args() { @@ -495,6 +496,9 @@ declare_args() {
# Experimental testing mode where various limits are artificially set lower. # Experimental testing mode where various limits are artificially set lower.
v8_lower_limits_mode = false v8_lower_limits_mode = false

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
index 15a2e6f3eac5f..d1db608df307f 100644 index ff43c838c27b0..fb6c69c99c3cf 100644
--- chrome/browser/ui/views/toolbar/app_menu.cc --- chrome/browser/ui/views/toolbar/app_menu.cc
+++ chrome/browser/ui/views/toolbar/app_menu.cc +++ chrome/browser/ui/views/toolbar/app_menu.cc
@@ -1043,7 +1043,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { @@ -1043,7 +1043,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
@ -58,10 +58,10 @@ index ecd8177fd48cb..63d94b6f39a7b 100644
virtual void MenuWillShow() {} virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index f015a54360dd9..6e579c1b7ad9e 100644 index 8221222fba3d7..bf4ebd91d14b6 100644
--- ui/gfx/render_text.cc --- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc +++ ui/gfx/render_text.cc
@@ -686,6 +686,14 @@ void RenderText::SetWhitespaceElision(std::optional<bool> whitespace_elision) { @@ -682,6 +682,14 @@ void RenderText::SetWhitespaceElision(std::optional<bool> whitespace_elision) {
} }
} }
@ -76,7 +76,7 @@ index f015a54360dd9..6e579c1b7ad9e 100644
void RenderText::SetDisplayRect(const Rect& r) { void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) { if (r != display_rect_) {
display_rect_ = r; display_rect_ = r;
@@ -2156,6 +2164,18 @@ void RenderText::OnTextAttributeChanged() { @@ -2152,6 +2160,18 @@ void RenderText::OnTextAttributeChanged() {
text_elided_ = false; text_elided_ = false;
layout_text_up_to_date_ = false; layout_text_up_to_date_ = false;
@ -164,7 +164,7 @@ index 8efaccff40e09..e420e2f4e80ec 100644
LabelButtonImageContainer* image_container() { LabelButtonImageContainer* image_container() {
return image_container_.get(); return image_container_.get();
diff --git ui/views/controls/label.cc ui/views/controls/label.cc diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index 774640f711d13..54325afd0b1a5 100644 index a4982c41f94e5..2301912c6991f 100644
--- ui/views/controls/label.cc --- ui/views/controls/label.cc
+++ ui/views/controls/label.cc +++ ui/views/controls/label.cc
@@ -56,12 +56,29 @@ enum LabelPropertyKey { @@ -56,12 +56,29 @@ enum LabelPropertyKey {
@ -254,7 +254,7 @@ index b4cb7c83a3e4c..562e096930147 100644
std::unique_ptr<SelectionController> selection_controller_; std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index c5f3700f8f04b..84b0d56977dbd 100644 index a777b6b4c61c2..456e2b04848fc 100644
--- ui/views/controls/menu/menu_controller.cc --- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc
@@ -589,7 +589,8 @@ void MenuController::Run(Widget* parent, @@ -589,7 +589,8 @@ void MenuController::Run(Widget* parent,
@ -283,7 +283,7 @@ index c5f3700f8f04b..84b0d56977dbd 100644
if (item->GetParentMenuItem()) { if (item->GetParentMenuItem()) {
params.context = item->GetWidget(); params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure // (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -3099,7 +3102,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( @@ -3100,7 +3103,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item; MenuItemView* item = pending_state_.item;
@ -296,7 +296,7 @@ index c5f3700f8f04b..84b0d56977dbd 100644
return; return;
} }
@@ -3124,6 +3131,7 @@ void MenuController::CloseSubmenu() { @@ -3125,6 +3132,7 @@ void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item; MenuItemView* item = state_.item;
DCHECK(item); DCHECK(item);
if (!item->GetParentMenuItem()) { if (!item->GetParentMenuItem()) {
@ -749,10 +749,10 @@ index da772edd48c00..43c930e932287 100644
std::optional<std::string> show_menu_host_duration_histogram) { std::optional<std::string> show_menu_host_duration_histogram) {
RunMenu(parent, bounds.CenterPoint()); RunMenu(parent, bounds.CenterPoint());
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index e997f21d56ce8..ca69158a8dbfa 100644 index 32ad737090b8d..4b9372a4b82c0 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc --- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -273,6 +273,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) @@ -274,6 +274,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ = background_view_->AddChildView( scroll_down_button_ = background_view_->AddChildView(
std::make_unique<MenuScrollButton>(content_view, false)); std::make_unique<MenuScrollButton>(content_view, false));
@ -789,7 +789,7 @@ index 548bd04490964..9772363322649 100644
if (root_location != root_current_location && if (root_location != root_current_location &&
!g_ozone_ui_controls_test_helper->MustUseUiControlsForMoveCursorTo() && !g_ozone_ui_controls_test_helper->MustUseUiControlsForMoveCursorTo() &&
diff --git ui/views/view.h ui/views/view.h diff --git ui/views/view.h ui/views/view.h
index cca938ad25cda..e7f12dedfe565 100644 index ae7eab37f12ba..a21fb91688c0c 100644
--- ui/views/view.h --- ui/views/view.h
+++ ui/views/view.h +++ ui/views/view.h
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -800,7 +800,7 @@ index cca938ad25cda..e7f12dedfe565 100644
#include "base/types/pass_key.h" #include "base/types/pass_key.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
@@ -290,7 +291,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, @@ -316,7 +317,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget, public ui::EventTarget,
public ui::EventHandler, public ui::EventHandler,
public ui::PropertyHandler, public ui::PropertyHandler,
@ -810,7 +810,7 @@ index cca938ad25cda..e7f12dedfe565 100644
// Do not remove this macro! // Do not remove this macro!
// The macro is maintained by the memory safety team. // The macro is maintained by the memory safety team.
ADVANCED_MEMORY_SAFETY_CHECKS(); ADVANCED_MEMORY_SAFETY_CHECKS();
@@ -615,7 +617,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, @@ -669,7 +671,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Return the preferred height for a specific width. It is a helper function // Return the preferred height for a specific width. It is a helper function
// of GetPreferredSize(SizeBounds(w, SizeBound())).height(). // of GetPreferredSize(SizeBounds(w, SizeBound())).height().

View File

@ -23,7 +23,7 @@ index dc3a54ce29e7d..1a57a27234869 100644
case ui::mojom::WindowShowState::kEnd: case ui::mojom::WindowShowState::kEnd:
return ui::mojom::WindowShowState::kNormal; return ui::mojom::WindowShowState::kNormal;
diff --git components/sessions/core/session_service_commands.cc components/sessions/core/session_service_commands.cc diff --git components/sessions/core/session_service_commands.cc components/sessions/core/session_service_commands.cc
index cc8c871906054..7a1a6f8ae545c 100644 index 35c1d3e925c3a..aacbbe895c298 100644
--- components/sessions/core/session_service_commands.cc --- components/sessions/core/session_service_commands.cc
+++ components/sessions/core/session_service_commands.cc +++ components/sessions/core/session_service_commands.cc
@@ -172,9 +172,10 @@ enum PersistedWindowShowState { @@ -172,9 +172,10 @@ enum PersistedWindowShowState {
@ -61,7 +61,7 @@ index 971e5273f1b05..a5d847f7f9d60 100644
case ui::mojom::WindowShowState::kMaximized: case ui::mojom::WindowShowState::kMaximized:
return kSerializedShowStateMaximized; return kSerializedShowStateMaximized;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index ce00b0540a7ac..21ce742e1406f 100644 index 30ec1b5e2688b..e9452c1eb9dee 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc --- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -602,6 +602,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { @@ -602,6 +602,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@ -80,10 +80,10 @@ index ce00b0540a7ac..21ce742e1406f 100644
if (!GetMouseWheelPhaseHandler()) if (!GetMouseWheelPhaseHandler())
return; return;
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index d451701b81bf2..0b0e0eb5846e9 100644 index c93e93d13f101..cefd78e15857a 100644
--- content/browser/renderer_host/render_widget_host_view_base.h --- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -72,6 +72,7 @@ namespace content { @@ -73,6 +73,7 @@ namespace content {
class DevicePosturePlatformProvider; class DevicePosturePlatformProvider;
class MouseWheelPhaseHandler; class MouseWheelPhaseHandler;
class RenderWidgetHostImpl; class RenderWidgetHostImpl;
@ -91,9 +91,9 @@ index d451701b81bf2..0b0e0eb5846e9 100644
class ScopedViewTransitionResources; class ScopedViewTransitionResources;
class TextInputManager; class TextInputManager;
class TouchSelectionControllerClientManager; class TouchSelectionControllerClientManager;
@@ -156,6 +157,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -159,6 +160,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
float GetDeviceScaleFactor() const final;
bool IsPointerLocked() override; virtual void DidOverscroll(const ui::DidOverscrollParams& params) {}
+ void SetHasExternalParent(bool val) override; + void SetHasExternalParent(bool val) override;
+ bool HasExternalParent() const override; + bool HasExternalParent() const override;
@ -101,7 +101,7 @@ index d451701b81bf2..0b0e0eb5846e9 100644
// Identical to `CopyFromSurface()`, except that this method issues the // Identical to `CopyFromSurface()`, except that this method issues the
// `viz::CopyOutputRequest` against the exact `viz::Surface` currently // `viz::CopyOutputRequest` against the exact `viz::Surface` currently
// embedded by this View, while `CopyFromSurface()` may return a copy of any // embedded by this View, while `CopyFromSurface()` may return a copy of any
@@ -226,6 +230,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -229,6 +233,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// Called when screen information or native widget bounds change. // Called when screen information or native widget bounds change.
virtual void UpdateScreenInfo(); virtual void UpdateScreenInfo();
@ -112,7 +112,7 @@ index d451701b81bf2..0b0e0eb5846e9 100644
// Called by the TextInputManager to notify the view about being removed from // Called by the TextInputManager to notify the view about being removed from
// the list of registered views, i.e., TextInputManager is no longer tracking // the list of registered views, i.e., TextInputManager is no longer tracking
// TextInputState from this view. The RWHV should reset |text_input_manager_| // TextInputState from this view. The RWHV should reset |text_input_manager_|
@@ -352,6 +360,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -355,6 +363,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
const gfx::Rect& bounds, const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0; const gfx::Rect& anchor_rect) = 0;
@ -125,7 +125,7 @@ index d451701b81bf2..0b0e0eb5846e9 100644
// Indicates whether the page has finished loading. // Indicates whether the page has finished loading.
virtual void SetIsLoading(bool is_loading) = 0; virtual void SetIsLoading(bool is_loading) = 0;
@@ -620,6 +634,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -623,6 +637,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// to all displays. // to all displays.
gfx::Size system_cursor_size_; gfx::Size system_cursor_size_;
@ -136,7 +136,7 @@ index d451701b81bf2..0b0e0eb5846e9 100644
private: private:
FRIEND_TEST_ALL_PREFIXES( FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest, BrowserSideFlingBrowserTest,
@@ -641,10 +659,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase @@ -644,10 +662,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void SynchronizeVisualProperties(); void SynchronizeVisualProperties();
@ -273,7 +273,7 @@ index 077855979045d..69f369b06c29e 100644
return host ? host->GetAcceleratedWidget() : nullptr; 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 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 9c68ea7230d52..183619ccdf3f6 100644 index a5114063ad742..9a4a1be60f6b5 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
@@ -193,6 +193,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( @@ -193,6 +193,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
@ -303,7 +303,7 @@ index 9c68ea7230d52..183619ccdf3f6 100644
+ +
DCHECK(!properties->x11_extension_delegate); DCHECK(!properties->x11_extension_delegate);
properties->x11_extension_delegate = this; properties->x11_extension_delegate = this;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
index 5c57268b37e2a..e844ce5a4cd3a 100644 index 5c57268b37e2a..e844ce5a4cd3a 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
@ -337,7 +337,7 @@ index 5c57268b37e2a..e844ce5a4cd3a 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this}; 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 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 649cff570ec92..94f4af1e91e19 100644 index 2150c344075c7..feb1abf159d51 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -280,8 +280,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -280,8 +280,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
@ -352,10 +352,10 @@ index 649cff570ec92..94f4af1e91e19 100644
// Calculate initial bounds. // 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 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 82e6f7c91bac6..6b851e154e01b 100644 index 6ad16425f2fb3..f2e5c506e23f5 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -22,6 +22,7 @@ @@ -24,6 +24,7 @@
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h" #include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/focus_client.h" #include "ui/aura/client/focus_client.h"
@ -381,23 +381,32 @@ index 82e6f7c91bac6..6b851e154e01b 100644
- // We don't have an HWND yet, so scale relative to the nearest screen. - // We don't have an HWND yet, so scale relative to the nearest screen.
- gfx::Rect pixel_bounds = - gfx::Rect pixel_bounds =
- display::win::ScreenWin::DIPToScreenRect(nullptr, params.bounds); - display::win::GetScreenWin()->DIPToScreenRect(nullptr, params.bounds);
+ gfx::Rect pixel_bounds; + gfx::Rect pixel_bounds;
+ if (has_external_parent_ && params.type != Widget::InitParams::TYPE_MENU) { + if (has_external_parent_ && params.type != Widget::InitParams::TYPE_MENU) {
+ // Scale relative to the screen that contains the parent window. + // Scale relative to the screen that contains the parent window.
+ // Child windows always have origin (0,0). + // Child windows always have origin (0,0).
+ pixel_bounds.set_size(display::win::ScreenWin::DIPToScreenSize( + pixel_bounds.set_size(display::win::GetScreenWin()->DIPToScreenSize(
+ parent_hwnd, params.bounds.size())); + parent_hwnd, params.bounds.size()));
+ } else { + } else {
+ // We don't have an HWND yet, so scale relative to the nearest screen. + // We don't have an HWND yet, so scale relative to the nearest screen.
+ pixel_bounds = + pixel_bounds =
+ display::win::ScreenWin::DIPToScreenRect(nullptr, params.bounds); + display::win::GetScreenWin()->DIPToScreenRect(nullptr, params.bounds);
+ } + }
+ +
message_handler_->Init(parent_hwnd, pixel_bounds); message_handler_->Init(parent_hwnd, pixel_bounds);
// If the Redirection Surface is removed, there needs to be a replacement // If the Redirection Surface is removed, there needs to be a replacement
@@ -245,6 +258,13 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { @@ -221,7 +234,7 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
// gutter.
if (((message_handler_->window_ex_style() & WS_EX_NOREDIRECTIONBITMAP) ==
WS_EX_NOREDIRECTIONBITMAP) &&
- !message_handler_->is_translucent()) {
+ !message_handler_->is_translucent() && !has_external_parent_) {
// Ensure that the hwnd has been created.
CHECK(GetHWND());
@@ -253,6 +266,13 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
InitHost(); InitHost();
window()->Show(); window()->Show();
@ -411,7 +420,16 @@ index 82e6f7c91bac6..6b851e154e01b 100644
// Stack immediately above its parent so that it does not cover other // Stack immediately above its parent so that it does not cover other
// root-level windows, with the exception of menus, to allow them to be // root-level windows, with the exception of menus, to allow them to be
// displayed on top of other windows. // displayed on top of other windows.
@@ -1178,6 +1198,18 @@ void DesktopWindowTreeHostWin::HandleWindowMinimizedOrRestored(bool restored) { @@ -284,7 +304,7 @@ void DesktopWindowTreeHostWin::OnWidgetInitDone() {}
void DesktopWindowTreeHostWin::OnWidgetThemeChanged(
ui::ColorProviderKey::ColorMode color_mode) {
- if (ShouldApplySystemBackdrop()) {
+ if (ShouldApplySystemBackdrop() && !has_external_parent_) {
// Ensure that DWM knows to apply the correct color scheme to the window
// backdrop whenever it changes.
BOOL use_dark_mode =
@@ -1207,6 +1227,18 @@ void DesktopWindowTreeHostWin::HandleWindowMinimizedOrRestored(bool restored) {
if (restored) { if (restored) {
window()->Show(); window()->Show();
@ -423,32 +441,34 @@ index 82e6f7c91bac6..6b851e154e01b 100644
+ // to avoid incorrect hidden state after restore. See CEF issue #3638. + // to avoid incorrect hidden state after restore. See CEF issue #3638.
+ if (aura::NativeWindowOcclusionTracker:: + if (aura::NativeWindowOcclusionTracker::
+ IsNativeWindowOcclusionTrackingAlwaysEnabled(this)) { + IsNativeWindowOcclusionTrackingAlwaysEnabled(this)) {
+ aura::NativeWindowOcclusionTracker:: + aura::NativeWindowOcclusionTracker::EnableNativeWindowOcclusionTracking(
+ EnableNativeWindowOcclusionTracking(this); + this);
+ } + }
+ } + }
} else { } else {
window()->Hide(); window()->Hide();
} }
@@ -1199,11 +1231,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { @@ -1228,11 +1260,17 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
} }
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
- // TODO(beng): inform the native_widget_delegate_. - // TODO(beng): inform the native_widget_delegate_.
+ // See comments in CefBrowserPlatformDelegateNativeWin::SetFocus. + // See comments in CefBrowserPlatformDelegateNativeWin::SetFocus.
+ if (has_external_parent_ && CanActivate()) + if (has_external_parent_ && CanActivate()) {
+ HandleActivationChanged(true); + HandleActivationChanged(true);
+ }
} }
void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
- // TODO(beng): inform the native_widget_delegate_. - // TODO(beng): inform the native_widget_delegate_.
+ // See comments in CefBrowserPlatformDelegateNativeWin::SetFocus. + // See comments in CefBrowserPlatformDelegateNativeWin::SetFocus.
+ if (has_external_parent_ && CanActivate()) + if (has_external_parent_ && CanActivate()) {
+ HandleActivationChanged(false); + HandleActivationChanged(false);
+ }
} }
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
@@ -1212,6 +1248,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { @@ -1241,6 +1279,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
return true; return true;
} }
@ -461,7 +481,7 @@ index 82e6f7c91bac6..6b851e154e01b 100644
SendEventToSink(event); SendEventToSink(event);
return event->handled(); return event->handled();
} }
@@ -1397,9 +1439,17 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { @@ -1426,9 +1470,17 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
// positions in variable-DPI situations. See https://crbug.com/1224715 for // positions in variable-DPI situations. See https://crbug.com/1224715 for
// details. // details.
aura::Window* root = nullptr; aura::Window* root = nullptr;
@ -481,12 +501,12 @@ index 82e6f7c91bac6..6b851e154e01b 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 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 2ee5e4b4673f4..62a6776b27ad9 100644 index dab595aacaeca..c10488756a657 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -345,6 +345,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin : public DesktopWindowTreeHost, @@ -348,6 +348,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// A Windows.Ui.Composition visual tree that represents the window backdrop.
base::ScopedObservation<Widget, WidgetObserver> widget_observation_{this}; std::unique_ptr<gfx::WUCBackdrop> wuc_backdrop_;
+ // True if the widget has a external parent view/window outside of the + // True if the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy. + // Chromium-controlled view/window hierarchy.
@ -500,10 +520,10 @@ index 2ee5e4b4673f4..62a6776b27ad9 100644
// the implementation of ::ShowCursor() is based on a counter, so making this // the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once // member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/native_widget_mac.mm ui/views/widget/native_widget_mac.mm diff --git ui/views/widget/native_widget_mac.mm ui/views/widget/native_widget_mac.mm
index ac690f3f12836..9457f936fd96d 100644 index 16790a4b9d155..7d5f11cdb3a53 100644
--- ui/views/widget/native_widget_mac.mm --- ui/views/widget/native_widget_mac.mm
+++ ui/views/widget/native_widget_mac.mm +++ ui/views/widget/native_widget_mac.mm
@@ -718,6 +718,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state, @@ -717,6 +717,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state,
break; break;
case ui::mojom::WindowShowState::kMaximized: case ui::mojom::WindowShowState::kMaximized:
case ui::mojom::WindowShowState::kFullscreen: case ui::mojom::WindowShowState::kFullscreen:
@ -512,10 +532,10 @@ index ac690f3f12836..9457f936fd96d 100644
break; break;
case ui::mojom::WindowShowState::kEnd: case ui::mojom::WindowShowState::kEnd:
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index b294759923814..719686b4db165 100644 index 5270118d8f8dc..98f974c10834a 100644
--- ui/views/widget/widget.cc --- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc +++ ui/views/widget/widget.cc
@@ -231,8 +231,8 @@ bool Widget::InitParams::ShouldInitAsHeadless() const { @@ -233,8 +233,8 @@ bool Widget::InitParams::ShouldInitAsHeadless() const {
return false; return false;
} }
@ -526,7 +546,7 @@ index b294759923814..719686b4db165 100644
} }
void Widget::InitParams::SetParent(gfx::NativeView parent_view) { void Widget::InitParams::SetParent(gfx::NativeView parent_view) {
@@ -458,7 +458,8 @@ void Widget::Init(InitParams params) { @@ -460,7 +460,8 @@ void Widget::Init(InitParams params) {
} }
params.child |= (params.type == InitParams::TYPE_CONTROL); params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -536,7 +556,7 @@ index b294759923814..719686b4db165 100644
is_headless_ = params.ShouldInitAsHeadless(); is_headless_ = params.ShouldInitAsHeadless();
is_autosized_ = params.autosize; is_autosized_ = params.autosize;
@@ -554,9 +555,14 @@ void Widget::Init(InitParams params) { @@ -556,9 +557,14 @@ void Widget::Init(InitParams params) {
if (show_state == ui::mojom::WindowShowState::kMaximized) { if (show_state == ui::mojom::WindowShowState::kMaximized) {
Maximize(); Maximize();
@ -551,7 +571,7 @@ index b294759923814..719686b4db165 100644
} }
#if BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS)
@@ -569,7 +575,12 @@ void Widget::Init(InitParams params) { @@ -571,7 +577,12 @@ void Widget::Init(InitParams params) {
} else if (delegate) { } else if (delegate) {
SetContentsView(delegate->TransferOwnershipOfContentsView()); SetContentsView(delegate->TransferOwnershipOfContentsView());
if (should_set_initial_bounds) { if (should_set_initial_bounds) {
@ -565,7 +585,7 @@ index b294759923814..719686b4db165 100644
} }
} }
@@ -1917,10 +1928,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { @@ -1928,10 +1939,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
} }
gfx::Size Widget::GetMinimumSize() const { gfx::Size Widget::GetMinimumSize() const {
@ -582,7 +602,7 @@ index b294759923814..719686b4db165 100644
return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
} }
@@ -2209,7 +2226,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) { @@ -2220,7 +2237,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
View* v = widget_delegate_->GetInitiallyFocusedView(); View* v = widget_delegate_->GetInitiallyFocusedView();
if (!focus_on_creation_ || if (!focus_on_creation_ ||
show_state == ui::mojom::WindowShowState::kInactive || show_state == ui::mojom::WindowShowState::kInactive ||
@ -593,7 +613,7 @@ index b294759923814..719686b4db165 100644
// focus when the window is restored. // focus when the window is restored.
if (v) { if (v) {
diff --git ui/views/widget/widget.h ui/views/widget/widget.h diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 4d1c7d95c338b..f2b45e10dc831 100644 index 65154f18c7ce7..67c626d78e5d3 100644
--- ui/views/widget/widget.h --- ui/views/widget/widget.h
+++ ui/views/widget/widget.h +++ ui/views/widget/widget.h
@@ -437,6 +437,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -437,6 +437,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@ -615,10 +635,39 @@ index 4d1c7d95c338b..f2b45e10dc831 100644
// Deactivates the widget, making the next window in the Z order the active // Deactivates the widget, making the next window in the Z order the active
// window. // window.
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 3936517a5d609..d5c2c2f9fadcd 100644 index 7c2463cb91d00..72c6a239ecc21 100644
--- ui/views/widget/widget_delegate.h --- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h
@@ -418,6 +418,10 @@ class VIEWS_EXPORT WidgetDelegate { @@ -24,6 +24,9 @@
#include "ui/views/widget/widget.h"
class AutoPipSettingView;
+class CefOverlayViewHost;
+class CefWindowDelegateView;
+class CefWindowView;
class DesktopMediaPickerDialogView;
class DigitalIdentityMultiStepDialogDelegate;
class DownloadBubbleContentsViewTest;
@@ -375,6 +378,8 @@ class VIEWS_EXPORT WidgetDelegate {
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
friend class ::AutoPipSettingView;
+ friend class ::CefOverlayViewHost;
+ friend class ::CefWindowView;
friend class ::DigitalIdentityMultiStepDialogDelegate;
friend class ::DownloadBubbleContentsViewTest;
friend class ::DownloadBubbleSecurityViewTest;
@@ -471,6 +476,9 @@ class VIEWS_EXPORT WidgetDelegate {
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
+ friend class ::CefOverlayViewHost;
+ friend class ::CefWindowDelegateView;
+ friend class ::CefWindowView;
friend class ::DesktopMediaPickerDialogView;
friend class ::MediaGalleriesDialogViews;
friend class ::PresentationReceiverWindowView;
@@ -795,6 +803,10 @@ class VIEWS_EXPORT WidgetDelegate {
// Returns true if the title text should be centered. // Returns true if the title text should be centered.
bool ShouldCenterWindowTitleText() const; bool ShouldCenterWindowTitleText() const;
@ -629,6 +678,22 @@ index 3936517a5d609..d5c2c2f9fadcd 100644
bool focus_traverses_out() const { return params_.focus_traverses_out; } bool focus_traverses_out() const { return params_.focus_traverses_out; }
bool enable_arrow_key_traversal() const { bool enable_arrow_key_traversal() const {
return params_.enable_arrow_key_traversal; return params_.enable_arrow_key_traversal;
@@ -917,7 +929,6 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
const Widget* GetWidget() const override;
View* GetContentsView() override;
- private:
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
@@ -984,6 +995,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
WidgetDelegateView();
+ private:
static WdvPassKey CreatePassKey() { return WdvPassKey(); }
};
diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc
index fe68bce38527b..c5fcee907f34f 100644 index fe68bce38527b..c5fcee907f34f 100644
--- ui/views/widget/widget_hwnd_utils.cc --- ui/views/widget/widget_hwnd_utils.cc
@ -644,10 +709,10 @@ index fe68bce38527b..c5fcee907f34f 100644
if (native_widget_delegate->IsDialogBox()) { if (native_widget_delegate->IsDialogBox()) {
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index a183cfe07b357..ac3929e2415a0 100644 index ac502dee8a217..b074472db272f 100644
--- ui/views/win/hwnd_message_handler.cc --- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc
@@ -815,7 +815,11 @@ bool HWNDMessageHandler::IsVisible() const { @@ -797,7 +797,11 @@ bool HWNDMessageHandler::IsVisible() const {
} }
bool HWNDMessageHandler::IsActive() const { bool HWNDMessageHandler::IsActive() const {
@ -660,7 +725,7 @@ index a183cfe07b357..ac3929e2415a0 100644
} }
bool HWNDMessageHandler::IsMinimized() const { bool HWNDMessageHandler::IsMinimized() const {
@@ -3283,10 +3287,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, @@ -3275,10 +3279,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::EventType::kMousewheel) { } else if (event.type() == ui::EventType::kMousewheel) {
ui::MouseWheelEvent mouse_wheel_event(msg); ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable. // Reroute the mouse wheel to the window under the pointer if applicable.

View File

@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644
private: private:
const HWND hwnd_; const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 2abb9b96124ad..c85d92e72b849 100644 index e522423645bf3..8e2ebe681241c 100644
--- components/viz/service/BUILD.gn --- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn
@@ -273,6 +273,8 @@ viz_component("service") { @@ -274,6 +274,8 @@ viz_component("service") {
"transitions/surface_animation_manager.h", "transitions/surface_animation_manager.h",
"transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.cc",
"transitions/transferable_resource_tracker.h", "transitions/transferable_resource_tracker.h",
@ -150,10 +150,10 @@ index f0aca972c4a81..87b40c9ded9df 100644
TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); 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 diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc
index 7839f5afb9ac1..fbb798ec211f3 100644 index 8e2ddfa9337b5..99f9da6929afb 100644
--- content/browser/compositor/viz_process_transport_factory.cc --- content/browser/compositor/viz_process_transport_factory.cc
+++ content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc
@@ -431,8 +431,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -389,8 +389,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private; mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private = root_params->display_private =
display_private.BindNewEndpointAndPassReceiver(); display_private.BindNewEndpointAndPassReceiver();
@ -191,10 +191,10 @@ index 9cabc57b4a561..54a1515c6f689 100644
// For destroying the GL context/surface that draw to a platform window before // For destroying the GL context/surface that draw to a platform window before
// the platform window is destroyed. // the platform window is destroyed.
diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom
index 3046e60995bce..2cc660b4d2d08 100644 index afdda5292ce89..cd82387967c66 100644
--- services/viz/privileged/mojom/compositing/display_private.mojom --- services/viz/privileged/mojom/compositing/display_private.mojom
+++ services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom
@@ -119,13 +119,15 @@ interface DisplayPrivate { @@ -117,13 +117,15 @@ interface DisplayPrivate {
// DisplayClient allows privileged clients to receive events from the Display. // DisplayClient allows privileged clients to receive events from the Display.
interface DisplayClient { interface DisplayClient {
@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644
+ Draw(gfx.mojom.Rect damage_rect) => (); + Draw(gfx.mojom.Rect damage_rect) => ();
}; };
diff --git ui/compositor/compositor.h ui/compositor/compositor.h diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index c802f9aae242c..a8b22d05aff27 100644 index 385074e896f4a..0583165a8f19d 100644
--- ui/compositor/compositor.h --- ui/compositor/compositor.h
+++ ui/compositor/compositor.h +++ ui/compositor/compositor.h
@@ -34,7 +34,9 @@ @@ -34,7 +34,9 @@
@ -261,7 +261,7 @@ index c802f9aae242c..a8b22d05aff27 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer // 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 // 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 // is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -629,6 +642,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, @@ -631,6 +644,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
simple_begin_frame_observers_; simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_; std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index f80d8ecc385df..b879741c441af 100644 index fe352434dd26e..72b68afb94d80 100644
--- content/browser/web_contents/web_contents_impl.cc --- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc
@@ -3916,6 +3916,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3947,6 +3947,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy, params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create()); base::UnguessableToken::Create());
@ -15,7 +15,7 @@ index f80d8ecc385df..b879741c441af 100644
std::unique_ptr<WebContentsViewDelegate> delegate = std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this); GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3926,6 +3932,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3957,6 +3963,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate), view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_); &render_view_host_delegate_view_);
} }
@ -23,7 +23,7 @@ index f80d8ecc385df..b879741c441af 100644
CHECK(render_view_host_delegate_view_); CHECK(render_view_host_delegate_view_);
CHECK(view_.get()); CHECK(view_.get());
@@ -4136,6 +4143,9 @@ void WebContentsImpl::RenderWidgetCreated( @@ -4167,6 +4174,9 @@ void WebContentsImpl::RenderWidgetCreated(
"render_widget_host", render_widget_host); "render_widget_host", render_widget_host);
CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId())); CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId()));
created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host; created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host;
@ -33,7 +33,7 @@ index f80d8ecc385df..b879741c441af 100644
} }
void WebContentsImpl::RenderWidgetDeleted( void WebContentsImpl::RenderWidgetDeleted(
@@ -5055,6 +5065,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5086,6 +5096,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options); create_params.picture_in_picture_options = *(params.pip_options);
} }
@ -49,7 +49,7 @@ index f80d8ecc385df..b879741c441af 100644
// Check whether there is an available prerendered page for this navigation if // 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 // this is not for guest. If it exists, take WebContents pre-created for
// hosting the prerendered page instead of creating new WebContents. // hosting the prerendered page instead of creating new WebContents.
@@ -9764,6 +9783,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, @@ -9913,6 +9932,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
} }
CloseListenerManager::DidChangeFocusedFrame(this); CloseListenerManager::DidChangeFocusedFrame(this);
@ -59,7 +59,7 @@ index f80d8ecc385df..b879741c441af 100644
} }
FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() { FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() {
@@ -10411,6 +10433,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) { @@ -10561,6 +10583,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::Resize"); OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::Resize");
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Window* window = GetNativeView(); aura::Window* window = GetNativeView();
@ -71,7 +71,7 @@ index f80d8ecc385df..b879741c441af 100644
window->SetBounds(gfx::Rect(window->bounds().origin(), new_bounds.size())); window->SetBounds(gfx::Rect(window->bounds().origin(), new_bounds.size()));
#elif BUILDFLAG(IS_ANDROID) #elif BUILDFLAG(IS_ANDROID)
content::RenderWidgetHostView* view = GetRenderWidgetHostView(); content::RenderWidgetHostView* view = GetRenderWidgetHostView();
@@ -10423,6 +10450,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) { @@ -10573,6 +10600,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
gfx::Size WebContentsImpl::GetSize() { gfx::Size WebContentsImpl::GetSize() {
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Window* window = GetNativeView(); aura::Window* window = GetNativeView();
@ -120,10 +120,10 @@ index f1105a13aa0eb..d1dba26bbac1f 100644
return gfx::Size(NSWidth(frame), NSHeight(frame)); return gfx::Size(NSWidth(frame), NSHeight(frame));
} }
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 4cf7eef3b54bb..620bfe54841d2 100644 index 437060750090e..337acf70169b1 100644
--- content/public/browser/web_contents.h --- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h +++ content/public/browser/web_contents.h
@@ -119,10 +119,12 @@ class BrowserPluginGuestDelegate; @@ -121,10 +121,12 @@ class BrowserPluginGuestDelegate;
class GuestPageHolder; class GuestPageHolder;
class RenderFrameHost; class RenderFrameHost;
class RenderViewHost; class RenderViewHost;
@ -136,7 +136,7 @@ index 4cf7eef3b54bb..620bfe54841d2 100644
class WebUI; class WebUI;
struct DropData; struct DropData;
struct MHTMLGenerationParams; struct MHTMLGenerationParams;
@@ -268,6 +270,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData { @@ -270,6 +272,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone; network::mojom::WebSandboxFlags::kNone;
@ -179,11 +179,11 @@ index da319cb207331..bcd4de085fa6b 100644
// typically happens when popups are created. // typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents, virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index 9f9f4cc755886..305095e5ef2f2 100644 index 4f97e13f9125e..1946f9909803b 100644
--- content/public/browser/web_contents_observer.h --- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h
@@ -255,6 +255,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { @@ -255,6 +255,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// to forwardGestures(), whichever the case ends up being. // controlled by the capturing tab.
virtual void OnCapturedSurfaceControl() {} virtual void OnCapturedSurfaceControl() {}
+ // This method is invoked when a RenderWidget is created. + // This method is invoked when a RenderWidget is created.
@ -192,7 +192,7 @@ index 9f9f4cc755886..305095e5ef2f2 100644
// This method is invoked when the `blink::WebView` of the current // This method is invoked when the `blink::WebView` of the current
// RenderViewHost is ready, e.g. because we recreated it after a crash. // RenderViewHost is ready, e.g. because we recreated it after a crash.
virtual void RenderViewReady() {} virtual void RenderViewReady() {}
@@ -949,6 +952,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { @@ -952,6 +955,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// WebContents has gained/lost focus. // WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} 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 diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index 617b7a582f133..8abc1bf0e6366 100644 index fa4beef133fd9..bc19a7b8bcc84 100644
--- third_party/blink/public/platform/platform.h --- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h
@@ -838,6 +838,11 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -837,6 +837,11 @@ class BLINK_PLATFORM_EXPORT Platform {
} }
#endif #endif

View File

@ -97,7 +97,7 @@ index 06f7cf79b4526..e0d395867f552 100644
base::ObserverList<WebViewObserver> observers_; base::ObserverList<WebViewObserver> observers_;
}; };
diff --git third_party/blink/renderer/core/frame/local_dom_window.cc third_party/blink/renderer/core/frame/local_dom_window.cc diff --git third_party/blink/renderer/core/frame/local_dom_window.cc third_party/blink/renderer/core/frame/local_dom_window.cc
index f4a1ed78679c5..711b072977662 100644 index de39a688207f8..41e5ffcfd5e09 100644
--- third_party/blink/renderer/core/frame/local_dom_window.cc --- third_party/blink/renderer/core/frame/local_dom_window.cc
+++ third_party/blink/renderer/core/frame/local_dom_window.cc +++ third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
@ -116,7 +116,7 @@ index f4a1ed78679c5..711b072977662 100644
#include "third_party/blink/renderer/core/html/custom/custom_element_registry.h" #include "third_party/blink/renderer/core/html/custom/custom_element_registry.h"
#include "third_party/blink/renderer/core/html/fenced_frame/fence.h" #include "third_party/blink/renderer/core/html/fenced_frame/fence.h"
#include "third_party/blink/renderer/core/html/forms/form_controller.h" #include "third_party/blink/renderer/core/html/forms/form_controller.h"
@@ -1914,8 +1916,9 @@ void LocalDOMWindow::moveBy(int x, int y) const { @@ -1922,8 +1924,9 @@ void LocalDOMWindow::moveBy(int x, int y) const {
return; return;
} }
@ -127,7 +127,7 @@ index f4a1ed78679c5..711b072977662 100644
LocalFrame* frame = GetFrame(); LocalFrame* frame = GetFrame();
Page* page = frame->GetPage(); Page* page = frame->GetPage();
@@ -1935,8 +1938,9 @@ void LocalDOMWindow::moveTo(int x, int y) const { @@ -1943,8 +1946,9 @@ void LocalDOMWindow::moveTo(int x, int y) const {
return; return;
} }
@ -138,7 +138,7 @@ index f4a1ed78679c5..711b072977662 100644
LocalFrame* frame = GetFrame(); LocalFrame* frame = GetFrame();
Page* page = frame->GetPage(); Page* page = frame->GetPage();
@@ -1959,7 +1963,8 @@ void LocalDOMWindow::resizeBy(int x, @@ -1967,7 +1971,8 @@ void LocalDOMWindow::resizeBy(int x,
} }
if (IsPictureInPictureWindow()) { if (IsPictureInPictureWindow()) {
@ -148,7 +148,7 @@ index f4a1ed78679c5..711b072977662 100644
exception_state.ThrowDOMException( exception_state.ThrowDOMException(
DOMExceptionCode::kNotAllowedError, DOMExceptionCode::kNotAllowedError,
"resizeBy() requires user activation in document picture-in-picture"); "resizeBy() requires user activation in document picture-in-picture");
@@ -1987,7 +1992,8 @@ void LocalDOMWindow::resizeTo(int width, @@ -1995,7 +2000,8 @@ void LocalDOMWindow::resizeTo(int width,
} }
if (IsPictureInPictureWindow()) { if (IsPictureInPictureWindow()) {
@ -158,7 +158,7 @@ index f4a1ed78679c5..711b072977662 100644
exception_state.ThrowDOMException( exception_state.ThrowDOMException(
DOMExceptionCode::kNotAllowedError, DOMExceptionCode::kNotAllowedError,
"resizeTo() requires user activation in document picture-in-picture"); "resizeTo() requires user activation in document picture-in-picture");
@@ -2456,6 +2462,12 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow( @@ -2464,6 +2470,12 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow(
To<LocalDOMWindow>(result.frame->DomWindow()); To<LocalDOMWindow>(result.frame->DomWindow());
pip_dom_window->SetIsPictureInPictureWindow(); pip_dom_window->SetIsPictureInPictureWindow();

View File

@ -1,8 +1,8 @@
diff --git base/time/time.h base/time/time.h diff --git base/time/time.h base/time/time.h
index 44921db485328..ae521c59ae388 100644 index ad554e5e3f904..a31d584b1fc0d 100644
--- base/time/time.h --- base/time/time.h
+++ base/time/time.h +++ base/time/time.h
@@ -136,6 +136,13 @@ constexpr bool isnan(double d) { @@ -137,6 +137,13 @@ constexpr bool isnan(double d) {
} // namespace } // namespace
@ -16,7 +16,7 @@ index 44921db485328..ae521c59ae388 100644
// TimeDelta ------------------------------------------------------------------ // TimeDelta ------------------------------------------------------------------
class BASE_EXPORT TimeDelta { class BASE_EXPORT TimeDelta {
@@ -324,8 +331,17 @@ class BASE_EXPORT TimeDelta { @@ -325,8 +332,17 @@ class BASE_EXPORT TimeDelta {
// Comparison operators. // Comparison operators.
friend constexpr bool operator==(TimeDelta, TimeDelta) = default; friend constexpr bool operator==(TimeDelta, TimeDelta) = default;
@ -34,7 +34,7 @@ index 44921db485328..ae521c59ae388 100644
// Returns this delta, ceiled/floored/rounded-away-from-zero to the nearest // Returns this delta, ceiled/floored/rounded-away-from-zero to the nearest
// multiple of |interval|. // multiple of |interval|.
@@ -482,8 +498,17 @@ class TimeBase { @@ -483,8 +499,17 @@ class TimeBase {
// Comparison operators // Comparison operators
friend constexpr bool operator==(const TimeBase&, const TimeBase&) = default; friend constexpr bool operator==(const TimeBase&, const TimeBase&) = default;

View File

@ -12,10 +12,10 @@ index 17699e60e60be..53658b54f4fa7 100644
} // namespace sandbox } // namespace sandbox
diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc
index 0ac08110aa260..7c1d4cf7d5e78 100644 index 8ca78708c537e..b8c427ba67d87 100644
--- sandbox/win/src/sandbox_policy_base.cc --- sandbox/win/src/sandbox_policy_base.cc
+++ sandbox/win/src/sandbox_policy_base.cc +++ sandbox/win/src/sandbox_policy_base.cc
@@ -194,12 +194,12 @@ PolicyGlobal* ConfigBase::policy() { @@ -197,12 +197,12 @@ PolicyGlobal* ConfigBase::policy() {
return policy_; return policy_;
} }
@ -31,7 +31,7 @@ index 0ac08110aa260..7c1d4cf7d5e78 100644
} }
return std::nullopt; return std::nullopt;
} }
@@ -785,14 +785,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { @@ -790,14 +790,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
return (SBOX_ALL_OK == rc); return (SBOX_ALL_OK == rc);
} }