Update to Chromium version 138.0.7204.0 (#1465706)

Mac: Require Xcode 16.3 (16E140) and SDK 15.4 (24E241)
This commit is contained in:
Marshall Greenblatt
2025-05-30 16:54:45 -04:00
parent c5e80eb44a
commit f8a746373e
81 changed files with 1080 additions and 692 deletions

View File

@@ -1661,6 +1661,7 @@ if (is_mac) {
]
}
if (!use_static_angle) {
# Add the ANGLE .dylibs in the MODULE_DIR of the Framework app bundle.
bundle_data("cef_framework_angle_binaries") {
sources = [
@@ -1674,6 +1675,7 @@ if (is_mac) {
"//ui/gl:angle_library_copy",
]
}
}
# We need to copy the CEF libraries so that the bundle_data dependencies have
# a "copy" target type. Otherwise for "shared_library" target types it will
@@ -1731,12 +1733,15 @@ if (is_mac) {
sources = libcef_sources_common + includes_mac
deps = libcef_deps_common + [
":cef_framework_angle_binaries",
":cef_framework_cef_binaries",
":cef_framework_resources",
":cef_framework_swiftshader_binaries",
]
if (!use_static_angle) {
deps += [ ":cef_framework_angle_binaries" ]
}
configs += [
":libcef_autogen_config",
":libcef_includes_config",

View File

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

View File

@@ -326,7 +326,7 @@ if(OS_MAC)
# Find the newest available base SDK.
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
foreach(OS_VERSION 14.2 14.0 11.0)
foreach(OS_VERSION 15.4 14.2 14.0 11.0)
set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk")
if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}")
set(CMAKE_OSX_SYSROOT ${SDK})

View File

@@ -672,7 +672,11 @@ typedef struct _cef_browser_settings_t {
/// Controls whether databases can be used. Also configurable using the
/// "disable-databases" command-line switch.
///
#if CEF_API_ADDED(CEF_NEXT)
cef_state_t databases_deprecated;
#else
cef_state_t databases;
#endif
///
/// Controls whether WebGL can be used. Note that WebGL requires hardware
@@ -1098,7 +1102,16 @@ typedef enum {
/// system state can't be recovered and will be unstable.
CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = 37,
#if CEF_API_ADDED(CEF_NEXT)
/// The browser process exited because it was re-launched without elevation.
CEF_RESULT_CODE_NORMAL_EXIT_AUTO_DE_ELEVATED = 38,
#endif
#if CEF_API_ADDED(CEF_NEXT)
CEF_RESULT_CODE_CHROME_LAST = 39,
#else
CEF_RESULT_CODE_CHROME_LAST = 38,
#endif
// The following values should be kept in sync with Chromium's
// sandbox::TerminationCodes type.
@@ -3633,6 +3646,9 @@ typedef enum {
#endif
#if CEF_API_ADDED(13400)
CEF_CPAIT_CHANGE_PASSWORD,
#endif
#if CEF_API_ADDED(CEF_NEXT)
CEF_CPAIT_LENS_OVERLAY_HOMEWORK,
#endif
CEF_CPAIT_NUM_VALUES,
} cef_chrome_page_action_icon_type_t;

View File

@@ -43,11 +43,12 @@ extern "C" {
/// ContentSettingsType type.
///
typedef enum {
// This setting governs whether cookies are enabled by the user in the
/// This setting governs whether cookies are enabled by the user in the
/// provided context. However, it may be overridden by other settings. This
/// enum should NOT be read directly to determine whether cookies are enabled;
/// the client should instead rely on the CookieSettings API.
CEF_CONTENT_SETTING_TYPE_COOKIES,
CEF_CONTENT_SETTING_TYPE_IMAGES,
CEF_CONTENT_SETTING_TYPE_JAVASCRIPT,
@@ -235,11 +236,15 @@ typedef enum {
/// screens. See also: https://w3c.github.io/window-placement
CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT,
/// Stores whether to allow insecure websites to make private network
/// requests.
/// See also: https://wicg.github.io/cors-rfc1918
/// Set through enterprise policies only.
/// Stores whether to allow insecure websites to make private network
/// requests.
/// See also: https://wicg.github.io/cors-rfc1918
/// Set through enterprise policies only.
#if CEF_API_ADDED(CEF_NEXT)
CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK_DEPRECATED,
#else
CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK,
#endif
/// Content setting which stores whether or not a site can access low-level
/// locally installed font data using the Local Fonts Access API.
@@ -511,6 +516,21 @@ typedef enum {
CEF_CONTENT_SETTING_TYPE_LOCAL_NETWORK_ACCESS,
#endif
#if CEF_API_ADDED(CEF_NEXT)
/// Stores information on-device language packs for which a site has
/// installed using the Web Speech API.
CEF_CONTENT_SETTING_TYPE_ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED,
/// Stores which Translator API language packs the site has initialized.
CEF_CONTENT_SETTING_TYPE_INITIALIZED_TRANSLATIONS,
/// Stores a list of notification ids where content detection found the
/// notification to be suspicious and a warning has already been shown for the
/// site. Used for recovering notification contents from the database if the
/// user decides they would like to see all of these notifications.
CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_IDS,
#endif
CEF_CONTENT_SETTING_TYPE_NUM_VALUES,
} cef_content_setting_types_t;

View File

@@ -567,7 +567,9 @@ struct CefBrowserSettingsTraits {
target->text_area_resize = src->text_area_resize;
target->tab_to_links = src->tab_to_links;
target->local_storage = src->local_storage;
#if !CEF_API_ADDED(CEF_NEXT)
target->databases = src->databases;
#endif
target->webgl = src->webgl;
target->background_color = src->background_color;

View File

@@ -588,13 +588,10 @@ bool ChromeContentBrowserClientCef::HandleExternalProtocol(
return true;
}
std::vector<std::unique_ptr<content::NavigationThrottle>>
ChromeContentBrowserClientCef::CreateThrottlesForNavigation(
content::NavigationHandle* navigation_handle) {
auto throttles = ChromeContentBrowserClient::CreateThrottlesForNavigation(
navigation_handle);
throttle::CreateThrottlesForNavigation(navigation_handle, throttles);
return throttles;
void ChromeContentBrowserClientCef::CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry) {
ChromeContentBrowserClient::CreateThrottlesForNavigation(registry);
throttle::CreateThrottlesForNavigation(registry);
}
bool ChromeContentBrowserClientCef::ConfigureNetworkContextParams(

View File

@@ -113,9 +113,8 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
override;
std::vector<std::unique_ptr<content::NavigationThrottle>>
CreateThrottlesForNavigation(
content::NavigationHandle* navigation_handle) override;
void CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry) override;
bool ConfigureNetworkContextParams(
content::BrowserContext* context,
bool in_memory,

View File

@@ -92,19 +92,19 @@ void NavigationOnUIThread(
} // namespace
void CreateThrottlesForNavigation(content::NavigationHandle* navigation_handle,
NavigationThrottleList& throttles) {
void CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry) {
CEF_REQUIRE_UIT();
// Must use SynchronyMode::kSync to ensure that OnBeforeBrowse is always
// called before OnBeforeResourceLoad.
std::unique_ptr<content::NavigationThrottle> throttle =
std::make_unique<navigation_interception::InterceptNavigationThrottle>(
navigation_handle, base::BindRepeating(&NavigationOnUIThread),
registry, base::BindRepeating(&NavigationOnUIThread),
navigation_interception::SynchronyMode::kSync, std::nullopt);
// Always execute our throttle first.
throttles.emplace(throttles.begin(), std::move(throttle));
registry.AddThrottle(std::move(throttle), /*first=*/true);
}
} // namespace throttle

View File

@@ -6,21 +6,14 @@
#define CEF_LIBCEF_BROWSER_NET_THROTTLE_HANDLER_H_
#pragma once
#include <memory>
#include <vector>
namespace content {
class NavigationHandle;
class NavigationThrottle;
class NavigationThrottleRegistry;
} // namespace content
namespace throttle {
using NavigationThrottleList =
std::vector<std::unique_ptr<content::NavigationThrottle>>;
void CreateThrottlesForNavigation(content::NavigationHandle* navigation_handle,
NavigationThrottleList& throttles);
void CreateThrottlesForNavigation(
content::NavigationThrottleRegistry& registry);
} // namespace throttle

View File

@@ -443,7 +443,9 @@ void CefRenderWidgetHostViewOSR::Hide() {
}
if (render_widget_host_) {
if (render_widget_host_->delegate()) {
render_widget_host_->WasHidden();
}
auto provider = content::RenderWidgetHostImpl::From(render_widget_host_)
->render_frame_metadata_provider();

View File

@@ -187,7 +187,7 @@ void CefVideoConsumerOSR::OnFrameCaptured(
view_->OnAcceleratedPaint(damage_rect, info->coded_size, paint_info);
#elif BUILDFLAG(IS_LINUX)
auto& gmb_handle = data->get_gpu_memory_buffer_handle();
auto& native_pixmap = gmb_handle.native_pixmap_handle;
auto& native_pixmap = gmb_handle.native_pixmap_handle();
CHECK(native_pixmap.planes.size() <= kAcceleratedPaintMaxPlanes);
cef_accelerated_paint_info_t paint_info;

View File

@@ -93,7 +93,6 @@ void SetCefPrefs(const CefBrowserSettings& cef,
SET_STATE(cef.text_area_resize, web.text_areas_are_resizable);
SET_STATE(cef.tab_to_links, web.tabs_to_links);
SET_STATE(cef.local_storage, web.local_storage_enabled);
SET_STATE(cef.databases, web.databases_enabled);
// Never explicitly enable GPU-related functions in this method because the
// GPU blacklist is not being checked here.

View File

@@ -530,14 +530,18 @@ CefRefPtr<CefValue> CefRequestContextImpl::GetWebsiteSetting(
return nullptr;
}
const auto setting_type = setting_helper::FromCefType(content_type);
if (!setting_type) {
return nullptr;
}
// Either or both URLs may be invalid.
GURL requesting_gurl(requesting_url.ToString());
GURL top_level_gurl(top_level_url.ToString());
content_settings::SettingInfo info;
base::Value value = settings_map->GetWebsiteSetting(
requesting_gurl, top_level_gurl,
static_cast<ContentSettingsType>(content_type), &info);
requesting_gurl, top_level_gurl, *setting_type, &info);
if (value.is_none()) {
return nullptr;
}
@@ -576,19 +580,22 @@ cef_content_setting_values_t CefRequestContextImpl::GetContentSetting(
return CEF_CONTENT_SETTING_VALUE_DEFAULT;
}
const auto setting_type = setting_helper::FromCefType(content_type);
if (!setting_type) {
return CEF_CONTENT_SETTING_VALUE_DEFAULT;
}
ContentSetting value = ContentSetting::CONTENT_SETTING_DEFAULT;
if (requesting_url.empty() && top_level_url.empty()) {
value = settings_map->GetDefaultContentSetting(
static_cast<ContentSettingsType>(content_type),
value = settings_map->GetDefaultContentSetting(*setting_type,
/*provider_id=*/nullptr);
} else {
GURL requesting_gurl(requesting_url.ToString());
GURL top_level_gurl(top_level_url.ToString());
if (requesting_gurl.is_valid() || top_level_gurl.is_valid()) {
value = settings_map->GetContentSetting(
requesting_gurl, top_level_gurl,
static_cast<ContentSettingsType>(content_type));
value = settings_map->GetContentSetting(requesting_gurl, top_level_gurl,
*setting_type);
}
}
@@ -901,6 +908,11 @@ void CefRequestContextImpl::SetWebsiteSettingInternal(
return;
}
const auto setting_type = setting_helper::FromCefType(content_type);
if (!setting_type) {
return;
}
// Starts as a NONE value.
base::Value new_value;
if (value && value->IsValid()) {
@@ -910,14 +922,13 @@ void CefRequestContextImpl::SetWebsiteSettingInternal(
if (requesting_url.empty() && top_level_url.empty()) {
settings_map->SetWebsiteSettingCustomScope(
ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
static_cast<ContentSettingsType>(content_type), std::move(new_value));
*setting_type, std::move(new_value));
} else {
GURL requesting_gurl(requesting_url.ToString());
GURL top_level_gurl(top_level_url.ToString());
if (requesting_gurl.is_valid() || top_level_gurl.is_valid()) {
settings_map->SetWebsiteSettingDefaultScope(
requesting_gurl, top_level_gurl,
static_cast<ContentSettingsType>(content_type), std::move(new_value));
requesting_gurl, top_level_gurl, *setting_type, std::move(new_value));
}
}
}
@@ -939,17 +950,20 @@ void CefRequestContextImpl::SetContentSettingInternal(
return;
}
const auto setting_type = setting_helper::FromCefType(content_type);
if (!setting_type) {
return;
}
if (requesting_url.empty() && top_level_url.empty()) {
settings_map->SetDefaultContentSetting(
static_cast<ContentSettingsType>(content_type),
settings_map->SetDefaultContentSetting(*setting_type,
static_cast<ContentSetting>(value));
} else {
GURL requesting_gurl(requesting_url.ToString());
GURL top_level_gurl(top_level_url.ToString());
if (requesting_gurl.is_valid() || top_level_gurl.is_valid()) {
settings_map->SetContentSettingDefaultScope(
requesting_gurl, top_level_gurl,
static_cast<ContentSettingsType>(content_type),
requesting_gurl, top_level_gurl, *setting_type,
static_cast<ContentSetting>(value));
}
}

View File

@@ -107,12 +107,283 @@ void Registrar::OnContentSettingChanged(
const CefString requesting_url(primary_pattern.ToRepresentativeUrl().spec());
const CefString top_level_url(secondary_pattern.ToRepresentativeUrl().spec());
const auto content_type =
static_cast<cef_content_setting_types_t>(content_type_set.GetType());
const auto content_type = ToCefType(content_type_set.GetType());
for (Registration& registration : observers_) {
registration.RunCallback(requesting_url, top_level_url, content_type);
}
}
#define TO_CEF_TYPE(name) \
case ContentSettingsType::name: \
return CEF_CONTENT_SETTING_TYPE_##name
cef_content_setting_types_t ToCefType(ContentSettingsType type) {
switch (type) {
TO_CEF_TYPE(COOKIES);
TO_CEF_TYPE(IMAGES);
TO_CEF_TYPE(JAVASCRIPT);
TO_CEF_TYPE(POPUPS);
TO_CEF_TYPE(GEOLOCATION);
TO_CEF_TYPE(NOTIFICATIONS);
TO_CEF_TYPE(AUTO_SELECT_CERTIFICATE);
TO_CEF_TYPE(MIXEDSCRIPT);
TO_CEF_TYPE(MEDIASTREAM_MIC);
TO_CEF_TYPE(MEDIASTREAM_CAMERA);
TO_CEF_TYPE(PROTOCOL_HANDLERS);
TO_CEF_TYPE(DEPRECATED_PPAPI_BROKER);
TO_CEF_TYPE(AUTOMATIC_DOWNLOADS);
TO_CEF_TYPE(MIDI_SYSEX);
TO_CEF_TYPE(SSL_CERT_DECISIONS);
TO_CEF_TYPE(PROTECTED_MEDIA_IDENTIFIER);
TO_CEF_TYPE(APP_BANNER);
TO_CEF_TYPE(SITE_ENGAGEMENT);
TO_CEF_TYPE(DURABLE_STORAGE);
TO_CEF_TYPE(USB_CHOOSER_DATA);
TO_CEF_TYPE(BLUETOOTH_GUARD);
TO_CEF_TYPE(BACKGROUND_SYNC);
TO_CEF_TYPE(AUTOPLAY);
TO_CEF_TYPE(IMPORTANT_SITE_INFO);
TO_CEF_TYPE(PERMISSION_AUTOBLOCKER_DATA);
TO_CEF_TYPE(ADS);
TO_CEF_TYPE(ADS_DATA);
TO_CEF_TYPE(MIDI);
TO_CEF_TYPE(PASSWORD_PROTECTION);
TO_CEF_TYPE(MEDIA_ENGAGEMENT);
TO_CEF_TYPE(SOUND);
TO_CEF_TYPE(CLIENT_HINTS);
TO_CEF_TYPE(SENSORS);
TO_CEF_TYPE(DEPRECATED_ACCESSIBILITY_EVENTS);
TO_CEF_TYPE(PAYMENT_HANDLER);
TO_CEF_TYPE(USB_GUARD);
TO_CEF_TYPE(BACKGROUND_FETCH);
TO_CEF_TYPE(INTENT_PICKER_DISPLAY);
TO_CEF_TYPE(IDLE_DETECTION);
TO_CEF_TYPE(SERIAL_GUARD);
TO_CEF_TYPE(SERIAL_CHOOSER_DATA);
TO_CEF_TYPE(PERIODIC_BACKGROUND_SYNC);
TO_CEF_TYPE(BLUETOOTH_SCANNING);
TO_CEF_TYPE(HID_GUARD);
TO_CEF_TYPE(HID_CHOOSER_DATA);
TO_CEF_TYPE(WAKE_LOCK_SCREEN);
TO_CEF_TYPE(WAKE_LOCK_SYSTEM);
TO_CEF_TYPE(LEGACY_COOKIE_ACCESS);
TO_CEF_TYPE(FILE_SYSTEM_WRITE_GUARD);
TO_CEF_TYPE(NFC);
TO_CEF_TYPE(BLUETOOTH_CHOOSER_DATA);
TO_CEF_TYPE(CLIPBOARD_READ_WRITE);
TO_CEF_TYPE(CLIPBOARD_SANITIZED_WRITE);
TO_CEF_TYPE(SAFE_BROWSING_URL_CHECK_DATA);
TO_CEF_TYPE(VR);
TO_CEF_TYPE(AR);
TO_CEF_TYPE(FILE_SYSTEM_READ_GUARD);
TO_CEF_TYPE(STORAGE_ACCESS);
TO_CEF_TYPE(CAMERA_PAN_TILT_ZOOM);
TO_CEF_TYPE(WINDOW_MANAGEMENT);
TO_CEF_TYPE(LOCAL_FONTS);
TO_CEF_TYPE(PERMISSION_AUTOREVOCATION_DATA);
TO_CEF_TYPE(FILE_SYSTEM_LAST_PICKED_DIRECTORY);
TO_CEF_TYPE(DISPLAY_CAPTURE);
TO_CEF_TYPE(FILE_SYSTEM_ACCESS_CHOOSER_DATA);
TO_CEF_TYPE(FEDERATED_IDENTITY_SHARING);
TO_CEF_TYPE(JAVASCRIPT_JIT);
TO_CEF_TYPE(HTTP_ALLOWED);
TO_CEF_TYPE(FORMFILL_METADATA);
TO_CEF_TYPE(DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION);
TO_CEF_TYPE(AUTO_DARK_WEB_CONTENT);
TO_CEF_TYPE(REQUEST_DESKTOP_SITE);
TO_CEF_TYPE(FEDERATED_IDENTITY_API);
TO_CEF_TYPE(NOTIFICATION_INTERACTIONS);
TO_CEF_TYPE(REDUCED_ACCEPT_LANGUAGE);
TO_CEF_TYPE(NOTIFICATION_PERMISSION_REVIEW);
TO_CEF_TYPE(PRIVATE_NETWORK_GUARD);
TO_CEF_TYPE(PRIVATE_NETWORK_CHOOSER_DATA);
TO_CEF_TYPE(FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS);
TO_CEF_TYPE(REVOKED_UNUSED_SITE_PERMISSIONS);
TO_CEF_TYPE(TOP_LEVEL_STORAGE_ACCESS);
TO_CEF_TYPE(FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION);
TO_CEF_TYPE(FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION);
TO_CEF_TYPE(ANTI_ABUSE);
TO_CEF_TYPE(THIRD_PARTY_STORAGE_PARTITIONING);
TO_CEF_TYPE(HTTPS_ENFORCED);
TO_CEF_TYPE(ALL_SCREEN_CAPTURE);
TO_CEF_TYPE(COOKIE_CONTROLS_METADATA);
TO_CEF_TYPE(TPCD_HEURISTICS_GRANTS);
TO_CEF_TYPE(TPCD_METADATA_GRANTS);
TO_CEF_TYPE(TPCD_TRIAL);
TO_CEF_TYPE(TOP_LEVEL_TPCD_TRIAL);
TO_CEF_TYPE(TOP_LEVEL_TPCD_ORIGIN_TRIAL);
TO_CEF_TYPE(AUTO_PICTURE_IN_PICTURE);
TO_CEF_TYPE(FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION);
TO_CEF_TYPE(FILE_SYSTEM_ACCESS_RESTORE_PERMISSION);
TO_CEF_TYPE(CAPTURED_SURFACE_CONTROL);
TO_CEF_TYPE(SMART_CARD_GUARD);
TO_CEF_TYPE(SMART_CARD_DATA);
TO_CEF_TYPE(WEB_PRINTING);
TO_CEF_TYPE(AUTOMATIC_FULLSCREEN);
TO_CEF_TYPE(SUB_APP_INSTALLATION_PROMPTS);
TO_CEF_TYPE(SPEAKER_SELECTION);
TO_CEF_TYPE(DIRECT_SOCKETS);
TO_CEF_TYPE(KEYBOARD_LOCK);
TO_CEF_TYPE(POINTER_LOCK);
TO_CEF_TYPE(REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS);
TO_CEF_TYPE(TRACKING_PROTECTION);
TO_CEF_TYPE(DISPLAY_MEDIA_SYSTEM_AUDIO);
TO_CEF_TYPE(JAVASCRIPT_OPTIMIZER);
TO_CEF_TYPE(STORAGE_ACCESS_HEADER_ORIGIN_TRIAL);
TO_CEF_TYPE(HAND_TRACKING);
TO_CEF_TYPE(WEB_APP_INSTALLATION);
TO_CEF_TYPE(DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS);
TO_CEF_TYPE(LEGACY_COOKIE_SCOPE);
TO_CEF_TYPE(ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER);
TO_CEF_TYPE(CONTROLLED_FRAME);
TO_CEF_TYPE(REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS);
TO_CEF_TYPE(LOCAL_NETWORK_ACCESS);
TO_CEF_TYPE(ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED);
TO_CEF_TYPE(INITIALIZED_TRANSLATIONS);
TO_CEF_TYPE(SUSPICIOUS_NOTIFICATION_IDS);
case ContentSettingsType::DEFAULT:
break;
}
NOTREACHED();
}
#define FROM_CEF_TYPE(name) \
case CEF_CONTENT_SETTING_TYPE_##name: \
return ContentSettingsType::name
std::optional<ContentSettingsType> FromCefType(
cef_content_setting_types_t type) {
switch (type) {
FROM_CEF_TYPE(COOKIES);
FROM_CEF_TYPE(IMAGES);
FROM_CEF_TYPE(JAVASCRIPT);
FROM_CEF_TYPE(POPUPS);
FROM_CEF_TYPE(GEOLOCATION);
FROM_CEF_TYPE(NOTIFICATIONS);
FROM_CEF_TYPE(AUTO_SELECT_CERTIFICATE);
FROM_CEF_TYPE(MIXEDSCRIPT);
FROM_CEF_TYPE(MEDIASTREAM_MIC);
FROM_CEF_TYPE(MEDIASTREAM_CAMERA);
FROM_CEF_TYPE(PROTOCOL_HANDLERS);
FROM_CEF_TYPE(DEPRECATED_PPAPI_BROKER);
FROM_CEF_TYPE(AUTOMATIC_DOWNLOADS);
FROM_CEF_TYPE(MIDI_SYSEX);
FROM_CEF_TYPE(SSL_CERT_DECISIONS);
FROM_CEF_TYPE(PROTECTED_MEDIA_IDENTIFIER);
FROM_CEF_TYPE(APP_BANNER);
FROM_CEF_TYPE(SITE_ENGAGEMENT);
FROM_CEF_TYPE(DURABLE_STORAGE);
FROM_CEF_TYPE(USB_CHOOSER_DATA);
FROM_CEF_TYPE(BLUETOOTH_GUARD);
FROM_CEF_TYPE(BACKGROUND_SYNC);
FROM_CEF_TYPE(AUTOPLAY);
FROM_CEF_TYPE(IMPORTANT_SITE_INFO);
FROM_CEF_TYPE(PERMISSION_AUTOBLOCKER_DATA);
FROM_CEF_TYPE(ADS);
FROM_CEF_TYPE(ADS_DATA);
FROM_CEF_TYPE(MIDI);
FROM_CEF_TYPE(PASSWORD_PROTECTION);
FROM_CEF_TYPE(MEDIA_ENGAGEMENT);
FROM_CEF_TYPE(SOUND);
FROM_CEF_TYPE(CLIENT_HINTS);
FROM_CEF_TYPE(SENSORS);
FROM_CEF_TYPE(DEPRECATED_ACCESSIBILITY_EVENTS);
FROM_CEF_TYPE(PAYMENT_HANDLER);
FROM_CEF_TYPE(USB_GUARD);
FROM_CEF_TYPE(BACKGROUND_FETCH);
FROM_CEF_TYPE(INTENT_PICKER_DISPLAY);
FROM_CEF_TYPE(IDLE_DETECTION);
FROM_CEF_TYPE(SERIAL_GUARD);
FROM_CEF_TYPE(SERIAL_CHOOSER_DATA);
FROM_CEF_TYPE(PERIODIC_BACKGROUND_SYNC);
FROM_CEF_TYPE(BLUETOOTH_SCANNING);
FROM_CEF_TYPE(HID_GUARD);
FROM_CEF_TYPE(HID_CHOOSER_DATA);
FROM_CEF_TYPE(WAKE_LOCK_SCREEN);
FROM_CEF_TYPE(WAKE_LOCK_SYSTEM);
FROM_CEF_TYPE(LEGACY_COOKIE_ACCESS);
FROM_CEF_TYPE(FILE_SYSTEM_WRITE_GUARD);
FROM_CEF_TYPE(NFC);
FROM_CEF_TYPE(BLUETOOTH_CHOOSER_DATA);
FROM_CEF_TYPE(CLIPBOARD_READ_WRITE);
FROM_CEF_TYPE(CLIPBOARD_SANITIZED_WRITE);
FROM_CEF_TYPE(SAFE_BROWSING_URL_CHECK_DATA);
FROM_CEF_TYPE(VR);
FROM_CEF_TYPE(AR);
FROM_CEF_TYPE(FILE_SYSTEM_READ_GUARD);
FROM_CEF_TYPE(STORAGE_ACCESS);
FROM_CEF_TYPE(CAMERA_PAN_TILT_ZOOM);
FROM_CEF_TYPE(WINDOW_MANAGEMENT);
FROM_CEF_TYPE(LOCAL_FONTS);
FROM_CEF_TYPE(PERMISSION_AUTOREVOCATION_DATA);
FROM_CEF_TYPE(FILE_SYSTEM_LAST_PICKED_DIRECTORY);
FROM_CEF_TYPE(DISPLAY_CAPTURE);
FROM_CEF_TYPE(FILE_SYSTEM_ACCESS_CHOOSER_DATA);
FROM_CEF_TYPE(FEDERATED_IDENTITY_SHARING);
FROM_CEF_TYPE(JAVASCRIPT_JIT);
FROM_CEF_TYPE(HTTP_ALLOWED);
FROM_CEF_TYPE(FORMFILL_METADATA);
FROM_CEF_TYPE(DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION);
FROM_CEF_TYPE(AUTO_DARK_WEB_CONTENT);
FROM_CEF_TYPE(REQUEST_DESKTOP_SITE);
FROM_CEF_TYPE(FEDERATED_IDENTITY_API);
FROM_CEF_TYPE(NOTIFICATION_INTERACTIONS);
FROM_CEF_TYPE(REDUCED_ACCEPT_LANGUAGE);
FROM_CEF_TYPE(NOTIFICATION_PERMISSION_REVIEW);
FROM_CEF_TYPE(PRIVATE_NETWORK_GUARD);
FROM_CEF_TYPE(PRIVATE_NETWORK_CHOOSER_DATA);
FROM_CEF_TYPE(FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS);
FROM_CEF_TYPE(REVOKED_UNUSED_SITE_PERMISSIONS);
FROM_CEF_TYPE(TOP_LEVEL_STORAGE_ACCESS);
FROM_CEF_TYPE(FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION);
FROM_CEF_TYPE(FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION);
FROM_CEF_TYPE(ANTI_ABUSE);
FROM_CEF_TYPE(THIRD_PARTY_STORAGE_PARTITIONING);
FROM_CEF_TYPE(HTTPS_ENFORCED);
FROM_CEF_TYPE(ALL_SCREEN_CAPTURE);
FROM_CEF_TYPE(COOKIE_CONTROLS_METADATA);
FROM_CEF_TYPE(TPCD_HEURISTICS_GRANTS);
FROM_CEF_TYPE(TPCD_METADATA_GRANTS);
FROM_CEF_TYPE(TPCD_TRIAL);
FROM_CEF_TYPE(TOP_LEVEL_TPCD_TRIAL);
FROM_CEF_TYPE(TOP_LEVEL_TPCD_ORIGIN_TRIAL);
FROM_CEF_TYPE(AUTO_PICTURE_IN_PICTURE);
FROM_CEF_TYPE(FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION);
FROM_CEF_TYPE(FILE_SYSTEM_ACCESS_RESTORE_PERMISSION);
FROM_CEF_TYPE(CAPTURED_SURFACE_CONTROL);
FROM_CEF_TYPE(SMART_CARD_GUARD);
FROM_CEF_TYPE(SMART_CARD_DATA);
FROM_CEF_TYPE(WEB_PRINTING);
FROM_CEF_TYPE(AUTOMATIC_FULLSCREEN);
FROM_CEF_TYPE(SUB_APP_INSTALLATION_PROMPTS);
FROM_CEF_TYPE(SPEAKER_SELECTION);
FROM_CEF_TYPE(DIRECT_SOCKETS);
FROM_CEF_TYPE(KEYBOARD_LOCK);
FROM_CEF_TYPE(POINTER_LOCK);
FROM_CEF_TYPE(REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS);
FROM_CEF_TYPE(TRACKING_PROTECTION);
FROM_CEF_TYPE(DISPLAY_MEDIA_SYSTEM_AUDIO);
FROM_CEF_TYPE(JAVASCRIPT_OPTIMIZER);
FROM_CEF_TYPE(STORAGE_ACCESS_HEADER_ORIGIN_TRIAL);
FROM_CEF_TYPE(HAND_TRACKING);
FROM_CEF_TYPE(WEB_APP_INSTALLATION);
FROM_CEF_TYPE(DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS);
FROM_CEF_TYPE(LEGACY_COOKIE_SCOPE);
FROM_CEF_TYPE(ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER);
FROM_CEF_TYPE(CONTROLLED_FRAME);
FROM_CEF_TYPE(REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS);
FROM_CEF_TYPE(LOCAL_NETWORK_ACCESS);
FROM_CEF_TYPE(ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED);
FROM_CEF_TYPE(INITIALIZED_TRANSLATIONS);
FROM_CEF_TYPE(SUSPICIOUS_NOTIFICATION_IDS);
case CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK_DEPRECATED:
case CEF_CONTENT_SETTING_TYPE_NUM_VALUES:
break;
}
return std::nullopt;
}
} // namespace setting_helper

View File

@@ -5,10 +5,14 @@
#ifndef CEF_LIBCEF_BROWSER_SETTING_HELPER_H_
#define CEF_LIBCEF_BROWSER_SETTING_HELPER_H_
#include <optional>
#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
#include "cef/include/cef_registration.h"
#include "cef/include/internal/cef_types_content_settings.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
#include "components/content_settings/core/common/content_settings_types.h"
class CefSettingObserver;
class CefRegistration;
@@ -76,6 +80,11 @@ class Registrar final : public content_settings::Observer {
base::ObserverList<Registration> observers_;
};
// Convert between cef_content_setting_types_t and ContentSettingsType.
cef_content_setting_types_t ToCefType(ContentSettingsType type);
std::optional<ContentSettingsType> FromCefType(
cef_content_setting_types_t type);
} // namespace setting_helper
#endif // CEF_LIBCEF_BROWSER_SETTING_HELPER_H_

View File

@@ -3,7 +3,6 @@
// can be found in the LICENSE file.
#include "base/feature_list.h"
#include "base/features.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "cef/include/test/cef_test_helpers.h"
@@ -20,7 +19,6 @@ bool CefIsFeatureEnabledForTests(const CefString& feature_name) {
// Only includes values that are queried by unit tests.
const base::Feature* features[] = {
&net::features::kIgnoreHSTSForLocalhost,
&base::features::kUseRustJsonParser,
&network::features::kReduceAcceptLanguage,
};

View File

@@ -48,7 +48,7 @@ void OverrideBaseBundleID() {
std::string bundle_id = GetMainBundleID();
DCHECK(!bundle_id.empty());
base::apple::SetBaseBundleID(bundle_id.c_str());
base::apple::SetBaseBundleIDOverride(bundle_id);
}
base::FilePath GetNormalChildProcessPath() {

View File

@@ -747,5 +747,9 @@ patches = [
# builds.
# https://github.com/chromiumembedded/cef/issues/3892
'name': 'config_3892'
},
{
# Add |first| parameter to NavigationThrottleRegistry::AddThrottle.
'name': 'content_throttle_registry'
}
]

View File

@@ -1,5 +1,5 @@
diff --git base/command_line.cc base/command_line.cc
index d4d3bc52426d1..69d48fac6bbf4 100644
index 7491285cd14c9..90044eb1dddbd 100644
--- base/command_line.cc
+++ base/command_line.cc
@@ -421,11 +421,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string,

View File

@@ -1,5 +1,5 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index e7f8b523e899a..234e5e0e3a2e3 100644
index 5c286d8d8f664..1ea302897d823 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -216,11 +216,6 @@ static_library("test_support") {
@@ -14,7 +14,7 @@ index e7f8b523e899a..234e5e0e3a2e3 100644
deps += [
":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor",
@@ -616,7 +611,7 @@ if (enable_base_tracing) {
@@ -615,7 +610,7 @@ if (enable_base_tracing) {
# processor depends on dev_sqlite. The two share the same symbols but have
# different implementations, so we need to hide dev_sqlite in this shared
# library even in non-component builds to prevent duplicate symbols.
@@ -23,7 +23,7 @@ index e7f8b523e899a..234e5e0e3a2e3 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -625,6 +620,8 @@ if (enable_base_tracing) {
@@ -624,6 +619,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@@ -32,7 +32,7 @@ index e7f8b523e899a..234e5e0e3a2e3 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -642,33 +639,6 @@ if (enable_base_tracing) {
@@ -641,33 +638,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ]
}
@@ -67,7 +67,7 @@ index e7f8b523e899a..234e5e0e3a2e3 100644
} else if (!is_component_build && is_mac) {
# Provide a dummy target in order for clients to not have to special-case
diff --git base/test/test_trace_processor_export.h base/test/test_trace_processor_export.h
index f5191b804bc07..aadb7d66ba4c3 100644
index 94b5a2ab1e751..6dacffae228ef 100644
--- base/test/test_trace_processor_export.h
+++ base/test/test_trace_processor_export.h
@@ -5,6 +5,7 @@
@@ -78,8 +78,8 @@ index f5191b804bc07..aadb7d66ba4c3 100644
#if defined(WIN32)
#if defined(TEST_TRACE_PROCESSOR_IMPL)
@@ -23,4 +24,8 @@
@@ -17,4 +18,8 @@
#define TEST_TRACE_PROCESSOR_EXPORT __attribute__((visibility("default")))
#endif // defined(WIN32)
+#else // defined(COMPONENT_BUILD)
@@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index 205af82b45ce2..5944a9aa253f2 100644
index d257dbbb2e6f4..886c8e8bc05d7 100644
--- content/shell/BUILD.gn
+++ content/shell/BUILD.gn
@@ -936,7 +936,6 @@ if (is_mac) {
@@ -934,7 +934,6 @@ if (is_mac) {
# Specify a sensible install_name for static builds. The library is
# dlopen()ed so this is not used to resolve the module.
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]

View File

@@ -1,8 +1,8 @@
diff --git base/task/thread_pool/thread_pool_impl.cc base/task/thread_pool/thread_pool_impl.cc
index d7f9c33417f64..a6561d3dad060 100644
index e3f1345ac8f1b..e38404995b8bd 100644
--- base/task/thread_pool/thread_pool_impl.cc
+++ base/task/thread_pool/thread_pool_impl.cc
@@ -108,6 +108,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
@@ -109,6 +109,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
ThreadGroupType::BACKGROUND, task_tracker_->GetTrackedRef(),
tracked_ref_factory_.GetTrackedRef());
}

View File

@@ -1,5 +1,5 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 5fef13808a906..57f16de69e1c7 100644
index 75e28e8088848..9abea1a35f11b 100644
--- third_party/blink/public/web/web_element.h
+++ third_party/blink/public/web/web_element.h
@@ -83,6 +83,9 @@ class BLINK_EXPORT WebElement : public WebNode {
@@ -13,10 +13,10 @@ index 5fef13808a906..57f16de69e1c7 100644
void Focus();
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
index 2ec717ac9c654..85fb4e44aa4a0 100644
index 6859e192048d3..2b14176b6aa0d 100644
--- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc
@@ -122,6 +122,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
@@ -124,6 +124,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
IGNORE_EXCEPTION_FOR_TESTING);
}

View File

@@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 53a73d6c75b7a..05290de4c03a0 100644
index 4316d8b8bc09d..d6927a4e71460 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -2146,6 +2146,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
@@ -2145,6 +2145,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
if (actual_process_lock.matches_scheme(url::kDataScheme)) {
return true;
}
@@ -20,53 +20,79 @@ index 53a73d6c75b7a..05290de4c03a0 100644
// 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
index 4c78563c29ce9..029b8c5c30ef4 100644
index 32affd3a936bd..9d0723139658c 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -8557,10 +8557,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -8601,7 +8601,8 @@ std::optional<url::Origin> NavigationRequest::GetOriginToCommit() {
}
url::Origin NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponse(
- network::mojom::WebSandboxFlags sandbox_flags) {
+ network::mojom::WebSandboxFlags sandbox_flags,
+ bool* cef_nonstandard) {
// Calculate an approximation of the origin. The sandbox/csp are ignored.
url::Origin origin = GetOriginForURLLoaderFactoryUnchecked();
@@ -8618,6 +8619,17 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponse(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
+ if (use_opaque_origin) {
+ origin_and_debug_info.second += ", sandbox_flags";
+ }
+
+ if (!origin_and_debug_info.first.GetURL().IsStandard()) {
+ if (!origin.GetURL().IsStandard()) {
+ // Always return an opaque origin for non-standard URLs. Otherwise, the
+ // CanAccessDataForOrigin() check may fail for unregistered custom scheme
+ // requests in CEF.
+ // CanAccessDataForOrigin() check may fail for unregistered custom
+ // scheme requests in CEF.
+ use_opaque_origin = true;
+ origin_and_debug_info.second += ", cef_nonstandard";
+ if (cef_nonstandard) {
+ *cef_nonstandard = true;
+ }
+ }
+
if (use_opaque_origin) {
origin_and_debug_info =
std::pair(origin_and_debug_info.first.DeriveNewOpaqueOrigin(),
- origin_and_debug_info.second + ", sandbox_flags");
+ origin_and_debug_info.second);
origin = origin.DeriveNewOpaqueOrigin();
}
@@ -8677,8 +8689,9 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponse() {
return GetRenderFrameHost()->GetLastCommittedOrigin();
}
return origin_and_debug_info;
@@ -8668,11 +8680,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
- url::Origin origin =
- GetOriginForURLLoaderFactoryBeforeResponse(SandboxFlagsToCommit());
+ bool cef_nonstandard = false;
+ url::Origin origin = GetOriginForURLLoaderFactoryBeforeResponse(
+ SandboxFlagsToCommit(), &cef_nonstandard);
SCOPED_CRASH_KEY_BOOL("Bug1454273", "is_in_main_frame", IsInMainFrame());
SCOPED_CRASH_KEY_STRING256(
@@ -8713,10 +8726,17 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponse() {
DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host()));
+ if (origin_with_debug_info.first.opaque() &&
+ origin_with_debug_info.second.find("cef_nonstandard") !=
+ std::string::npos) {
+ if (origin.opaque() && cef_nonstandard) {
+ // Always return an opaque origin for non-standard URLs. Otherwise, the
+ // below CanAccessDataForOrigin() check may fail for unregistered custom
+ // scheme requests in CEF.
+ return origin_with_debug_info;
+ // below CanAccessOrigin() check may fail for unregistered custom scheme
+ // requests in CEF.
+ return origin;
+ }
+
// MHTML documents should commit as an opaque origin. They should not be able
// to make network request on behalf of the real origin.
// TODO(crbug.com/370979008): Migrate to CHECK.
- DUMP_WILL_BE_CHECK(!IsMhtmlOrSubframe() ||
- origin_with_debug_info.first.opaque());
+ // DUMP_WILL_BE_CHECK(!IsMhtmlOrSubframe() ||
+ // origin_with_debug_info.first.opaque());
- DUMP_WILL_BE_CHECK(!IsMhtmlOrSubframe() || origin.opaque());
+ // DUMP_WILL_BE_CHECK(!IsMhtmlOrSubframe() || origin.opaque());
// If the target of this navigation will be rendered in a RenderFrameHost,
// then verify that the chosen origin is allowed to be accessed from that
diff --git content/browser/renderer_host/navigation_request.h content/browser/renderer_host/navigation_request.h
index 70321378be68d..b60791ca6bb88 100644
--- content/browser/renderer_host/navigation_request.h
+++ content/browser/renderer_host/navigation_request.h
@@ -2311,7 +2311,8 @@ class CONTENT_EXPORT NavigationRequest
// situations where the final frame host hasn't been determined but the origin
// is needed to create URLLoaderFactory.
url::Origin GetOriginForURLLoaderFactoryBeforeResponse(
- network::mojom::WebSandboxFlags sandbox_flags);
+ network::mojom::WebSandboxFlags sandbox_flags,
+ bool* cef_nonstandard = nullptr);
// Superset of GetOriginForURLLoaderFactoryBeforeResponse(). Calculates
// the origin with information from the final frame host. Can be called only

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index ad39862fdd9a5..c0f75004f4fc4 100644
index d4f8a4fc16463..ae8beed827a9e 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@@ -9,8 +9,8 @@ index ad39862fdd9a5..c0f75004f4fc4 100644
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/browser/request_header_integrity/buildflags.gni")
@@ -1879,6 +1880,7 @@ static_library("browser") {
import("//chrome/common/features.gni")
@@ -1894,6 +1895,7 @@ static_library("browser") {
"//build/config/compiler:compiler_buildflags",
"//build/config/linux/dbus:buildflags",
"//cc",
@@ -18,7 +18,7 @@ index ad39862fdd9a5..c0f75004f4fc4 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2583,6 +2585,10 @@ static_library("browser") {
@@ -2624,6 +2626,10 @@ static_library("browser") {
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
}

View File

@@ -13,10 +13,10 @@ index 7603c2662b8dc..9a38d816bdc40 100644
return false;
}
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index 720839ed7b796..0d14fe57d841d 100644
index e8fda706fb348..c98ef9e3f6f4d 100644
--- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc
@@ -39,6 +39,7 @@
@@ -38,6 +38,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/task_manager/web_contents_tags.h"
@@ -24,7 +24,7 @@ index 720839ed7b796..0d14fe57d841d 100644
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/tabs/tab_strip_user_gesture_details.h"
@@ -1206,6 +1207,13 @@ DevToolsWindow* DevToolsWindow::Create(
@@ -1249,6 +1250,13 @@ DevToolsWindow* DevToolsWindow::Create(
if (!browser || !browser->is_type_normal()) {
can_dock = false;
}
@@ -38,7 +38,7 @@ index 720839ed7b796..0d14fe57d841d 100644
}
#endif
@@ -1647,7 +1655,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
@@ -1713,7 +1721,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
/*navigation_handle_callback=*/{})) {
#if BUILDFLAG(IS_ANDROID)
NOTIMPLEMENTED();
@@ -49,7 +49,7 @@ index 720839ed7b796..0d14fe57d841d 100644
chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url,
ui::PAGE_TRANSITION_LINK);
@@ -1828,12 +1838,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
@@ -1900,12 +1910,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) {
return;
}
@@ -83,7 +83,7 @@ index 720839ed7b796..0d14fe57d841d 100644
OverrideAndSyncDevToolsRendererPrefs();
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index b24f97d12db79..55ed091b2c91c 100644
index 13941994fd5df..831c19f2fa275 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni")
@@ -94,7 +94,7 @@ index b24f97d12db79..55ed091b2c91c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -303,6 +304,10 @@ static_library("ui") {
@@ -281,6 +282,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -105,7 +105,7 @@ index b24f97d12db79..55ed091b2c91c 100644
public_deps = [
# WARNING WARNING WARNING
# New dependencies outside of //chrome/browser should be added to
@@ -330,6 +335,7 @@ static_library("ui") {
@@ -308,6 +313,7 @@ static_library("ui") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/linux/dbus:buildflags",
"//cc/paint",
@@ -113,7 +113,7 @@ index b24f97d12db79..55ed091b2c91c 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/app:chrome_dll_resources",
@@ -707,6 +713,13 @@ static_library("ui") {
@@ -687,6 +693,13 @@ static_library("ui") {
deps += [ "//components/plus_addresses/resources:vector_icons" ]
}
@@ -127,7 +127,7 @@ index b24f97d12db79..55ed091b2c91c 100644
# TODO(crbug.com/41437292): Remove this circular dependency.
# Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies".
# These are all-platform circular includes.
@@ -5539,6 +5552,7 @@ static_library("ui") {
@@ -5506,6 +5519,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@@ -136,10 +136,10 @@ index b24f97d12db79..55ed091b2c91c 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 435235c067f70..63d2b0381c277 100644
index 8c5e577eb89cf..9e18f03f0c8da 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -273,6 +273,25 @@
@@ -279,6 +279,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@@ -165,7 +165,7 @@ index 435235c067f70..63d2b0381c277 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -572,6 +591,10 @@ Browser::Browser(const CreateParams& params)
@@ -627,6 +646,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type),
profile_(params.profile),
window_(nullptr),
@@ -176,7 +176,7 @@ index 435235c067f70..63d2b0381c277 100644
tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>(
@@ -819,6 +842,12 @@ Browser::~Browser() {
@@ -864,6 +887,12 @@ Browser::~Browser() {
if (select_file_dialog_.get()) {
select_file_dialog_->ListenerDestroyed();
}
@@ -189,7 +189,7 @@ index 435235c067f70..63d2b0381c277 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1284,6 +1313,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
@@ -1336,6 +1365,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
return type_;
}
@@ -200,7 +200,7 @@ index 435235c067f70..63d2b0381c277 100644
BrowserUserEducationInterface* Browser::GetUserEducationInterface() {
return window();
}
@@ -1466,6 +1499,8 @@ void Browser::WindowFullscreenStateChanged() {
@@ -1522,6 +1555,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@@ -209,7 +209,7 @@ index 435235c067f70..63d2b0381c277 100644
}
void Browser::FullscreenTopUIStateChanged() {
@@ -1837,6 +1872,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1905,6 +1940,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
return content::KeyboardEventProcessingResult::HANDLED;
}
@@ -225,7 +225,7 @@ index 435235c067f70..63d2b0381c277 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1844,8 +1888,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1912,8 +1956,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@@ -246,7 +246,7 @@ index 435235c067f70..63d2b0381c277 100644
}
bool Browser::TabsNeedBeforeUnloadFired() const {
@@ -1940,9 +1994,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
@@ -2008,9 +2062,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
content::PreloadingEligibility Browser::IsPrerender2Supported(
content::WebContents& web_contents,
content::PreloadingTriggerType trigger_type) {
@@ -261,7 +261,7 @@ index 435235c067f70..63d2b0381c277 100644
}
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
@@ -2005,6 +2064,14 @@ WebContents* Browser::OpenURLFromTab(
@@ -2073,6 +2132,14 @@ WebContents* Browser::OpenURLFromTab(
std::move(navigation_handle_callback));
}
@@ -276,7 +276,7 @@ index 435235c067f70..63d2b0381c277 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -2178,6 +2245,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -2246,6 +2313,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@@ -285,7 +285,7 @@ index 435235c067f70..63d2b0381c277 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -2187,6 +2256,13 @@ void Browser::CloseContents(WebContents* source) {
@@ -2255,6 +2324,13 @@ void Browser::CloseContents(WebContents* source) {
}
void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -299,7 +299,7 @@ index 435235c067f70..63d2b0381c277 100644
if (is_type_normal()) {
return;
}
@@ -2207,6 +2283,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -2275,6 +2351,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -308,7 +308,7 @@ index 435235c067f70..63d2b0381c277 100644
std::vector<StatusBubble*> status_bubbles = GetStatusBubbles();
for (StatusBubble* status_bubble : status_bubbles) {
StatusBubbleViews* status_bubble_views =
@@ -2220,6 +2298,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -2288,6 +2366,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
}
}
@@ -326,7 +326,7 @@ index 435235c067f70..63d2b0381c277 100644
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
const ui::EventType type = event.type();
const bool exited = type == ui::EventType::kMouseExited;
@@ -2253,9 +2342,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
@@ -2321,9 +2410,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
}
bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -350,7 +350,7 @@ index 435235c067f70..63d2b0381c277 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -2372,12 +2475,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -2466,12 +2569,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// to track `new_contents` after it is added to its TabModel this override can
// be removed.
CreateSessionServiceTabHelper(new_contents);
@@ -375,7 +375,7 @@ index 435235c067f70..63d2b0381c277 100644
// Don't show the page hung dialog when a HTML popup hangs because
// the dialog will take the focus and immediately close the popup.
RenderWidgetHostView* view = render_widget_host->GetView();
@@ -2390,6 +2505,13 @@ void Browser::RendererUnresponsive(
@@ -2484,6 +2599,13 @@ void Browser::RendererUnresponsive(
void Browser::RendererResponsive(
WebContents* source,
content::RenderWidgetHost* render_widget_host) {
@@ -389,7 +389,7 @@ index 435235c067f70..63d2b0381c277 100644
RenderWidgetHostView* view = render_widget_host->GetView();
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
@@ -2399,6 +2521,15 @@ void Browser::RendererResponsive(
@@ -2493,6 +2615,15 @@ void Browser::RendererResponsive(
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
WebContents* source) {
@@ -405,7 +405,7 @@ index 435235c067f70..63d2b0381c277 100644
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
}
@@ -2434,6 +2565,11 @@ void Browser::DraggableRegionsChanged(
@@ -2528,6 +2659,11 @@ void Browser::DraggableRegionsChanged(
if (app_controller_) {
app_controller_->DraggableRegionsChanged(regions, contents);
}
@@ -417,7 +417,7 @@ index 435235c067f70..63d2b0381c277 100644
}
std::vector<blink::mojom::RelatedApplicationPtr>
@@ -2548,11 +2684,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -2642,11 +2778,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@@ -433,7 +433,7 @@ index 435235c067f70..63d2b0381c277 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2762,6 +2902,16 @@ void Browser::RequestMediaAccessPermission(
@@ -2857,6 +2997,16 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@@ -450,7 +450,7 @@ index 435235c067f70..63d2b0381c277 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -3352,9 +3502,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -3447,9 +3597,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
std::vector<StatusBubble*> Browser::GetStatusBubbles() {
@@ -463,7 +463,7 @@ index 435235c067f70..63d2b0381c277 100644
}
// We hide the status bar for web apps windows as this matches native
@@ -3362,6 +3514,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() {
@@ -3457,6 +3609,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() {
// mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) {
@@ -476,7 +476,7 @@ index 435235c067f70..63d2b0381c277 100644
return {};
}
@@ -3515,6 +3673,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -3610,6 +3768,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents);
}
@@ -485,7 +485,7 @@ index 435235c067f70..63d2b0381c277 100644
}
void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3676,6 +3836,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
@@ -3771,6 +3931,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const {
@@ -501,7 +501,7 @@ index 435235c067f70..63d2b0381c277 100644
case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index c4cea0b6e8c4c..2beda8338cb08 100644
index 1de7f9596b2f8..9dba7bad5931b 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -24,6 +24,7 @@
@@ -523,7 +523,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
#if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -351,6 +356,15 @@ class Browser : public TabStripModelObserver,
@@ -350,6 +355,15 @@ class Browser : public TabStripModelObserver,
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
@@ -539,7 +539,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -434,6 +448,13 @@ class Browser : public TabStripModelObserver,
@@ -433,6 +447,13 @@ class Browser : public TabStripModelObserver,
update_ui_immediately_for_testing_ = true;
}
@@ -553,7 +553,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -535,6 +556,12 @@ class Browser : public TabStripModelObserver,
@@ -526,6 +547,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
@@ -566,7 +566,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -891,6 +918,7 @@ class Browser : public TabStripModelObserver,
@@ -886,6 +913,7 @@ class Browser : public TabStripModelObserver,
ImmersiveModeController* GetImmersiveModeController() override;
BrowserActions* GetActions() override;
Type GetType() const override;
@@ -574,7 +574,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
BrowserUserEducationInterface* GetUserEducationInterface() override;
web_app::AppBrowserController* GetAppBrowserController() override;
std::vector<tabs::TabInterface*> GetAllTabInterfaces() override;
@@ -1012,10 +1040,18 @@ class Browser : public TabStripModelObserver,
@@ -1011,10 +1039,18 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@@ -604,7 +604,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1428,6 +1468,8 @@ class Browser : public TabStripModelObserver,
@@ -1426,6 +1466,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@@ -614,7 +614,7 @@ index c4cea0b6e8c4c..2beda8338cb08 100644
UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 474e4ba66d7af..ca68cd989693e 100644
index 5f848bb04fe2a..4bf63873097bb 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -255,6 +255,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
@@ -684,10 +684,10 @@ index 83a510defbda5..f4305701c5f5a 100644
params.source_contents = source_contents;
params.url = target_url;
diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc
index 7b158e39c965a..dc4d385a2c1a9 100644
index 57e4a41495830..7b8c001d4f62a 100644
--- chrome/browser/ui/browser_window/browser_window_features.cc
+++ chrome/browser/ui/browser_window/browser_window_features.cc
@@ -100,6 +100,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
@@ -105,6 +105,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
BrowserWindowFeatures::~BrowserWindowFeatures() = default;
@@ -703,7 +703,7 @@ index 7b158e39c965a..dc4d385a2c1a9 100644
// static
void BrowserWindowFeatures::ReplaceBrowserWindowFeaturesForTesting(
BrowserWindowFeaturesFactory factory) {
@@ -190,10 +199,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
@@ -205,10 +214,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
}
void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
@@ -717,16 +717,16 @@ index 7b158e39c965a..dc4d385a2c1a9 100644
if (IsChromeLabsEnabled()) {
chrome_labs_coordinator_ =
std::make_unique<ChromeLabsCoordinator>(browser);
@@ -235,7 +246,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
@@ -263,7 +274,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
}
}
- if ((browser->is_type_normal() || browser->is_type_app()) &&
+ if ((supports_toolbar || browser->is_type_app()) &&
base::FeatureList::IsEnabled(toast_features::kToastFramework)) {
- if (browser->is_type_normal() || browser->is_type_app()) {
+ if (supports_toolbar || browser->is_type_app()) {
toast_service_ = std::make_unique<ToastService>(browser);
}
@@ -277,10 +288,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
}
@@ -295,10 +306,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
browser_view->browser(),
side_panel_coordinator_->GetWindowRegistry());
@@ -738,13 +738,13 @@ index 7b158e39c965a..dc4d385a2c1a9 100644
- if (browser_view->GetIsNormalType()) {
+ if (supports_toolbar) {
#if BUILDFLAG(ENABLE_GLIC)
if (glic::GlicEnabling::IsProfileEligible(
browser_view->browser()->profile())) {
glic::GlicKeyedService* glic_service =
glic::GlicKeyedService::Get(browser_view->GetProfile());
diff --git chrome/browser/ui/browser_window/public/browser_window_features.h chrome/browser/ui/browser_window/public/browser_window_features.h
index 5ba81ee463c84..c56a89c8d1911 100644
index f72f8787ba80a..0d9b32b79b062 100644
--- chrome/browser/ui/browser_window/public/browser_window_features.h
+++ chrome/browser/ui/browser_window/public/browser_window_features.h
@@ -91,6 +91,8 @@ class BrowserWindowFeatures {
@@ -93,6 +93,8 @@ class BrowserWindowFeatures {
static std::unique_ptr<BrowserWindowFeatures> CreateBrowserWindowFeatures();
virtual ~BrowserWindowFeatures();
@@ -754,10 +754,10 @@ index 5ba81ee463c84..c56a89c8d1911 100644
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
index d1862cd7b90b2..fcaa4b4ac3ade 100644
index 7e1194112343a..0a0e8c1818a3c 100644
--- chrome/browser/ui/browser_window/public/browser_window_interface.h
+++ chrome/browser/ui/browser_window/public/browser_window_interface.h
@@ -211,6 +211,10 @@ class BrowserWindowInterface : public content::PageNavigator {
@@ -229,6 +229,10 @@ class BrowserWindowInterface : public content::PageNavigator {
};
virtual Type GetType() const = 0;

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index a333dcbe56bd2..cf34318b16f04 100644
index eaaab56c72145..6122e12186952 100644
--- 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() {
@@ -358,6 +358,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@@ -21,7 +21,7 @@ index a333dcbe56bd2..cf34318b16f04 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -623,6 +635,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -632,6 +644,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
return 1;
}
@@ -32,7 +32,7 @@ index a333dcbe56bd2..cf34318b16f04 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -894,6 +910,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -906,6 +922,14 @@ RenderViewContextMenu::RenderViewContextMenu(
: nullptr;
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -47,7 +47,7 @@ index a333dcbe56bd2..cf34318b16f04 100644
observers_.AddObserver(&autofill_context_menu_manager_);
}
@@ -1352,6 +1376,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1373,6 +1397,12 @@ void RenderViewContextMenu::InitMenu() {
autofill_client->HideAutofillSuggestions(
autofill::SuggestionHidingReason::kContextMenuOpened);
}
@@ -60,7 +60,7 @@ index a333dcbe56bd2..cf34318b16f04 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3648,6 +3678,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
@@ -3678,6 +3708,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
observers_.RemoveObserver(observer);
}
@@ -88,10 +88,10 @@ index a333dcbe56bd2..cf34318b16f04 100644
RenderViewContextMenu::GetHandlersForLinkUrl() {
custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers =
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index 9bf603dbf73a5..3f9b1ff9f384d 100644
index 912be87540a05..ea077beb2c359 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -158,7 +158,21 @@ class RenderViewContextMenu
@@ -159,7 +159,21 @@ class RenderViewContextMenu
void AddObserverForTesting(RenderViewContextMenuObserver* observer);
void RemoveObserverForTesting(RenderViewContextMenuObserver* observer);
@@ -113,7 +113,7 @@ index 9bf603dbf73a5..3f9b1ff9f384d 100644
Profile* GetProfile() const;
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
@@ -483,6 +497,9 @@ class RenderViewContextMenu
@@ -492,6 +506,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
index f61d3618965cd..7c632c85d5e48 100644
index 15a0b7ed9aa02..f5d9805ef1489 100644
--- chrome/browser/devtools/chrome_devtools_manager_delegate.cc
+++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc
@@ -14,6 +14,7 @@
@@ -13,6 +13,7 @@
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
@@ -10,7 +10,7 @@ index f61d3618965cd..7c632c85d5e48 100644
#include "chrome/browser/browser_features.h"
#include "chrome/browser/devtools/chrome_devtools_session.h"
#include "chrome/browser/devtools/device/android_device_manager.h"
@@ -65,6 +66,10 @@
@@ -64,6 +65,10 @@
#include "chromeos/constants/chromeos_features.h"
#endif
@@ -21,7 +21,7 @@ index f61d3618965cd..7c632c85d5e48 100644
using content::DevToolsAgentHost;
const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app";
@@ -259,6 +264,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
@@ -258,6 +263,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
return DevToolsAgentHost::kTypePage;
}

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
index 8c06a19a64e5d..2b9429f7b2bab 100644
index dc7205b1011d6..f3106cdd120a2 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
@@ -6,6 +6,7 @@
@@ -8,8 +8,8 @@ index 8c06a19a64e5d..2b9429f7b2bab 100644
+#include "cef/libcef/features/features.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window/public/browser_window_interface.h"
@@ -28,6 +29,22 @@
#include "chrome/browser/safe_browsing/user_interaction_observer.h"
#endif
@@ -33,7 +33,7 @@ index 8c06a19a64e5d..2b9429f7b2bab 100644
JavaScriptTabModalDialogManagerDelegateDesktop::
JavaScriptTabModalDialogManagerDelegateDesktop(
content::WebContents* web_contents)
@@ -77,6 +94,9 @@ void JavaScriptTabModalDialogManagerDelegateDesktop::SetTabNeedsAttention(
@@ -78,6 +95,9 @@ void JavaScriptTabModalDialogManagerDelegateDesktop::SetTabNeedsAttention(
bool JavaScriptTabModalDialogManagerDelegateDesktop::IsWebContentsForemost() {
Browser* browser = BrowserList::GetInstance()->GetLastActive();
if (!browser) {
@@ -43,7 +43,7 @@ index 8c06a19a64e5d..2b9429f7b2bab 100644
// It's rare, but there are crashes from where sites are trying to show
// dialogs in the split second of time between when their Browser is gone
// and they're gone. In that case, bail. https://crbug.com/1142806
@@ -92,7 +112,11 @@ bool JavaScriptTabModalDialogManagerDelegateDesktop::IsApp() {
@@ -96,7 +116,11 @@ bool JavaScriptTabModalDialogManagerDelegateDesktop::IsApp() {
}
bool JavaScriptTabModalDialogManagerDelegateDesktop::CanShowModalUI() {

View File

@@ -12,7 +12,7 @@ index cc58a303a78b6..7755e58c8651c 100644
// on the screen, we can't actually attach to it.
parent_window = nullptr;
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
index 6e91ffc4b8bfe..a1616f77c87ae 100644
index 4421cf1ad1bf1..136c93d146813 100644
--- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc
@@ -103,10 +103,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
@@ -142,7 +142,7 @@ index 6e91ffc4b8bfe..a1616f77c87ae 100644
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,
@@ -333,8 +335,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view =
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
: gfx::NativeView();
@@ -156,7 +156,7 @@ index 6e91ffc4b8bfe..a1616f77c87ae 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -344,8 +350,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -351,8 +357,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
return widget;
ModalDialogHost* host =
@@ -195,25 +195,27 @@ index 2b495a8ab092c..01a28aca853d0 100644
OnPositionRequiresUpdate();
diff --git components/web_modal/modal_dialog_host.h components/web_modal/modal_dialog_host.h
index 51ed6bcf6b540..c6e1161140655 100644
index c618c00223779..05b2b1e5d8865 100644
--- components/web_modal/modal_dialog_host.h
+++ components/web_modal/modal_dialog_host.h
@@ -34,6 +34,10 @@ class WEB_MODAL_EXPORT ModalDialogHost {
@@ -35,6 +35,12 @@ class WEB_MODAL_EXPORT ModalDialogHost {
// Returns the view against which the dialog is positioned and parented.
virtual gfx::NativeView GetHostView() const = 0;
+ // Returns the widget against which the dialog is positioned and parented.
+ // Used with CEF windowless rendering.
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() const {
+ return gfx::kNullAcceleratedWidget; }
+ return gfx::kNullAcceleratedWidget;
+ }
+
// Gets the position for the dialog in coordinates relative to the host view.
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index 7b22be3acdb6c..5e8ac69f52691 100644
index fa171a2990d47..3b170e3d6a920 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -89,10 +89,12 @@ DialogDelegate::DialogDelegate() {
@@ -90,10 +90,12 @@ DialogDelegate::DialogDelegate() {
// static
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
gfx::NativeWindow context,
@@ -228,7 +230,7 @@ index 7b22be3acdb6c..5e8ac69f52691 100644
widget->Init(std::move(params));
return widget;
}
@@ -101,15 +103,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
@@ -102,15 +104,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
Widget* DialogDelegate::CreateDialogWidget(
std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context,
@@ -250,7 +252,7 @@ index 7b22be3acdb6c..5e8ac69f52691 100644
#else
return true;
#endif
@@ -120,7 +124,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -121,7 +125,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
WidgetDelegate* delegate,
gfx::NativeWindow context,
gfx::NativeView parent,
@@ -260,7 +262,7 @@ index 7b22be3acdb6c..5e8ac69f52691 100644
DialogDelegate* dialog = delegate->AsDialogDelegate();
views::Widget::InitParams params(
@@ -130,7 +135,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -131,7 +136,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
params.bounds = bounds;
if (dialog) {
@@ -269,7 +271,7 @@ index 7b22be3acdb6c..5e8ac69f52691 100644
}
if (!dialog || dialog->use_custom_frame()) {
@@ -144,6 +149,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -145,6 +150,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
}
params.context = context;
params.parent = parent;
@@ -278,11 +280,11 @@ index 7b22be3acdb6c..5e8ac69f52691 100644
// Web-modal (ui::mojom::ModalType::kChild) dialogs with parents are marked as
// child widgets to prevent top-level window behavior (independent movement,
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index 304b4c2115b87..844fb19461ac3 100644
index 92d4dc5da0cd6..b18c3f6178ec2 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -312,13 +312,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
// your use case.
@@ -308,13 +308,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
// WidgetDelegate::SetOwnedByWidget().
static Widget* CreateDialogWidget(std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context,
- gfx::NativeView parent);
@@ -303,7 +305,7 @@ index 304b4c2115b87..844fb19461ac3 100644
// Returns the dialog widget InitParams for a given |context| or |parent|.
// If |bounds| is not empty, used to initially place the dialog, otherwise
@@ -326,7 +331,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
@@ -322,7 +327,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate,
gfx::NativeWindow context,
gfx::NativeView parent,

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
index 2ca95e6bb673a..2207b0f637a91 100644
index 7d2a74932285f..a68ff88c449c6 100644
--- chrome/browser/download/chrome_download_manager_delegate.cc
+++ chrome/browser/download/chrome_download_manager_delegate.cc
@@ -30,6 +30,7 @@
@@ -29,6 +29,7 @@
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -10,7 +10,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/bubble/download_bubble_prefs.h"
#include "chrome/browser/download/download_core_service.h"
@@ -166,6 +167,10 @@
@@ -164,6 +165,10 @@
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
#endif // BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION)
@@ -21,7 +21,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
using content::BrowserThread;
using content::DownloadManager;
using download::DownloadItem;
@@ -531,6 +536,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
@@ -540,6 +545,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>();
download_message_bridge_ = std::make_unique<DownloadMessageBridge>();
#endif
@@ -33,7 +33,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
}
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
@@ -594,6 +604,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
@@ -603,6 +613,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
download_manager_->RemoveObserver(this);
download_manager_ = nullptr;
}
@@ -43,7 +43,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
}
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
@@ -662,6 +675,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
@@ -671,6 +684,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
}
@@ -56,7 +56,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
DownloadTargetDeterminer::CompletionCallback target_determined_callback =
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
weak_ptr_factory_.GetWeakPtr(), download->GetId(),
@@ -1167,8 +1186,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
@@ -1193,8 +1212,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
return;
}
@@ -72,7 +72,7 @@ index 2ca95e6bb673a..2207b0f637a91 100644
net::FilePathToFileURL(download->GetTargetFilePath()),
content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h
index b3a0d699d9d13..2f42dcf185264 100644
index c9f4aeab7ebff..84b975aab4579 100644
--- chrome/browser/download/chrome_download_manager_delegate.h
+++ chrome/browser/download/chrome_download_manager_delegate.h
@@ -19,6 +19,7 @@
@@ -96,7 +96,7 @@ index b3a0d699d9d13..2f42dcf185264 100644
// This is the Chrome side helper for the download system.
class ChromeDownloadManagerDelegate
: public content::DownloadManagerDelegate,
@@ -405,6 +412,10 @@ class ChromeDownloadManagerDelegate
@@ -413,6 +420,10 @@ class ChromeDownloadManagerDelegate
// Whether a file picker dialog is showing.
bool is_file_picker_showing_;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
index acd5954b3423a..215edaa4badc5 100644
index 7101a6c177bca..852f80543db32 100644
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
@@ -16,6 +16,7 @@
@@ -8,9 +8,9 @@ index acd5954b3423a..215edaa4badc5 100644
#include "build/chromeos_buildflags.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/chrome_device_permissions_prompt.h"
#include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h"
@@ -90,6 +91,10 @@
#include "chrome/browser/extensions/api/declarative_content/default_content_predicate_evaluators.h"
@@ -82,6 +83,10 @@
#include "chromeos/ash/components/settings/cros_settings.h"
#endif
@@ -21,7 +21,7 @@ index acd5954b3423a..215edaa4badc5 100644
#if BUILDFLAG(ENABLE_PRINTING)
#include "chrome/browser/printing/printing_init.h"
#endif
@@ -317,7 +322,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
@@ -298,7 +303,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
std::unique_ptr<MimeHandlerViewGuestDelegate>
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const {
@@ -34,7 +34,7 @@ index acd5954b3423a..215edaa4badc5 100644
std::unique_ptr<WebViewGuestDelegate>
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
index 4ac2686025ef0..94aa0016881b6 100644
index ad1f4b4c3e979..55657d976c405 100644
--- chrome/browser/extensions/api/tabs/tabs_api.cc
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1714,7 +1714,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -84,10 +84,10 @@ index 4ac2686025ef0..94aa0016881b6 100644
current_url, updated_url, js_callstack());
}
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
index fc375bf87a2d1..5f32c45dc2fa6 100644
index 959e848a6e9b4..5f73667a599e7 100644
--- chrome/browser/extensions/extension_tab_util.cc
+++ chrome/browser/extensions/extension_tab_util.cc
@@ -38,6 +38,7 @@
@@ -39,6 +39,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/types/expected_macros.h"
@@ -95,7 +95,7 @@ index fc375bf87a2d1..5f32c45dc2fa6 100644
#include "chrome/browser/browser_process.h" // nogncheck
#include "chrome/browser/extensions/browser_extension_window_controller.h"
#include "chrome/browser/extensions/chrome_extension_function_details.h"
@@ -87,6 +88,10 @@
@@ -88,6 +89,10 @@
#include "url/url_constants.h"
#endif
@@ -106,9 +106,9 @@ index fc375bf87a2d1..5f32c45dc2fa6 100644
using content::NavigationEntry;
using content::WebContents;
using extensions::mojom::APIPermissionID;
@@ -738,6 +743,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
}
@@ -774,6 +779,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
}
#endif // BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_CEF)
+ if (cef::GetAlloyTabById(tab_id, profile, include_incognito, out_contents)) {
@@ -122,7 +122,7 @@ index fc375bf87a2d1..5f32c45dc2fa6 100644
// Prerendering tab is not visible and it cannot be in `TabStripModel`, if
// the tab id exists as a prerendering tab, and the API will returns
diff --git chrome/browser/ui/tab_helpers.h chrome/browser/ui/tab_helpers.h
index 63848c93738ce..0358e098c7339 100644
index ec26ac19c0780..928536d17dbb1 100644
--- chrome/browser/ui/tab_helpers.h
+++ chrome/browser/ui/tab_helpers.h
@@ -6,6 +6,7 @@
@@ -144,7 +144,7 @@ index 63848c93738ce..0358e098c7339 100644
// A "tab contents" is a WebContents that is used as a tab in a browser window
// (or the equivalent on Android). The TabHelpers class allows specific classes
// to attach the set of tab helpers that is used for tab contents.
@@ -79,6 +84,10 @@ class TabHelpers {
@@ -80,6 +85,10 @@ class TabHelpers {
// Link Preview shows a preview of a page, then promote it as a new tab.
friend class PreviewTab;

View File

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

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
index 8e75f8b83bc77..19dec27e26680 100644
index 089578602393b..b4b0a7abe4822 100644
--- chrome/browser/printing/print_backend_service_manager.cc
+++ chrome/browser/printing/print_backend_service_manager.cc
@@ -75,7 +75,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr;

View File

@@ -59,10 +59,10 @@ index affba30438a4a..bdf433d20b97c 100644
ax::mojom::NameFrom::kAttribute);
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 133b80d279bf6..be46fc65f890d 100644
index 81f886e9fb712..8c919733f1818 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -60,7 +60,9 @@ void ProfileMenuCoordinator::Show(
@@ -54,7 +54,9 @@ void ProfileMenuCoordinator::Show(
std::unique_ptr<ProfileMenuViewBase> bubble;
bool is_incognito = browser.profile()->IsIncognitoProfile();

View File

@@ -52,7 +52,7 @@ index 363a7c4ac583f..1c263547c8f54 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index c8d72ed59252f..d785187710a79 100644
index 7e700d9b9ed86..99f8cb55f7c9e 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -93,6 +93,10 @@ class Profile : public content::BrowserContext {
@@ -66,7 +66,7 @@ index c8d72ed59252f..d785187710a79 100644
// Creates a unique OTR profile id to be used for DevTools browser contexts.
static OTRProfileID CreateUniqueForDevTools();
@@ -509,6 +513,9 @@ class Profile : public content::BrowserContext {
@@ -502,6 +506,9 @@ class Profile : public content::BrowserContext {
static Profile* FromJavaObject(const jni_zero::JavaRef<jobject>& obj);
jni_zero::ScopedJavaLocalRef<jobject> GetJavaObject() const;
#endif // BUILDFLAG(IS_ANDROID)
@@ -76,7 +76,7 @@ index c8d72ed59252f..d785187710a79 100644
protected:
// Creates an OffTheRecordProfile which points to this Profile.
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
@@ -520,7 +527,6 @@ class Profile : public content::BrowserContext {
@@ -513,7 +520,6 @@ class Profile : public content::BrowserContext {
static PrefStore* CreateExtensionPrefStore(Profile*,
bool incognito_pref_store);
@@ -85,10 +85,10 @@ index c8d72ed59252f..d785187710a79 100644
// Returns whether the user has signed in this profile to an account.
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 22445800c6ac8..bd17582782117 100644
index 88a274f8b05f7..7adeedad98ac2 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1022,7 +1022,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);

View File

@@ -1,8 +1,16 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 7b88f06c0d08a..b5ff530eae6fa 100644
index d92165e685f68..03d0a99b77f4d 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -37,6 +37,7 @@ static_library("safe_browsing") {
@@ -26,6 +26,7 @@ static_library("safe_browsing") {
"//chrome/browser:browser_process",
"//chrome/browser/google",
"//chrome/browser/optimization_guide",
+ "//chrome/browser/permissions:permissions_proto",
"//chrome/browser/profiles",
"//chrome/browser/profiles:profile",
"//chrome/browser/sync",
@@ -37,6 +38,7 @@ static_library("safe_browsing") {
"//components/enterprise/buildflags",
"//components/enterprise/common:strings",
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
@@ -10,11 +18,3 @@ index 7b88f06c0d08a..b5ff530eae6fa 100644
"//components/keyed_service/content",
"//components/language/core/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

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index d26f0998c81fc..098282f9ca599 100644
index c46e9c7daf645..48fd182eae15e 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -626,6 +626,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
@@ -16,7 +16,7 @@ index d26f0998c81fc..098282f9ca599 100644
} // namespace
StartupProfileMode StartupProfileModeFromReason(
@@ -1500,6 +1507,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
@@ -1506,6 +1513,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles);
}
@@ -29,7 +29,7 @@ index d26f0998c81fc..098282f9ca599 100644
// static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line,
@@ -1509,6 +1522,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
@@ -1515,6 +1528,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
index 0939e62b45530..ca2ac8ce23749 100644
index b706f12d1b945..cd7ef560047ee 100644
--- chrome/browser/ui/webui/about/about_ui.cc
+++ chrome/browser/ui/webui/about/about_ui.cc
@@ -86,6 +86,10 @@
@@ -13,7 +13,7 @@ index 0939e62b45530..ca2ac8ce23749 100644
using content::BrowserThread;
namespace {
@@ -533,6 +537,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui,
@@ -441,6 +445,11 @@ AboutUIConfigBase::AboutUIConfigBase(std::string_view host)
CreditsUIConfig::CreditsUIConfig()
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
@@ -25,7 +25,7 @@ index 0939e62b45530..ca2ac8ce23749 100644
#if !BUILDFLAG(IS_ANDROID)
TermsUIConfig::TermsUIConfig()
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
@@ -634,6 +643,16 @@ void AboutUIHTMLSource::StartDataRequest(
@@ -540,6 +549,16 @@ void AboutUIHTMLSource::StartDataRequest(
IDS_TERMS_HTML);
#endif
}
@@ -43,7 +43,7 @@ index 0939e62b45530..ca2ac8ce23749 100644
FinishDataRequest(response, std::move(callback));
}
diff --git chrome/browser/ui/webui/about/about_ui.h chrome/browser/ui/webui/about/about_ui.h
index 46103729d33a7..fbc400e60239b 100644
index f633265e3d207..7d759d8559222 100644
--- chrome/browser/ui/webui/about/about_ui.h
+++ chrome/browser/ui/webui/about/about_ui.h
@@ -11,6 +11,7 @@
@@ -54,7 +54,7 @@ index 46103729d33a7..fbc400e60239b 100644
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/webui_config.h"
@@ -47,6 +48,13 @@ class CreditsUIConfig : public AboutUIConfigBase {
@@ -35,6 +36,13 @@ class CreditsUIConfig : public AboutUIConfigBase {
CreditsUIConfig();
};
@@ -69,7 +69,7 @@ index 46103729d33a7..fbc400e60239b 100644
// chrome://terms
class TermsUIConfig : public AboutUIConfigBase {
diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc
index cbcdde4afa71b..3507ff26fa3a0 100644
index f740a1880ae9f..738d461125bfc 100644
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
@@ -6,6 +6,7 @@
@@ -80,14 +80,14 @@ index cbcdde4afa71b..3507ff26fa3a0 100644
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
#include "chrome/browser/ui/webui/about/about_ui.h"
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
@@ -214,6 +215,9 @@ void RegisterChromeWebUIConfigs() {
@@ -222,6 +223,9 @@ void RegisterChromeWebUIConfigs() {
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
+#if BUILDFLAG(ENABLE_CEF)
+ map.AddWebUIConfig(std::make_unique<ChromeUILicenseConfig>());
+#endif
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
map.AddWebUIConfig(std::make_unique<chrome_urls::ChromeUrlsUIConfig>());
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
@@ -105,7 +105,7 @@ index e5e724a22d015..fcb15d234483f 100644
#if !BUILDFLAG(IS_ANDROID)
kChromeUIManagementHost,
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
index af2bad4318c92..fa4fe8b87386d 100644
index c35d5252a52ee..b505fc38a2c53 100644
--- chrome/common/webui_url_constants.h
+++ chrome/common/webui_url_constants.h
@@ -18,6 +18,7 @@
@@ -116,7 +116,7 @@ index af2bad4318c92..fa4fe8b87386d 100644
#include "chrome/common/buildflags.h"
#include "components/signin/public/base/signin_buildflags.h"
#include "content/public/common/url_constants.h"
@@ -147,6 +148,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
@@ -162,6 +163,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/";
inline constexpr char kChromeUIKillHost[] = "kill";
inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals";
@@ -125,5 +125,5 @@ index af2bad4318c92..fa4fe8b87386d 100644
+inline constexpr char kChromeUILicenseURL[] = "chrome://license/";
+#endif
inline constexpr char kChromeUILocalStateHost[] = "local-state";
inline constexpr char kChromeUILocalStateURL[] = "chrome://local-state";
inline constexpr char kChromeUILocationInternalsHost[] = "location-internals";
inline constexpr char kChromeUIManagementHost[] = "management";

View File

@@ -124,7 +124,7 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644
// Factory for the creating refs in callbacks.
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
index f9c2e60204369..98026fd57457f 100644
index c10d6937f6ef4..738ba66437829 100644
--- chrome/browser/ui/webui/version/version_ui.cc
+++ chrome/browser/ui/webui/version/version_ui.cc
@@ -16,6 +16,7 @@
@@ -233,7 +233,7 @@ index bd41fd2492e79..04378e39332e1 100644
+ font-size: 0.8em;
+}
diff --git components/webui/version/resources/about_version.html components/webui/version/resources/about_version.html
index bd2914d8bc19a..f3176886fd96b 100644
index e4ad426e42bca..13e754cbffbf3 100644
--- components/webui/version/resources/about_version.html
+++ components/webui/version/resources/about_version.html
@@ -49,9 +49,21 @@ about:version template page
@@ -259,7 +259,7 @@ index bd2914d8bc19a..f3176886fd96b 100644
<tr><td class="label">$i18n{application_label}</td>
<td class="version" id="version">
<span id="copy-content">
@@ -159,7 +171,15 @@ about:version template page
@@ -155,7 +167,15 @@ about:version template page
<tr><td class="label">$i18n{executable_path_name}</td>
<td class="version" id="executable_path">$i18n{executable_path}</td>
</tr>
@@ -276,7 +276,7 @@ index bd2914d8bc19a..f3176886fd96b 100644
<td class="version" id="profile_path">$i18n{profile_path}</td>
</tr>
</if>
@@ -192,6 +212,17 @@ about:version template page
@@ -188,6 +208,17 @@ about:version template page
<td class="version" id="sanitizer">$i18n{sanitizer}</td>
</tr>
</table>
@@ -322,7 +322,7 @@ index ea5f11471acf2..f604065bbe8fe 100644
// <if expr="is_win">
diff --git components/webui/version/version_ui_constants.cc components/webui/version/version_ui_constants.cc
index 7c9bd75c4de1b..4ab5265b5f2c0 100644
index 3828e8e25bbcd..afd115b6eb82e 100644
--- components/webui/version/version_ui_constants.cc
+++ components/webui/version/version_ui_constants.cc
@@ -5,6 +5,7 @@
@@ -333,7 +333,7 @@ index 7c9bd75c4de1b..4ab5265b5f2c0 100644
namespace version_ui {
@@ -92,4 +93,15 @@ const char kVersionSuffix[] = "version_suffix";
@@ -90,4 +91,15 @@ const char kVersionSuffix[] = "version_suffix";
const char kVersionModifier[] = "version_modifier";
const char kVersionProcessorVariation[] = "version_processor_variation";

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 948d6c41cdede..80039133de468 100644
index 1471790200d19..41e5d15a024dc 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@
@@ -18,8 +18,8 @@ index 948d6c41cdede..80039133de468 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -250,6 +252,10 @@ static_library("renderer") {
deps += [ "//chrome/renderer/actor" ]
@@ -246,6 +248,10 @@ static_library("renderer") {
]
}
+ if (enable_cef) {

View File

@@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 7cc74f595ff57..4e0e494678d75 100644
index e65fddc7cc743..6febaf75842fa 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -43,6 +43,7 @@
@@ -10,7 +10,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -545,6 +546,7 @@ struct MainFunction {
@@ -544,6 +545,7 @@ struct MainFunction {
int (*function)(content::MainFunctionParams);
};
@@ -18,7 +18,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
#if BUILDFLAG(IS_WIN)
@@ -624,6 +626,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -623,6 +625,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
#endif // BUILDFLAG(IS_WIN)
}
@@ -26,7 +26,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
#if !BUILDFLAG(IS_ANDROID)
void InitLogging(const std::string& process_type) {
@@ -743,6 +746,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -742,6 +745,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@@ -37,7 +37,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -768,7 +775,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -767,7 +774,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@@ -46,7 +46,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
// In the case the process is not the singleton process, the uninstall tasks
// need to be executed here. A window will be displayed asking to close all
// running instances.
@@ -853,7 +860,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -852,7 +859,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// Initializes the resource bundle and determines the locale.
std::string actual_locale = LoadLocalState(
@@ -56,7 +56,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
chrome_feature_list_creator->OverrideCachedUIStrings();
@@ -868,6 +876,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -867,6 +875,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
new net::NetworkChangeNotifierFactoryAndroid());
#endif
@@ -65,7 +65,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
bool record = true;
#if BUILDFLAG(IS_ANDROID)
record =
@@ -876,6 +886,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -875,6 +885,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (record) {
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
}
@@ -73,7 +73,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
#if BUILDFLAG(IS_ANDROID)
UmaSessionStats::OnStartup();
@@ -922,8 +933,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
@@ -921,8 +932,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
std::make_unique<ChromeThreadProfilerClient>());
// `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little
@@ -84,7 +84,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
// Start the sampling profiler as early as possible - namely, once the thread
// pool has been created.
sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
@@ -1323,6 +1334,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1322,6 +1333,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -92,7 +92,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX)
@@ -1338,6 +1350,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1337,6 +1349,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
if (chrome::ProcessNeedsProfileDir(process_type)) {
InitializeUserDataDir(base::CommandLine::ForCurrentProcess());
}
@@ -100,7 +100,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
// Register component_updater PathProvider after DIR_USER_DATA overridden by
// command line flags. Maybe move the chrome PathProvider down here also?
@@ -1434,7 +1447,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1429,7 +1442,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
#else
const std::string loaded_locale =
ui::ResourceBundle::InitSharedInstanceWithLocale(
@@ -110,7 +110,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
base::FilePath resources_pack_path;
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
@@ -1444,6 +1458,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1439,6 +1453,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@@ -118,7 +118,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess &&
@@ -1480,6 +1495,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1475,6 +1490,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -126,7 +126,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1598,6 +1614,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1593,6 +1609,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -134,7 +134,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1610,6 +1627,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1605,6 +1622,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -142,7 +142,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1720,6 +1738,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1715,6 +1733,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
: memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kIgnore;
@@ -150,7 +150,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(chrome::GetChannel(),
@@ -1727,5 +1746,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1722,5 +1741,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
.SetDispatcherParameters(memory_system::DispatcherParameters::
PoissonAllocationSamplerInclusion::kEnforce,
allocation_recorder_inclusion, process_type)
@@ -158,7 +158,7 @@ index 7cc74f595ff57..4e0e494678d75 100644
+ .Initialize(*memory_system_);
}
diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h
index 18b33015ee4b6..e17447cb922e9 100644
index fa692d8fbfa5a..d7745793dcf96 100644
--- chrome/app/chrome_main_delegate.h
+++ chrome/app/chrome_main_delegate.h
@@ -17,6 +17,7 @@
@@ -232,7 +232,7 @@ index 72eb096075a05..d3866aae87c60 100644
base::PathService::OverrideAndCreateIfNeeded(
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 681fd3282078c..8bca99c60d66d 100644
index ee9e6e9208043..05c87c3e35352 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -28,6 +28,7 @@
@@ -252,16 +252,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// The uninstall command-line switch is handled by the origin process; see
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
// be able to become the singleton process and will display a window asking
@@ -749,7 +750,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT;
}
-#if BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF)
// If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser(
@@ -867,7 +868,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -852,7 +853,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback());
@@ -270,7 +261,7 @@ index 681fd3282078c..8bca99c60d66d 100644
if (first_run::IsChromeFirstRun()) {
bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -910,6 +911,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -895,6 +896,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@@ -278,7 +269,7 @@ index 681fd3282078c..8bca99c60d66d 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
@@ -943,6 +945,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -928,6 +930,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit);
}
#endif
@@ -286,7 +277,7 @@ index 681fd3282078c..8bca99c60d66d 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -1012,6 +1015,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -997,6 +1000,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@@ -294,7 +285,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// Android does first run in Java instead of native.
// Chrome OS has its own out-of-box-experience code.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@@ -1033,6 +1037,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1018,6 +1022,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@@ -302,7 +293,7 @@ index 681fd3282078c..8bca99c60d66d 100644
#if BUILDFLAG(IS_MAC)
#if defined(ARCH_CPU_X86_64)
@@ -1400,6 +1405,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1385,6 +1390,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN)
@@ -310,7 +301,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// If the command line specifies 'uninstall' then we need to work here
// unless we detect another chrome browser running.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
@@ -1411,6 +1417,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1396,6 +1402,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess());
}
@@ -318,7 +309,7 @@ index 681fd3282078c..8bca99c60d66d 100644
ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1433,6 +1440,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1418,6 +1425,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif
@@ -326,7 +317,7 @@ index 681fd3282078c..8bca99c60d66d 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1446,13 +1454,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1431,13 +1439,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(CHROME_RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@@ -342,7 +333,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// We must call DoUpgradeTasks now that we own the browser singleton to
// finish upgrade tasks (swap) and relaunch if necessary.
if (upgrade_util::DoUpgradeTasks(*base::CommandLine::ForCurrentProcess()))
@@ -1496,7 +1505,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1481,7 +1490,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif
@@ -351,7 +342,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// Check if there is any machine level Chrome installed on the current
// machine. If yes and the current Chrome process is user level, we do not
// allow the user level Chrome to run. So we notify the user and uninstall
@@ -1578,7 +1587,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1563,7 +1572,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@@ -360,7 +351,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends
// on preferences.
@@ -1599,7 +1608,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1584,7 +1593,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif
@@ -369,7 +360,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// Registers Chrome with the Windows Restart Manager, which will restore the
// Chrome session when the computer is restarted after a system update.
// This could be run as late as WM_QUERYENDSESSION for system update reboots,
@@ -1702,6 +1711,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1687,6 +1696,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif
@@ -381,7 +372,7 @@ index 681fd3282078c..8bca99c60d66d 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1729,11 +1743,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1714,11 +1728,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@@ -433,7 +424,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 3ebb85bbe3c48..896b131108218 100644
index e856d9cf62853..c6d489a87e760 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -48,6 +48,7 @@
@@ -444,7 +435,7 @@ index 3ebb85bbe3c48..896b131108218 100644
#include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/ai/ai_manager.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
@@ -1504,6 +1505,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1344,6 +1345,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@@ -453,7 +444,7 @@ index 3ebb85bbe3c48..896b131108218 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1541,6 +1544,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1381,6 +1384,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@@ -465,7 +456,7 @@ index 3ebb85bbe3c48..896b131108218 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4837,9 +4845,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4776,9 +4784,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@@ -477,7 +468,7 @@ index 3ebb85bbe3c48..896b131108218 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6926,7 +6936,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6487,7 +6497,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
}
}
@@ -486,7 +477,7 @@ index 3ebb85bbe3c48..896b131108218 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6944,6 +6954,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6505,6 +6515,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@@ -495,7 +486,7 @@ index 3ebb85bbe3c48..896b131108218 100644
}
std::vector<base::FilePath>
@@ -8084,11 +8096,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -7658,11 +7670,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -509,7 +500,7 @@ index 3ebb85bbe3c48..896b131108218 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -8110,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -7684,7 +7696,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -519,7 +510,7 @@ index 3ebb85bbe3c48..896b131108218 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -8288,7 +8301,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -7862,7 +7875,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -529,10 +520,10 @@ index 3ebb85bbe3c48..896b131108218 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index c944bdaf9bbbe..a9e7bd1139c07 100644
index f29c2ed251c81..4886ddac92dcd 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -159,6 +159,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -160,6 +160,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@@ -541,7 +532,7 @@ index c944bdaf9bbbe..a9e7bd1139c07 100644
// 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
// functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -733,7 +735,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -750,7 +752,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -550,7 +541,7 @@ index c944bdaf9bbbe..a9e7bd1139c07 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1370,7 +1372,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1388,7 +1390,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@@ -560,7 +551,7 @@ index c944bdaf9bbbe..a9e7bd1139c07 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 9a00400829ae1..b0007362043bc 100644
index 1ade93d9ea505..aa1360c4f31fe 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -15,6 +15,7 @@
@@ -571,7 +562,7 @@ index 9a00400829ae1..b0007362043bc 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
@@ -217,6 +218,10 @@
@@ -219,6 +220,10 @@
#include "extensions/browser/pref_names.h"
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
@@ -582,7 +573,7 @@ index 9a00400829ae1..b0007362043bc 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1856,6 +1861,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1889,6 +1894,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@@ -594,7 +585,7 @@ index 9a00400829ae1..b0007362043bc 100644
}
// Register prefs applicable to all profiles.
@@ -2305,6 +2315,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2341,6 +2351,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& 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
index d5e652efef5df..a4cc11790658c 100644
index 02a4ad250ae42..6a592da9cf571 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -442,6 +442,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -478,6 +478,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
// choose to not implement CommandUpdaterDelegate inside this class and
// therefore command_updater_ doesn't have the delegate set).
if (!SupportsCommand(id) || !IsCommandEnabled(id)) {
@@ -10,7 +10,7 @@ index d5e652efef5df..a4cc11790658c 100644
return false;
}
@@ -459,6 +460,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -495,6 +496,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@@ -24,7 +24,7 @@ index d5e652efef5df..a4cc11790658c 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1297,11 +1305,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1333,11 +1341,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@@ -41,7 +41,7 @@ index d5e652efef5df..a4cc11790658c 100644
void BrowserCommandController::InitCommandState() {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 0ac99f7c90ac8..41edc0a895a44 100644
index 716b70869a2d0..c198cc46d0495 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -722,10 +722,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
@@ -200,10 +200,10 @@ index ec1f1a15c682e..23163078693fb 100644
// Adds actionable global error menu items to the menu.
// Examples: Extension permissions and sign in errors.
diff --git chrome/browser/ui/views/find_bar_host.cc chrome/browser/ui/views/find_bar_host.cc
index 603a95238c562..dd397451bed5a 100644
index 577c01d3ddf1b..4fe3dac4545d5 100644
--- chrome/browser/ui/views/find_bar_host.cc
+++ chrome/browser/ui/views/find_bar_host.cc
@@ -608,6 +608,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
@@ -615,6 +615,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
// The BrowserView does Layout for the components that we care about
// positioning relative to, so we ask it to tell us where we should go.
gfx::Rect find_bar_bounds = browser_view_->GetFindBarBoundingBox();
@@ -397,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 100644
// regenerated.
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 43650702e865b..4f814d29ef136 100644
index 16ec3a1468221..bbe7465e7dadc 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -366,10 +366,6 @@ using web_modal::WebContentsModalDialogHost;
@@ -373,10 +373,6 @@ using web_modal::WebContentsModalDialogHost;
namespace {
@@ -411,7 +411,7 @@ index 43650702e865b..4f814d29ef136 100644
// 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.
const int kTabShadowSize = 2;
@@ -811,6 +807,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
@@ -818,6 +814,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@@ -426,7 +426,7 @@ index 43650702e865b..4f814d29ef136 100644
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
@@ -935,11 +939,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -946,11 +950,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -449,8 +449,8 @@ index 43650702e865b..4f814d29ef136 100644
SetShowIcon(::ShouldShowWindowIcon(
browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed()));
@@ -1089,8 +1103,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
lens_overlay_view_, contents_scrim_view_, nullptr, watermark_view_));
@@ -1118,8 +1132,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
new_tab_footer_web_view_));
#endif
- toolbar_ = top_container_->AddChildView(
@@ -467,7 +467,7 @@ index 43650702e865b..4f814d29ef136 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1156,18 +1177,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -1196,7 +1217,9 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
BrowserView::~BrowserView() {
@@ -477,20 +477,7 @@ index 43650702e865b..4f814d29ef136 100644
// Remove the layout manager to avoid dangling. This needs to be earlier than
// other cleanups that destroy views referenced in the layout manager.
SetLayoutManager(nullptr);
+ if (browser_) {
auto* tab_search_toolbar_button_controller =
browser_->GetFeatures().tab_search_toolbar_button_controller();
if (tab_search_toolbar_button_controller) {
tab_search_bubble_host_->RemoveObserver(
tab_search_toolbar_button_controller);
}
+ }
tab_search_bubble_host_.reset();
@@ -1175,9 +1200,11 @@ BrowserView::~BrowserView() {
@@ -1208,9 +1231,11 @@ BrowserView::~BrowserView() {
// tabstrip model and the browser frame.
top_controls_slide_controller_.reset();
@@ -502,7 +489,7 @@ index 43650702e865b..4f814d29ef136 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1186,17 +1213,18 @@ BrowserView::~BrowserView() {
@@ -1219,17 +1244,18 @@ BrowserView::~BrowserView() {
// Immersive mode may need to reparent views before they are removed/deleted.
immersive_mode_controller_.reset();
@@ -525,7 +512,7 @@ index 43650702e865b..4f814d29ef136 100644
// These are raw pointers to child views, so they need to be set to null
// before `RemoveAllChildViews()` is called to avoid dangling.
@@ -1897,6 +1925,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
@@ -1986,6 +2012,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
}
@@ -554,7 +541,7 @@ index 43650702e865b..4f814d29ef136 100644
// static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds,
@@ -2343,7 +2393,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -2450,7 +2498,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -569,7 +556,7 @@ index 43650702e865b..4f814d29ef136 100644
return false;
}
@@ -3574,6 +3630,9 @@ views::View* BrowserView::GetLensOverlayView() {
@@ -3673,6 +3727,9 @@ views::View* BrowserView::GetLensOverlayView() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -579,7 +566,7 @@ index 43650702e865b..4f814d29ef136 100644
if (auto* download_controller =
browser_->GetFeatures().download_toolbar_ui_controller()) {
return download_controller->bubble_controller();
@@ -4319,7 +4378,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -4424,7 +4481,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
return;
}
@@ -589,7 +576,7 @@ index 43650702e865b..4f814d29ef136 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4860,11 +4921,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4965,11 +5024,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -630,7 +617,7 @@ index 43650702e865b..4f814d29ef136 100644
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4873,7 +4961,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4978,7 +5064,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar.
@@ -639,7 +626,7 @@ index 43650702e865b..4f814d29ef136 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -5105,8 +5193,11 @@ void BrowserView::Layout(PassKey) {
@@ -5210,8 +5296,11 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -652,7 +639,7 @@ index 43650702e865b..4f814d29ef136 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -5173,6 +5264,12 @@ void BrowserView::AddedToWidget() {
@@ -5278,6 +5367,12 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -665,7 +652,7 @@ index 43650702e865b..4f814d29ef136 100644
toolbar_->Init();
if (GetIsNormalType()) {
@@ -5232,12 +5329,6 @@ void BrowserView::AddedToWidget() {
@@ -5335,12 +5430,6 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -678,7 +665,7 @@ index 43650702e865b..4f814d29ef136 100644
if (download::IsDownloadBubbleEnabled()) {
browser_->GetFeatures().download_toolbar_ui_controller()->Init();
}
@@ -5248,7 +5339,9 @@ void BrowserView::AddedToWidget() {
@@ -5351,7 +5440,9 @@ void BrowserView::AddedToWidget() {
}
frame_->OnBrowserViewInitViewsComplete();
@@ -688,7 +675,7 @@ index 43650702e865b..4f814d29ef136 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -5670,7 +5763,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
@@ -5772,7 +5863,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -698,7 +685,7 @@ index 43650702e865b..4f814d29ef136 100644
}
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
@@ -6182,7 +6277,9 @@ Profile* BrowserView::GetProfile() {
@@ -6293,7 +6386,9 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -708,7 +695,7 @@ index 43650702e865b..4f814d29ef136 100644
}
WebContents* BrowserView::GetWebContentsForExclusiveAccess() {
@@ -6211,6 +6308,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
@@ -6322,6 +6417,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -719,10 +706,10 @@ index 43650702e865b..4f814d29ef136 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 8a06d49d2abe1..7874429a9a090 100644
index a3bad544547a4..1b4afbf714f52 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -148,11 +148,16 @@ class BrowserView : public BrowserWindow,
@@ -149,11 +149,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView)
public:
@@ -739,7 +726,7 @@ index 8a06d49d2abe1..7874429a9a090 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -938,6 +943,10 @@ class BrowserView : public BrowserWindow,
@@ -943,6 +948,10 @@ class BrowserView : public BrowserWindow,
void Copy();
void Paste();
@@ -750,7 +737,7 @@ index 8a06d49d2abe1..7874429a9a090 100644
protected:
// Enumerates where the devtools are docked relative to the browser's main
// web contents.
@@ -961,6 +970,8 @@ class BrowserView : public BrowserWindow,
@@ -966,6 +975,8 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
@@ -760,10 +747,10 @@ index 8a06d49d2abe1..7874429a9a090 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index 39fc0f21ff96c..4b575fd3877d5 100644
index 79ab40befc1c3..40ec9f8d8a0b5 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -53,6 +53,10 @@
@@ -52,6 +52,10 @@
#include "ui/views/window/client_view.h"
#include "ui/views/window/hit_test_utils.h"
@@ -774,7 +761,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
using views::View;
using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost;
@@ -108,6 +112,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
@@ -116,6 +120,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
observer_list_.Notify(&ModalDialogHostObserver::OnHostDestroying);
}
@@ -785,16 +772,16 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
void NotifyPositionRequiresUpdate() {
observer_list_.Notify(&ModalDialogHostObserver::OnPositionRequiresUpdate);
}
@@ -117,7 +125,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
views::View* view = browser_view_layout_->contents_container_;
gfx::Rect rect = view->ConvertRectToWidget(view->GetLocalBounds());
const int middle_x = rect.x() + rect.width() / 2;
- const int top = browser_view_layout_->dialog_top_y_;
+ const int top = GetDialogTopY();
return gfx::Point(middle_x - size.width() / 2, top);
@@ -148,7 +156,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
const int middle_x =
leading_x + layout_result.contents_container_bounds.width() / 2;
return gfx::Point(middle_x - dialog_size.width() / 2,
- browser_view_layout_->dialog_top_y_);
+ GetDialogTopY());
}
@@ -140,7 +148,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
bool ShouldActivateDialog() const override {
@@ -170,7 +178,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
// universally.
views::View* view = browser_view_layout_->contents_container_;
gfx::Rect content_area = view->ConvertRectToWidget(view->GetLocalBounds());
@@ -803,7 +790,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
return gfx::Size(content_area.width(), content_area.bottom() - top);
}
@@ -169,6 +177,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
@@ -199,6 +207,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
return host_widget ? host_widget->GetNativeView() : gfx::NativeView();
}
@@ -817,7 +804,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
// Add/remove observer.
void AddObserver(ModalDialogHostObserver* observer) override {
observer_list_.AddObserver(observer);
@@ -361,6 +376,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
@@ -391,6 +406,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
exclusive_access_bubble->RepositionIfVisible();
}
@@ -826,7 +813,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
dialog_host_->GetMaximumDialogSize());
@@ -374,6 +391,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
@@ -404,6 +421,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
dialog_host_->NotifyPositionRequiresUpdate();
}
@@ -834,7 +821,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
}
gfx::Size BrowserViewLayout::GetPreferredSize(
@@ -510,6 +528,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -540,6 +558,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@@ -849,7 +836,7 @@ index 39fc0f21ff96c..4b575fd3877d5 100644
bool toolbar_visible = delegate_->IsToolbarVisible();
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
index a4602bd1f5d01..1c0435c03d323 100644
index 493d444f78ae2..589c6b6f41b35 100644
--- chrome/browser/ui/views/frame/browser_view_layout.h
+++ chrome/browser/ui/views/frame/browser_view_layout.h
@@ -87,6 +87,8 @@ class BrowserViewLayout : public views::LayoutManager {
@@ -861,7 +848,7 @@ index a4602bd1f5d01..1c0435c03d323 100644
void SetUseBrowserContentMinimumSize(bool use_browser_content_minimum_size);
// Sets the bounds for the contents border.
@@ -174,7 +176,7 @@ class BrowserViewLayout : public views::LayoutManager {
@@ -176,7 +178,7 @@ class BrowserViewLayout : public views::LayoutManager {
const raw_ptr<WebAppFrameToolbarView> web_app_frame_toolbar_;
const raw_ptr<views::Label> web_app_window_title_;
const raw_ptr<TabStripRegionView> tab_strip_region_view_;
@@ -871,7 +858,7 @@ index a4602bd1f5d01..1c0435c03d323 100644
const raw_ptr<views::View> contents_container_;
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
index 9f393a42d1655..8597a655c4fac 100644
index 74ae48f94db01..e97735cbc0cea 100644
--- 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 {
@@ -883,10 +870,10 @@ index 9f393a42d1655..8597a655c4fac 100644
virtual bool IsBookmarkBarVisible() const = 0;
virtual bool IsContentsSeparatorEnabled() const = 0;
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
index d80ac44127421..f09f382e24344 100644
index 1f65552380cda..ab520daffdb11 100644
--- chrome/browser/ui/views/frame/contents_web_view.cc
+++ chrome/browser/ui/views/frame/contents_web_view.cc
@@ -35,6 +35,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
@@ -34,6 +34,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
status_bubble_ = std::make_unique<StatusBubbleViews>(this);
status_bubble_->Reposition();
web_contents_close_handler_ = std::make_unique<WebContentsCloseHandler>(this);
@@ -900,7 +887,7 @@ index d80ac44127421..f09f382e24344 100644
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
index 919f2496b089d..f541e3836f4fd 100644
index d4d5851028548..173238782ffaf 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
@@ -605,6 +605,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
@@ -1001,10 +988,10 @@ index 33c6444869375..d74818698d81a 100644
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
index 20c0861c46610..8cd44c0d95a17 100644
index 5732e0fa49448..92f02d924b63a 100644
--- 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,
@@ -110,6 +110,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
if (IsPageActionMigrated(type)) {
continue;
}
@@ -1020,10 +1007,10 @@ index 20c0861c46610..8cd44c0d95a17 100644
case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon(
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 6083cd2c41420..1da3e7881016d 100644
index 60ad9ebfa2a66..112f76a4a192e 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -720,29 +720,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -753,29 +753,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@@ -1066,10 +1053,10 @@ index 6083cd2c41420..1da3e7881016d 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index ab1b0d88b5a37..4e776a93ee8e2 100644
index 033b8cb60378e..fe59d213ee0a2 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -187,7 +187,7 @@ class TabstripLikeBackground : public views::Background {
@@ -191,7 +191,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -1078,7 +1065,7 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -221,12 +221,13 @@ END_METADATA
@@ -225,12 +225,13 @@ END_METADATA
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId);
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId);
@@ -1094,9 +1081,9 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
SetID(VIEW_ID_TOOLBAR);
SetProperty(views::kElementIdentifierKey, kToolbarElementId);
@@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
for (const auto& view_and_command : GetViewCommandMap()) {
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
@@ -265,9 +266,24 @@ ToolbarView::~ToolbarView() {
if (browser_view_->GetSupportsTabStrip()) {
browser()->GetTabStripModel()->RemoveObserver(this);
}
+
+ browser_view_->WillDestroyToolbar();
@@ -1119,7 +1106,7 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
#if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this
@@ -283,7 +299,7 @@ void ToolbarView::Init() {
@@ -290,7 +306,7 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@@ -1128,7 +1115,7 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
// Make sure the toolbar shows by default.
size_animation_.Reset(1);
@@ -356,7 +372,8 @@ void ToolbarView::Init() {
@@ -363,7 +379,8 @@ void ToolbarView::Init() {
}
std::unique_ptr<media_router::CastToolbarButton> cast;
if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) {
@@ -1138,7 +1125,7 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
cast = media_router::CastToolbarButton::Create(browser_);
}
}
@@ -821,7 +838,8 @@ void ToolbarView::Layout(PassKey) {
@@ -839,7 +856,8 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -1149,10 +1136,10 @@ index ab1b0d88b5a37..4e776a93ee8e2 100644
if (toolbar_controller_) {
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index b34fdea7f98b4..58e65bb7aff07 100644
index 09a5503b64a78..b7ee6fa181994 100644
--- 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,
@@ -99,7 +99,8 @@ class ToolbarView : public views::AccessiblePaneView,
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarElementId);
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarContainerElementId);

View File

@@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index dbd35f1300604..1c890c637d852 100644
index 9ff15341473af..73b969cabd81e 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -114,7 +114,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
std::optional<blink::UserAgentMetadata>* override_out);

View File

@@ -23,7 +23,7 @@ index 0a360f45e89d9..c88c7ea9177e5 100644
// These are protected so they can only be accessed by the friend
// classes listed above.
diff --git components/variations/BUILD.gn components/variations/BUILD.gn
index 913e7120b3a1e..323975990c8ea 100644
index 32ce3e7dafda1..14fec0983015d 100644
--- components/variations/BUILD.gn
+++ components/variations/BUILD.gn
@@ -131,6 +131,7 @@ component("variations") {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index a28237bf93ef4..9a01b185e76f4 100644
index 9bbf031144ff0..f99b7fa035187 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -588,7 +588,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -12,10 +12,10 @@ index a28237bf93ef4..9a01b185e76f4 100644
version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index a65b70e7ac2e1..9b11bf620cdbd 100644
index 287d602c11e35..f755b7af6ce71 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -978,7 +978,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -982,7 +982,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
mojo::PendingRemote<network::mojom::URLLoaderFactory>
terminal_external_protocol;
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
@@ -24,7 +24,7 @@ index a65b70e7ac2e1..9b11bf620cdbd 100644
frame_tree_node->frame_tree_node_id(), navigation_ui_data,
request_info.is_primary_main_frame,
frame_tree_node->IsInFencedFrameTree(), request_info.sandbox_flags,
@@ -990,6 +990,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -994,6 +994,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
*request_info.initiator_document_token)
: nullptr,
request_info.isolation_info, &terminal_external_protocol);
@@ -47,10 +47,10 @@ index a65b70e7ac2e1..9b11bf620cdbd 100644
return std::make_pair(
/*is_cacheable=*/false,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index 9c36ad70531bd..3546f7f9faf4e 100644
index 4a377944faaf9..e994ae8b1e944 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -1180,7 +1180,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1204,7 +1204,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@@ -59,7 +59,7 @@ index 9c36ad70531bd..3546f7f9faf4e 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1189,6 +1189,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1213,6 +1213,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en";
@@ -68,10 +68,10 @@ index 9c36ad70531bd..3546f7f9faf4e 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index f1fee091b84ae..8c9feee790c91 100644
index 0d0d957b353e0..c2a6efbbb3c0d 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -1381,6 +1381,12 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1413,6 +1413,12 @@ class CONTENT_EXPORT ContentBrowserClient {
bool opener_suppressed,
bool* no_javascript_access);
@@ -84,7 +84,7 @@ index f1fee091b84ae..8c9feee790c91 100644
// Allows the embedder to return a delegate for the SpeechRecognitionManager.
// The delegate will be owned by the manager. It's valid to return nullptr.
virtual SpeechRecognitionManagerDelegate*
@@ -2226,7 +2232,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2258,7 +2264,7 @@ class CONTENT_EXPORT ContentBrowserClient {
//
// If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext.
@@ -93,7 +93,7 @@ index f1fee091b84ae..8c9feee790c91 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2468,6 +2474,22 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2500,6 +2506,22 @@ class CONTENT_EXPORT ContentBrowserClient {
const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -116,7 +116,7 @@ index f1fee091b84ae..8c9feee790c91 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture.
// This window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow.
@@ -2533,6 +2555,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2565,6 +2587,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -153,10 +153,10 @@ index 7a2d251ba2d13..68297ee6f118f 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 0a5556cb6eac8..cecc0ae19bc62 100644
index 790bf3bdfc489..c339cbd763417 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -593,6 +593,8 @@ void RenderThreadImpl::Init() {
@@ -590,6 +590,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@@ -166,10 +166,10 @@ index 0a5556cb6eac8..cecc0ae19bc62 100644
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 5747f94527887..d54aeac829007 100644
index 45cbe16e4582c..401b59c0f3490 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1049,6 +1049,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -1058,6 +1058,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@@ -186,7 +186,7 @@ index 5747f94527887..d54aeac829007 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 206b8df48273a..e10852779c209 100644
index 2b6f49b635456..6d1221d8663ca 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -250,6 +250,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -200,10 +200,10 @@ index 206b8df48273a..e10852779c209 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite();
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
index 3993da6d53843..78784b4dd8842 100644
index a907bcc2eab8d..64ebf54ffd494 100644
--- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc
@@ -820,7 +820,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
@@ -819,7 +819,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@@ -212,7 +212,7 @@ index 3993da6d53843..78784b4dd8842 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -829,6 +829,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
@@ -828,6 +828,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
ConfigureNetworkContextParamsForShell(context, network_context_params,
cert_verifier_creation_params);
@@ -221,10 +221,10 @@ index 3993da6d53843..78784b4dd8842 100644
std::vector<base::FilePath>
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
index 29f0d888bcc9a..d870ed9844bb7 100644
index e608835c3d16f..1d767a2ee4c09 100644
--- content/shell/browser/shell_content_browser_client.h
+++ content/shell/browser/shell_content_browser_client.h
@@ -161,7 +161,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
@@ -162,7 +162,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
GetGeolocationSystemPermissionManager() override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -234,10 +234,10 @@ index 29f0d888bcc9a..d870ed9844bb7 100644
bool in_memory,
const base::FilePath& relative_partition_path,
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
index 3ca4381bcf4df..2ac7cea3f12bc 100644
index 26f73ac1df741..13214f607471f 100644
--- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc
@@ -394,7 +394,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
@@ -423,7 +423,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
return true;
}
@@ -246,7 +246,7 @@ index 3ca4381bcf4df..2ac7cea3f12bc 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -404,6 +404,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
@@ -433,6 +433,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams(
in_memory, relative_partition_path, network_context_params,
cert_verifier_creation_params);
@@ -255,10 +255,10 @@ index 3ca4381bcf4df..2ac7cea3f12bc 100644
std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index 30af5588cd71d..29940a43ce09f 100644
index 4234c1259f4b0..8b4e308ce94af 100644
--- headless/lib/browser/headless_content_browser_client.h
+++ headless/lib/browser/headless_content_browser_client.h
@@ -113,7 +113,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
@@ -114,7 +114,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
content::BrowserContext* browser_context,
const url::Origin& top_frame_origin,
const url::Origin& context_origin) 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
index 100eea6a4d7f3..fecc3a95130d7 100644
index a7212c57ccebf..85d0bf052b774 100644
--- 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(

View File

@@ -13,10 +13,10 @@ index b6389523952a4..f9c709624cd0e 100644
setproctitle_init(main_argv);
}
diff --git content/app/content_main.cc content/app/content_main.cc
index ffc5c37742800..82e1c22b0f073 100644
index 36248b2a3e099..4dcfe54abccef 100644
--- content/app/content_main.cc
+++ content/app/content_main.cc
@@ -199,16 +199,10 @@ ContentMainParams::~ContentMainParams() = default;
@@ -205,16 +205,10 @@ ContentMainParams::~ContentMainParams() = default;
ContentMainParams::ContentMainParams(ContentMainParams&&) = default;
ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default;
@@ -35,7 +35,7 @@ index ffc5c37742800..82e1c22b0f073 100644
// A flag to indicate whether Main() has been called before. On Android, we
// may re-run Main() without restarting the browser process. This flag
@@ -287,7 +281,9 @@ NO_STACK_PROTECTOR int RunContentProcess(
@@ -293,7 +287,9 @@ NO_STACK_PROTECTOR int RunContentProcess(
// default, "C", locale.
setlocale(LC_NUMERIC, "C");
@@ -46,7 +46,7 @@ index ffc5c37742800..82e1c22b0f073 100644
#endif
#if BUILDFLAG(IS_WIN)
@@ -295,14 +291,6 @@ NO_STACK_PROTECTOR int RunContentProcess(
@@ -301,14 +297,6 @@ NO_STACK_PROTECTOR int RunContentProcess(
#endif
#if BUILDFLAG(IS_MAC)
@@ -61,7 +61,7 @@ index ffc5c37742800..82e1c22b0f073 100644
InitializeMac();
#endif
@@ -356,12 +344,44 @@ NO_STACK_PROTECTOR int RunContentProcess(
@@ -371,12 +359,44 @@ NO_STACK_PROTECTOR int RunContentProcess(
if (IsSubprocess())
CommonSubprocessInit();
@@ -108,7 +108,7 @@ index ffc5c37742800..82e1c22b0f073 100644
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 24f6f89cfa430..da28867d34ef5 100644
index 48363b920c780..920db94bb1738 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -50,6 +50,7 @@
@@ -119,7 +119,7 @@ index 24f6f89cfa430..da28867d34ef5 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/branding_buildflags.h"
@@ -1340,6 +1341,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1366,6 +1367,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}

View File

@@ -0,0 +1,68 @@
diff --git content/browser/renderer_host/navigation_throttle_runner.cc content/browser/renderer_host/navigation_throttle_runner.cc
index 58da260893bf5..f54b5d1d6dcfd 100644
--- content/browser/renderer_host/navigation_throttle_runner.cc
+++ content/browser/renderer_host/navigation_throttle_runner.cc
@@ -149,17 +149,23 @@ NavigationHandle& NavigationThrottleRunner::GetNavigationHandle() {
}
void NavigationThrottleRunner::AddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) {
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first) {
CHECK(navigation_throttle);
TRACE_EVENT1("navigation", "NavigationThrottleRunner::AddThrottle",
"navigation_throttle", navigation_throttle->GetNameForLogging());
- throttles_.push_back(std::move(navigation_throttle));
+ if (first) {
+ throttles_.emplace(throttles_.begin(), std::move(navigation_throttle));
+ } else {
+ throttles_.push_back(std::move(navigation_throttle));
+ }
}
void NavigationThrottleRunner::MaybeAddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) {
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first) {
if (navigation_throttle) {
- AddThrottle(std::move(navigation_throttle));
+ AddThrottle(std::move(navigation_throttle), first);
}
}
diff --git content/browser/renderer_host/navigation_throttle_runner.h content/browser/renderer_host/navigation_throttle_runner.h
index 21f7fb2b6c46b..6f369d7e3222a 100644
--- content/browser/renderer_host/navigation_throttle_runner.h
+++ content/browser/renderer_host/navigation_throttle_runner.h
@@ -75,9 +75,11 @@ class CONTENT_EXPORT NavigationThrottleRunner
// Implements NavigationThrottleRegistry:
NavigationHandle& GetNavigationHandle() override;
void AddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) override;
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first = false) override;
void MaybeAddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) override;
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first = false) override;
// Will call the appropriate NavigationThrottle function based on |event| on
// all NavigationThrottles owned by this NavigationThrottleRunner.
diff --git content/public/browser/navigation_throttle_registry.h content/public/browser/navigation_throttle_registry.h
index 4a212401c67a8..b77c15736b177 100644
--- content/public/browser/navigation_throttle_registry.h
+++ content/public/browser/navigation_throttle_registry.h
@@ -29,9 +29,11 @@ class CONTENT_EXPORT NavigationThrottleRegistry {
// pass a nullptr, use MaybeAddThrottle() instead. It just ignores calls with
// a nullptr.
virtual void AddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) = 0;
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first = false) = 0;
virtual void MaybeAddThrottle(
- std::unique_ptr<NavigationThrottle> navigation_throttle) = 0;
+ std::unique_ptr<NavigationThrottle> navigation_throttle,
+ bool first = false) = 0;
};
} // namespace content

View File

@@ -12,7 +12,7 @@ index ae58a0b0a64ae..35e01ee64e5d7 100644
"//google_apis/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index c0a9639d27232..e1cfab3d24c4f 100644
index e32e31565b7cc..464bdcf2c95e3 100644
--- BUILD.gn
+++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/ui.gni")
@@ -23,7 +23,7 @@ index c0a9639d27232..e1cfab3d24c4f 100644
import("//chrome/enterprise_companion/buildflags.gni")
import("//components/enterprise/buildflags/buildflags.gni")
import("//components/nacl/features.gni")
@@ -293,6 +294,10 @@ group("gn_all") {
@@ -292,6 +293,10 @@ group("gn_all") {
deps += root_extra_deps
@@ -78,7 +78,7 @@ index bd41166938952..fba7843d79796 100644
visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ]
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 845b473d56165..d1ffe4a9e54b1 100644
index 388b83742657c..54a0bac5b6ad6 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -5,6 +5,7 @@
@@ -89,7 +89,7 @@ index 845b473d56165..d1ffe4a9e54b1 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//components/compose/features.gni")
@@ -479,6 +480,11 @@ template("chrome_extra_paks") {
@@ -497,6 +498,11 @@ template("chrome_extra_paks") {
deps += [ "//components/headless/command_handler" ]
}

View File

@@ -1,11 +1,11 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 342b54311138a..037a8da0884ec 100644
index 2f4ab49cbe968..5e78796e1820b 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1508,11 +1508,18 @@
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
"META": {"sizes": {"messages": [2000],}},
"messages": [10080],
@@ -1532,11 +1532,18 @@
"third_party/search_engines_data/resources/search_engines_scaled_resources.grd": {
"structures": [10100],
- }
+ },

View File

@@ -1,8 +1,8 @@
diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc
index add20a2f81d66..97071092ff768 100644
index 75cafbe0dbd7d..337a10d6a90c3 100644
--- content/browser/child_process_launcher_helper_linux.cc
+++ content/browser/child_process_launcher_helper_linux.cc
@@ -191,7 +191,7 @@ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() {
@@ -190,7 +190,7 @@ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() {
base::File OpenFileToShare(const base::FilePath& path,
base::MemoryMappedFile::Region* region) {
base::FilePath exe_dir;
@@ -25,11 +25,11 @@ index f3a6d25be41ed..c826aa9e9ab6c 100644
if (base::PathExists(sandbox_candidate))
sandbox_binary = sandbox_candidate;
diff --git ui/ozone/common/egl_util.cc ui/ozone/common/egl_util.cc
index c3879262996c5..955fd0a375f60 100644
index 92b2a6da7828f..bf318d19255e0 100644
--- ui/ozone/common/egl_util.cc
+++ ui/ozone/common/egl_util.cc
@@ -135,7 +135,7 @@ bool LoadDefaultEGLGLES2Bindings(
if (implementation.gl == gl::kGLImplementationEGLANGLE) {
@@ -149,7 +149,7 @@ bool LoadDefaultEGLGLES2Bindings(
#else
base::FilePath module_path;
#if !BUILDFLAG(IS_FUCHSIA)
- if (!base::PathService::Get(base::DIR_MODULE, &module_path))

View File

@@ -1,8 +1,8 @@
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
index 30440d1b5ba07..c16bda68afbd2 100644
index 09b5f1a0165ca..441bcedb3ac8b 100644
--- ui/accessibility/platform/BUILD.gn
+++ ui/accessibility/platform/BUILD.gn
@@ -355,6 +355,10 @@ component("platform") {
@@ -357,6 +357,10 @@ component("platform") {
if (use_gio) {
configs += [ "//build/linux:gio_config" ]
}
@@ -14,10 +14,10 @@ index 30440d1b5ba07..c16bda68afbd2 100644
}
}
diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn
index 539cc383b43be..574a7a48787fe 100644
index dc98ce8281066..31a1eac703aba 100644
--- ui/gtk/BUILD.gn
+++ ui/gtk/BUILD.gn
@@ -173,4 +173,8 @@ component("gtk") {
@@ -175,4 +175,8 @@ component("gtk") {
# TODO: This should be removed.
deps += [ "//ui/ozone" ]

View File

@@ -1,16 +1,16 @@
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
index 95bdbe6ae04af..913719635a342 100644
index 79cdad0adc1ae..b9cb878b771b0 100644
--- ui/gtk/gtk_ui.cc
+++ ui/gtk/gtk_ui.cc
@@ -31,6 +31,7 @@
#include "base/numerics/safe_conversions.h"
@@ -32,6 +32,7 @@
#include "base/observer_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/themes/theme_properties.h" // nogncheck
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -253,10 +254,15 @@ bool GtkUi::Initialize() {
@@ -254,10 +255,15 @@ bool GtkUi::Initialize() {
};
GtkSettings* settings = gtk_settings_get_default();
@@ -27,7 +27,7 @@ index 95bdbe6ae04af..913719635a342 100644
&GtkUi::OnCursorThemeNameChanged);
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
index 14a38b11d595c..84174ea74f7d2 100644
index 4f00f630665a1..0c0408838872a 100644
--- ui/ozone/platform/x11/ozone_platform_x11.cc
+++ ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -64,6 +64,8 @@ namespace ui {
@@ -39,7 +39,7 @@ index 14a38b11d595c..84174ea74f7d2 100644
// Singleton OzonePlatform implementation for X11 platform.
class OzonePlatformX11 : public OzonePlatform,
public OSExchangeDataProviderFactoryOzone {
@@ -265,7 +267,15 @@ class OzonePlatformX11 : public OzonePlatform,
@@ -266,7 +268,15 @@ class OzonePlatformX11 : public OzonePlatform,
TouchFactory::SetTouchDeviceListFromCommandLine();
#if BUILDFLAG(USE_GTK)
@@ -56,7 +56,7 @@ index 14a38b11d595c..84174ea74f7d2 100644
#endif
menu_utils_ = std::make_unique<X11MenuUtils>();
@@ -364,4 +374,8 @@ OzonePlatform* CreateOzonePlatformX11() {
@@ -365,4 +375,8 @@ OzonePlatform* CreateOzonePlatformX11() {
return new OzonePlatformX11;
}

View File

@@ -100,7 +100,7 @@ index 3ab395e3b0b45..c012641a5dc7e 100644
}
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
index 4ce8218e5d809..908397b968415 100644
index c4805571bc162..57b967a9e5962 100644
--- ui/linux/linux_ui.h
+++ ui/linux/linux_ui.h
@@ -20,6 +20,10 @@

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_resource_bundle_helper.cc chrome/browser/chrome_resource_bundle_helper.cc
index d1e99bf112b20..fee8571fab728 100644
index 2c437e5229bc1..f10ddd1dca48d 100644
--- chrome/browser/chrome_resource_bundle_helper.cc
+++ chrome/browser/chrome_resource_bundle_helper.cc
@@ -63,8 +63,10 @@ extern void InitializeLocalState(
@@ -62,8 +62,10 @@ extern void InitializeLocalState(
// Initializes the shared instance of ResourceBundle and returns the application
// locale. An empty |actual_locale| value indicates failure.
@@ -13,10 +13,10 @@ index d1e99bf112b20..fee8571fab728 100644
+ ui::ResourceBundle::Delegate* resource_bundle_delegate,
+ bool is_running_tests) {
#if BUILDFLAG(IS_ANDROID)
// In order for SetLoadSecondaryLocalePaks() to work ResourceBundle must
// not have been created yet.
@@ -77,16 +79,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
.empty());
// In order for DetectAndSetLoadSecondaryLocalePaks() to work ResourceBundle
// must not have been created yet.
@@ -71,23 +73,16 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
ui::DetectAndSetLoadSecondaryLocalePaks();
#endif
- std::string preferred_locale;
@@ -31,9 +31,8 @@ index d1e99bf112b20..fee8571fab728 100644
local_state->GetString(language::prefs::kApplicationLocale);
-#endif
#if BUILDFLAG(IS_CHROMEOS)
ui::ResourceBundle::SetLottieParsingFunctions(
@@ -98,7 +92,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
TRACE_EVENT0("startup",
"ChromeBrowserMainParts::InitResourceBundleAndDetermineLocale");
// On a POSIX OS other than ChromeOS, the parameter that is passed to the
// method InitSharedInstance is ignored.
std::string actual_locale = ui::ResourceBundle::InitSharedInstanceWithLocale(
@@ -43,7 +42,7 @@ index d1e99bf112b20..fee8571fab728 100644
CHECK(!actual_locale.empty())
<< "Locale could not be found for " << preferred_locale;
@@ -131,6 +126,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
@@ -120,6 +115,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
std::string LoadLocalState(
ChromeFeatureListCreator* chrome_feature_list_creator,
@@ -51,7 +50,7 @@ index d1e99bf112b20..fee8571fab728 100644
bool is_running_tests) {
base::FilePath user_data_dir;
if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
@@ -142,5 +138,6 @@ std::string LoadLocalState(
@@ -131,5 +127,6 @@ std::string LoadLocalState(
new ChromeCommandLinePrefStore(base::CommandLine::ForCurrentProcess()));
return InitResourceBundleAndDetermineLocale(

View File

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

View File

@@ -1,8 +1,8 @@
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 a6b6917ee2c02..3033900be5c83 100644
index e2b524c968d67..daaf0c04c8b79 100644
--- 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,
@@ -173,6 +173,13 @@ void ExtractUnderlines(NSAttributedString* string,
// RenderWidgetHostViewCocoa ---------------------------------------------------
@@ -16,7 +16,7 @@ index a6b6917ee2c02..3033900be5c83 100644
// Private methods:
@interface RenderWidgetHostViewCocoa ()
@@ -774,6 +781,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -785,6 +792,15 @@ void ExtractUnderlines(NSAttributedString* string,
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {

View File

@@ -12,7 +12,7 @@ index 37cb1dac49610..6e5989c73bf08 100644
virtual ~WebContentsView() = default;
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 60de0d74ee40f..ae66707e652be 100644
index 0bba5f4b0abda..59d04826eb87d 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -226,6 +226,8 @@ void MimeHandlerViewGuest::CreateInnerPage(

View File

@@ -1,8 +1,8 @@
diff --git ipc/ipc_mojo_bootstrap.cc ipc/ipc_mojo_bootstrap.cc
index 15b01b6562a41..240ceee90a405 100644
index e60b3b9462479..b90ebf85c1099 100644
--- ipc/ipc_mojo_bootstrap.cc
+++ ipc/ipc_mojo_bootstrap.cc
@@ -977,7 +977,8 @@ class ChannelAssociatedGroupController
@@ -976,7 +976,8 @@ class ChannelAssociatedGroupController
endpoint->disconnect_reason());
base::AutoUnlock unlocker(lock_);
@@ -316,10 +316,10 @@ index 8d51fbad3832e..a2eff11227539 100644
// Resets this Receiver to an unbound state. An unbound Receiver will NEVER
// schedule method calls or disconnection notifications, and any pending tasks
diff --git mojo/public/cpp/bindings/receiver_set.cc mojo/public/cpp/bindings/receiver_set.cc
index ede8e5973b576..6f22981831ede 100644
index 642984d7c4376..b7ba0ed435384 100644
--- mojo/public/cpp/bindings/receiver_set.cc
+++ mojo/public/cpp/bindings/receiver_set.cc
@@ -69,9 +69,10 @@ void ReceiverSetState::Entry::DidDispatchOrReject() {
@@ -68,9 +68,10 @@ void ReceiverSetState::Entry::DidDispatchOrReject() {
}
void ReceiverSetState::Entry::OnDisconnect(uint32_t custom_reason_code,
@@ -332,7 +332,7 @@ index ede8e5973b576..6f22981831ede 100644
}
ReceiverSetState::ReceiverSetState() = default;
@@ -81,12 +82,21 @@ ReceiverSetState::~ReceiverSetState() = default;
@@ -80,12 +81,21 @@ ReceiverSetState::~ReceiverSetState() = default;
void ReceiverSetState::set_disconnect_handler(base::RepeatingClosure handler) {
disconnect_handler_ = std::move(handler);
disconnect_with_reason_handler_.Reset();
@@ -354,7 +354,7 @@ index ede8e5973b576..6f22981831ede 100644
}
ReportBadMessageCallback ReceiverSetState::GetBadMessageCallback() {
@@ -159,7 +169,8 @@ void ReceiverSetState::SetDispatchContext(void* context,
@@ -158,7 +168,8 @@ void ReceiverSetState::SetDispatchContext(void* context,
void ReceiverSetState::OnDisconnect(ReceiverId id,
uint32_t custom_reason_code,
@@ -362,9 +362,9 @@ index ede8e5973b576..6f22981831ede 100644
+ const std::string& description,
+ MojoResult error_result) {
auto it = entries_.find(id);
CHECK(it != entries_.end(), base::NotFatalUntil::M130);
CHECK(it != entries_.end());
@@ -171,6 +182,10 @@ void ReceiverSetState::OnDisconnect(ReceiverId id,
@@ -170,6 +181,10 @@ void ReceiverSetState::OnDisconnect(ReceiverId id,
disconnect_handler_.Run();
else if (disconnect_with_reason_handler_)
disconnect_with_reason_handler_.Run(custom_reason_code, description);

View File

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

View File

@@ -32,7 +32,7 @@ index 6e331ee24bddf..ab6c61c2e57ac 100644
} // namespace input
diff --git components/input/render_input_router.h components/input/render_input_router.h
index d29c03fddd2a5..f855afb39deb7 100644
index f9b608527a252..ec64323db09be 100644
--- components/input/render_input_router.h
+++ components/input/render_input_router.h
@@ -68,6 +68,7 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter
@@ -58,10 +58,10 @@ index 477389a1cb1d3..b7b7edbfbdf5d 100644
return nullptr;
}
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 7b11077760d2a..1f67d3ccbe94d 100644
index 52f772876a887..fb14424865660 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3727,6 +3727,11 @@ void RenderWidgetHostImpl::StopFling() {
@@ -3759,6 +3759,11 @@ void RenderWidgetHostImpl::StopFling() {
GetRenderInputRouter()->StopFling();
}
@@ -74,10 +74,10 @@ index 7b11077760d2a..1f67d3ccbe94d 100644
uint16_t angle,
display::mojom::ScreenOrientation type) {
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index c11b7183397d2..61a20efe04f7a 100644
index 0bc94f2246a93..20fbaaf347d58 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -844,6 +844,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -848,6 +848,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 00b1dc2ab7661..7b54617d1443d 100644
index a0335fef252b4..185276598f53e 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -760,6 +760,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
@@ -757,6 +757,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 5867fc3e77326..23656289851bc 100644
index e6235611a2ae6..61cc0e5f23c85 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -8,6 +8,7 @@
@@ -59,7 +59,7 @@ index 5867fc3e77326..23656289851bc 100644
void RenderWidgetHostViewAura::UpdateFrameSinkIdRegistration() {
diff --git content/browser/renderer_host/render_widget_host_view_aura.h content/browser/renderer_host/render_widget_host_view_aura.h
index 6f96b83c36ee0..52cc4b37f0bbe 100644
index 33d9c06d52f0e..85a37269f20b7 100644
--- content/browser/renderer_host/render_widget_host_view_aura.h
+++ content/browser/renderer_host/render_widget_host_view_aura.h
@@ -451,6 +451,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAura

View File

@@ -1,8 +1,8 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index 92f2c53333fd5..114c89aa6717b 100644
index 8de43eb2f6dda..71b697b1fba50 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -947,6 +947,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
@@ -989,6 +989,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
: delegate_(delegate),
locale_resources_data_lock_(new base::Lock),
max_scale_factor_(k100Percent) {
@@ -15,7 +15,7 @@ index 92f2c53333fd5..114c89aa6717b 100644
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMangleLocalizedStrings);
}
@@ -956,6 +962,11 @@ ResourceBundle::~ResourceBundle() {
@@ -998,6 +1004,11 @@ ResourceBundle::~ResourceBundle() {
UnloadLocaleResources();
}
@@ -28,10 +28,10 @@ index 92f2c53333fd5..114c89aa6717b 100644
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice";
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
index 5c91532db08be..97bb235e4cf81 100644
index 796bd94ec8453..d1bf0c93a64fb 100644
--- ui/base/resource/resource_bundle.h
+++ ui/base/resource/resource_bundle.h
@@ -224,6 +224,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
@@ -213,6 +213,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
ResourceBundle(const ResourceBundle&) = delete;
ResourceBundle& operator=(const ResourceBundle&) = delete;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index ebf407904b9b9..2bfdce0253d62 100644
index 23cd457563d7d..5fe363a9455ec 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -9788,6 +9788,16 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9735,6 +9735,16 @@ void RenderFrameHostImpl::CreateNewWindow(
return;
}
@@ -19,11 +19,11 @@ index ebf407904b9b9..2bfdce0253d62 100644
// Otherwise, consume user activation before we proceed. In particular, it is
// important to do this before we return from the |opener_suppressed| case
// below.
@@ -12205,6 +12215,7 @@ void RenderFrameHostImpl::CommitNavigation(
auto browser_calc_origin_to_commit =
navigation_request->GetOriginToCommitWithDebugInfo();
@@ -12165,6 +12175,7 @@ void RenderFrameHostImpl::CommitNavigation(
ProcessLock::FromSiteInfo(GetSiteInstance()->GetSiteInfo());
auto browser_calc_origin_to_commit = navigation_request->GetOriginToCommit();
if (!process_lock.is_error_page() && !is_mhtml_subframe &&
+ common_params->url.IsStandard() &&
!policy->CanAccessOrigin(
GetProcess()->GetDeprecatedID(),
browser_calc_origin_to_commit.first.value(),
browser_calc_origin_to_commit.value(),

View File

@@ -1,5 +1,5 @@
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index b914ce39d47f8..bbacc1e021d3d 100644
index e1090c36a6fcb..5e98eee4d7528 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -55,6 +55,7 @@
@@ -122,10 +122,10 @@ index fb47ecfba4a4d..0896266df56e7 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 616f639ce1cad..685178b2fbd5d 100644
index e9d152aa78f7c..ce7494f4606ae 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2807,22 +2807,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2820,22 +2820,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
pref_service.get(), network_service_->network_quality_estimator());
}
@@ -169,7 +169,7 @@ index 616f639ce1cad..685178b2fbd5d 100644
base::FilePath transport_security_persister_file_name;
if (GetFullDataFilePath(params_->file_paths,
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 4ea464b2b6c00..accfb976c960b 100644
index 444379292d06d..46fd47833dcb9 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -362,6 +362,9 @@ struct NetworkContextParams {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 2b63e244ddaae..7d3e5017cf125 100644
index e55fc5e68deb4..e6b198a4e4ac0 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -3498,9 +3498,12 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -3547,9 +3547,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params =
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
index 3ccdf84f3c2db..c0042a82da63a 100644
index 48958bed62380..308a151437ad2 100644
--- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc
@@ -171,6 +171,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
@@ -14,10 +14,10 @@ index 3ccdf84f3c2db..c0042a82da63a 100644
if (crashed_overlay_view_.view() == crashed_overlay_view) {
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index b626c7abff2a9..4a157a068d867 100644
index b488196acac42..9f2964d5260a9 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -108,6 +108,10 @@ class WEBVIEW_EXPORT WebView : public View,
@@ -109,6 +109,10 @@ class WEBVIEW_EXPORT WebView : public View,
void EnableSizingFromWebContents(const gfx::Size& min_size,
const gfx::Size& max_size);

View File

@@ -1,10 +1,10 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index 5e0f05804e814..2ac172b386c8b 100644
index 31c41cb8e8cc0..2afecc782347d 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -69,6 +69,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("cc"),
perfetto::Category("cc.debug"),
@@ -96,6 +96,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("cc").SetTags("rendering"),
perfetto::Category("cc.debug").SetTags("debug"),
perfetto::Category("cdp.perf"),
+ perfetto::Category("cef"),
+ perfetto::Category("cef.client"),

View File

@@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn
index 818f13802c6..4aa889bc3ad 100644
index f2f72a02c61..642ca2f2c43 100644
--- BUILD.gn
+++ BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/riscv.gni")
@@ -10,7 +10,7 @@ index 818f13802c6..4aa889bc3ad 100644
import("//third_party/icu/config.gni")
import("gni/snapshot_toolchain.gni")
@@ -495,6 +496,9 @@ declare_args() {
@@ -500,6 +501,9 @@ declare_args() {
# Experimental testing mode where various limits are artificially set lower.
v8_lower_limits_mode = false
@@ -20,7 +20,7 @@ index 818f13802c6..4aa889bc3ad 100644
# Enables the use of partition_alloc as the default allocator for standalone
# V8. This should be used for benchmarking and testing purposes to more
# closely mimic in-browser behavior.
@@ -875,6 +879,10 @@ config("internal_config") {
@@ -890,6 +894,10 @@ config("internal_config") {
defines += [ "BUILDING_V8_SHARED" ]
}

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
index ff43c838c27b0..fb6c69c99c3cf 100644
index bc911ad76cd93..7a927bfedde63 100644
--- 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) {
@@ -1042,7 +1042,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
host->button()->GetWidget(), host,
host->button()->GetAnchorBoundsInScreen(),
views::MenuAnchorPosition::kTopRight, ui::mojom::MenuSourceType::kNone,
@@ -133,10 +133,10 @@ index 26734958c1faa..10a5d50190834 100644
friend class test::InkDropHostTestApi;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 74c21a8d33b5e..4dadf74b6097d 100644
index 440cb4b8a356a..f5b58c96804af 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -605,6 +605,12 @@ void LabelButton::OnThemeChanged() {
@@ -616,6 +616,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint();
}
@@ -254,12 +254,12 @@ index b4cb7c83a3e4c..562e096930147 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index a777b6b4c61c2..456e2b04848fc 100644
index 05dfc40b27072..f6f7c57733bb4 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -589,7 +589,8 @@ void MenuController::Run(Widget* parent,
@@ -599,7 +599,8 @@ void MenuController::Run(Widget* parent,
ui::mojom::MenuSourceType source_type,
bool context_menu,
MenuType menu_type,
bool is_nested_drag,
- gfx::NativeView native_view_for_gestures) {
+ gfx::NativeView native_view_for_gestures,
@@ -267,7 +267,7 @@ index a777b6b4c61c2..456e2b04848fc 100644
exit_type_ = ExitType::kNone;
possible_drag_ = false;
drag_in_progress_ = false;
@@ -658,6 +659,7 @@ void MenuController::Run(Widget* parent,
@@ -668,6 +669,7 @@ void MenuController::Run(Widget* parent,
}
native_view_for_gestures_ = native_view_for_gestures;
@@ -275,7 +275,7 @@ index a777b6b4c61c2..456e2b04848fc 100644
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
// will use the existing one.
@@ -2386,6 +2388,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2409,6 +2411,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
params.do_capture = do_capture;
params.native_view_for_gestures = native_view_for_gestures_;
params.owned_window_anchor = anchor;
@@ -283,7 +283,7 @@ index a777b6b4c61c2..456e2b04848fc 100644
if (item->GetParentMenuItem()) {
params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -3100,7 +3103,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
@@ -3133,7 +3136,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@@ -296,7 +296,7 @@ index a777b6b4c61c2..456e2b04848fc 100644
return;
}
@@ -3125,6 +3132,7 @@ void MenuController::CloseSubmenu() {
@@ -3158,6 +3165,7 @@ void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
if (!item->GetParentMenuItem()) {
@@ -305,12 +305,12 @@ index a777b6b4c61c2..456e2b04848fc 100644
}
if (item->SubmenuIsShowing()) {
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
index 737b5dd9a243e..44b088afd01c8 100644
index 1fab28142791b..1ae277c2b6d66 100644
--- ui/views/controls/menu/menu_controller.h
+++ ui/views/controls/menu/menu_controller.h
@@ -140,7 +140,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
@@ -146,7 +146,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
ui::mojom::MenuSourceType source_type = ui::mojom::MenuSourceType::kNone,
bool context_menu = false,
MenuType menu_type = MenuType::kNormal,
bool is_nested_drag = false,
- gfx::NativeView native_view_for_gestures = gfx::NativeView());
+ gfx::NativeView native_view_for_gestures = gfx::NativeView(),
@@ -318,7 +318,7 @@ index 737b5dd9a243e..44b088afd01c8 100644
bool for_drop() const { return for_drop_; }
@@ -740,6 +741,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
@@ -748,6 +749,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
// RunType::SEND_GESTURE_EVENTS_TO_OWNER is set.
gfx::NativeView native_view_for_gestures_ = gfx::NativeView();
@@ -403,13 +403,13 @@ index fc1d5fccc3845..c065cafcd537c 100644
explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 75433da75bee3..351c209cb21c8 100644
index a2fe435a88ac0..f1108ff49dfe6 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1158,6 +1158,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@@ -1169,6 +1169,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
rounded_rect.setRectRadii(gfx::RectFToSkRect(gfx::RectF(GetLocalBounds())),
radii);
canvas->sk_canvas()->drawRRect(rounded_rect, flags);
+ return;
+ }
+
@@ -422,7 +422,7 @@ index 75433da75bee3..351c209cb21c8 100644
} else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1228,6 +1237,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1239,6 +1248,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
}
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@@ -567,10 +567,10 @@ index 87739aa15210f..e785faf160c2e 100644
}
diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h
index c60b13df53aae..2e2b9174938f7 100644
index cb9d9d46eea37..a9ffb74761fce 100644
--- ui/views/controls/menu/menu_runner.h
+++ ui/views/controls/menu/menu_runner.h
@@ -160,6 +160,8 @@ class VIEWS_EXPORT MenuRunner {
@@ -164,6 +164,8 @@ class VIEWS_EXPORT MenuRunner {
MenuAnchorPosition anchor,
ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures = gfx::NativeView(),
@@ -580,7 +580,7 @@ index c60b13df53aae..2e2b9174938f7 100644
std::optional<std::string> show_menu_host_duration_histogram =
std::nullopt);
diff --git ui/views/controls/menu/menu_runner_impl.cc ui/views/controls/menu/menu_runner_impl.cc
index bf7f7c6d8d31e..b7054a59a8876 100644
index 3793390d203db..d56aa411470ab 100644
--- ui/views/controls/menu/menu_runner_impl.cc
+++ ui/views/controls/menu/menu_runner_impl.cc
@@ -119,6 +119,7 @@ void MenuRunnerImpl::RunMenuAt(
@@ -591,9 +591,9 @@ index bf7f7c6d8d31e..b7054a59a8876 100644
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {
closing_event_time_ = base::TimeTicks();
@@ -193,7 +194,7 @@ void MenuRunnerImpl::RunMenuAt(
@@ -199,7 +200,7 @@ void MenuRunnerImpl::RunMenuAt(
controller->Run(parent, button_controller, menu_.get(), bounds, anchor,
source_type, (run_types & MenuRunner::CONTEXT_MENU) != 0,
source_type, menu_type,
(run_types & MenuRunner::NESTED_DRAG) != 0,
- native_view_for_gestures);
+ native_view_for_gestures, parent_widget);
@@ -749,10 +749,10 @@ index da772edd48c00..43c930e932287 100644
std::optional<std::string> show_menu_host_duration_histogram) {
RunMenu(parent, bounds.CenterPoint());
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index 32ad737090b8d..4b9372a4b82c0 100644
index 63f5dad7e4966..a1e03a81d7d78 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -274,6 +274,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@@ -275,6 +275,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ = background_view_->AddChildView(
std::make_unique<MenuScrollButton>(content_view, false));
@@ -789,7 +789,7 @@ index 548bd04490964..9772363322649 100644
if (root_location != root_current_location &&
!g_ozone_ui_controls_test_helper->MustUseUiControlsForMoveCursorTo() &&
diff --git ui/views/view.h ui/views/view.h
index ae7eab37f12ba..a21fb91688c0c 100644
index 0dbbd7979ad79..c33fb43ea52cb 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -26,6 +26,7 @@

View File

@@ -1,5 +1,5 @@
diff --git ui/views/controls/textfield/textfield.cc ui/views/controls/textfield/textfield.cc
index 971a4ea58a9ee..6a4a457bc055b 100644
index 141312ac02247..aa98d6c97b0f9 100644
--- ui/views/controls/textfield/textfield.cc
+++ ui/views/controls/textfield/textfield.cc
@@ -3132,6 +3132,10 @@ void Textfield::OnEnabledChanged() {

View File

@@ -61,10 +61,10 @@ index 971e5273f1b05..a5d847f7f9d60 100644
case ui::mojom::WindowShowState::kMaximized:
return kSerializedShowStateMaximized;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 30ec1b5e2688b..e9452c1eb9dee 100644
index 7caab47fb4e5b..72c43fc57abf6 100644
--- 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 {
@@ -603,6 +603,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_;
}
@@ -80,10 +80,10 @@ index 30ec1b5e2688b..e9452c1eb9dee 100644
if (!GetMouseWheelPhaseHandler())
return;
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index c93e93d13f101..cefd78e15857a 100644
index bad25563b4d28..a2ce20681d1db 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -73,6 +73,7 @@ namespace content {
@@ -74,6 +74,7 @@ namespace content {
class DevicePosturePlatformProvider;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
@@ -91,7 +91,7 @@ index c93e93d13f101..cefd78e15857a 100644
class ScopedViewTransitionResources;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -159,6 +160,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -158,6 +159,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void DidOverscroll(const ui::DidOverscrollParams& params) {}
@@ -101,7 +101,7 @@ index c93e93d13f101..cefd78e15857a 100644
// Identical to `CopyFromSurface()`, except that this method issues the
// `viz::CopyOutputRequest` against the exact `viz::Surface` currently
// embedded by this View, while `CopyFromSurface()` may return a copy of any
@@ -229,6 +233,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -244,6 +248,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// Called when screen information or native widget bounds change.
virtual void UpdateScreenInfo();
@@ -112,7 +112,7 @@ index c93e93d13f101..cefd78e15857a 100644
// Called by the TextInputManager to notify the view about being removed from
// the list of registered views, i.e., TextInputManager is no longer tracking
// TextInputState from this view. The RWHV should reset |text_input_manager_|
@@ -355,6 +363,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -370,6 +378,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0;
@@ -125,7 +125,7 @@ index c93e93d13f101..cefd78e15857a 100644
// Indicates whether the page has finished loading.
virtual void SetIsLoading(bool is_loading) = 0;
@@ -623,6 +637,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -638,6 +652,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// to all displays.
gfx::Size system_cursor_size_;
@@ -136,7 +136,7 @@ index c93e93d13f101..cefd78e15857a 100644
private:
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
@@ -644,10 +662,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -659,10 +677,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
void SynchronizeVisualProperties();
@@ -196,7 +196,7 @@ index 41b34a27176a3..bdf5f9d4bb61e 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 1c6b2efc652ee..15003a27cd0db 100644
index 23eb991f4c777..404ab4e7c0aef 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -255,6 +255,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
@@ -246,10 +246,10 @@ index aeaf8e35f7eda..4b7cc3f03d3cf 100644
+ [MinVersion=1] kEnd = 7,
};
diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc
index 8ddea1c9ed5ee..7e92ecf2c5a5f 100644
index a83b9d91e9502..4e53d1ff1f4d9 100644
--- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc
@@ -1834,7 +1834,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1882,7 +1882,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
last_set_bounds_px_ = SanitizeBounds(bounds);
@@ -354,7 +354,7 @@ index 2150c344075c7..feb1abf159d51 100644
// Calculate initial bounds.
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 6ad16425f2fb3..f2e5c506e23f5 100644
index 18cd413e87801..4e22373f50fc2 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -24,6 +24,7 @@
@@ -365,7 +365,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/class_property.h"
#include "ui/base/cursor/cursor.h"
@@ -199,7 +200,10 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@@ -193,7 +194,10 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
native_widget_delegate_.get());
HWND parent_hwnd = nullptr;
@@ -377,7 +377,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
}
@@ -207,9 +211,18 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@@ -201,9 +205,18 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
z_order_ = params.EffectiveZOrderLevel();
@@ -398,17 +398,8 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
+
message_handler_->Init(parent_hwnd, pixel_bounds);
// If the Redirection Surface is removed, there needs to be a replacement
@@ -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) {
UpdateWUCBackdrop();
@@ -212,6 +225,13 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
InitHost();
window()->Show();
@@ -422,16 +413,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
// 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
// displayed on top of other windows.
@@ -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) {
@@ -1152,6 +1172,18 @@ void DesktopWindowTreeHostWin::HandleWindowMinimizedOrRestored(bool restored) {
if (restored) {
window()->Show();
@@ -450,7 +432,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
} else {
window()->Hide();
}
@@ -1228,11 +1260,17 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -1173,11 +1205,17 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -470,7 +452,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
}
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
@@ -1241,6 +1279,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
@@ -1186,6 +1224,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
return true;
}
@@ -483,7 +465,7 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
SendEventToSink(event);
return event->handled();
}
@@ -1426,9 +1470,17 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
@@ -1371,9 +1415,17 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
// positions in variable-DPI situations. See https://crbug.com/1224715 for
// details.
aura::Window* root = nullptr;
@@ -502,11 +484,20 @@ index 6ad16425f2fb3..f2e5c506e23f5 100644
AsWindowTreeHost()->SetBoundsInPixels(bounds_in_pixels);
}
@@ -1503,7 +1555,7 @@ void DesktopWindowTreeHostWin::UpdateWUCBackdrop() {
if (GetWidget() &&
((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());
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 dab595aacaeca..c10488756a657 100644
index 28cbd63261275..70b6b6f211807 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -348,6 +348,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -354,6 +354,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// A Windows.Ui.Composition visual tree that represents the window backdrop.
std::unique_ptr<gfx::WUCBackdrop> wuc_backdrop_;
@@ -534,7 +525,7 @@ index 16790a4b9d155..7d5f11cdb3a53 100644
break;
case ui::mojom::WindowShowState::kEnd:
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 5270118d8f8dc..98f974c10834a 100644
index 8a930340a16df..57ca3548db800 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -233,8 +233,8 @@ bool Widget::InitParams::ShouldInitAsHeadless() const {
@@ -548,7 +539,7 @@ index 5270118d8f8dc..98f974c10834a 100644
}
void Widget::InitParams::SetParent(gfx::NativeView parent_view) {
@@ -460,7 +460,8 @@ void Widget::Init(InitParams params) {
@@ -469,7 +469,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -558,7 +549,7 @@ index 5270118d8f8dc..98f974c10834a 100644
is_headless_ = params.ShouldInitAsHeadless();
is_autosized_ = params.autosize;
@@ -556,9 +557,14 @@ void Widget::Init(InitParams params) {
@@ -565,9 +566,14 @@ void Widget::Init(InitParams params) {
if (show_state == ui::mojom::WindowShowState::kMaximized) {
Maximize();
@@ -573,7 +564,7 @@ index 5270118d8f8dc..98f974c10834a 100644
}
#if BUILDFLAG(IS_CHROMEOS)
@@ -571,7 +577,12 @@ void Widget::Init(InitParams params) {
@@ -580,7 +586,12 @@ void Widget::Init(InitParams params) {
} else if (delegate) {
SetContentsView(delegate->TransferOwnershipOfContentsView());
if (should_set_initial_bounds) {
@@ -587,7 +578,7 @@ index 5270118d8f8dc..98f974c10834a 100644
}
}
@@ -1928,10 +1939,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
@@ -1937,10 +1948,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -604,7 +595,7 @@ index 5270118d8f8dc..98f974c10834a 100644
return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
}
@@ -2220,7 +2237,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
@@ -2229,7 +2246,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
View* v = widget_delegate_->GetInitiallyFocusedView();
if (!focus_on_creation_ ||
show_state == ui::mojom::WindowShowState::kInactive ||
@@ -615,7 +606,7 @@ index 5270118d8f8dc..98f974c10834a 100644
// focus when the window is restored.
if (v) {
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 65154f18c7ce7..67c626d78e5d3 100644
index dfe785f5d0a54..35bd7b086358b 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -437,6 +437,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -625,9 +616,9 @@ index 65154f18c7ce7..67c626d78e5d3 100644
+ gfx::AcceleratedWidget parent_widget = gfx::kNullAcceleratedWidget;
+
// Specifies the initial bounds of the Widget. Default is empty, which means
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
@@ -892,7 +894,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the NativeWidget may specify a default size. If the parent is specified
// and the widget type is not WINDOW_TYPE_POPUP, `bounds` is in the parent's
@@ -896,7 +898,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
void SetVisible(bool visible);
// Activates the widget, assuming it already exists and is visible.
@@ -637,7 +628,7 @@ index 65154f18c7ce7..67c626d78e5d3 100644
// Deactivates the widget, making the next window in the Z order the active
// window.
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 7c2463cb91d00..72c6a239ecc21 100644
index d2011a5c04973..947c0bd535c0f 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -24,6 +24,9 @@
@@ -650,7 +641,7 @@ index 7c2463cb91d00..72c6a239ecc21 100644
class DesktopMediaPickerDialogView;
class DigitalIdentityMultiStepDialogDelegate;
class DownloadBubbleContentsViewTest;
@@ -375,6 +378,8 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -378,6 +381,8 @@ class VIEWS_EXPORT WidgetDelegate {
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
friend class ::AutoPipSettingView;
@@ -659,7 +650,7 @@ index 7c2463cb91d00..72c6a239ecc21 100644
friend class ::DigitalIdentityMultiStepDialogDelegate;
friend class ::DownloadBubbleContentsViewTest;
friend class ::DownloadBubbleSecurityViewTest;
@@ -471,6 +476,9 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -473,6 +478,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()`.
@@ -669,7 +660,7 @@ index 7c2463cb91d00..72c6a239ecc21 100644
friend class ::DesktopMediaPickerDialogView;
friend class ::MediaGalleriesDialogViews;
friend class ::PresentationReceiverWindowView;
@@ -795,6 +803,10 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -797,6 +805,10 @@ class VIEWS_EXPORT WidgetDelegate {
// Returns true if the title text should be centered.
bool ShouldCenterWindowTitleText() const;
@@ -680,7 +671,7 @@ index 7c2463cb91d00..72c6a239ecc21 100644
bool focus_traverses_out() const { return params_.focus_traverses_out; }
bool enable_arrow_key_traversal() const {
return params_.enable_arrow_key_traversal;
@@ -917,7 +929,6 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
@@ -926,7 +938,6 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
const Widget* GetWidget() const override;
View* GetContentsView() override;
@@ -688,7 +679,7 @@ index 7c2463cb91d00..72c6a239ecc21 100644
// 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 {
@@ -993,6 +1004,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
WidgetDelegateView();
@@ -711,10 +702,10 @@ index fe68bce38527b..c5fcee907f34f 100644
if (native_widget_delegate->IsDialogBox()) {
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index ac502dee8a217..b074472db272f 100644
index cb66f6e84abd9..d7270039dd0cb 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -797,7 +797,11 @@ bool HWNDMessageHandler::IsVisible() const {
@@ -798,7 +798,11 @@ bool HWNDMessageHandler::IsVisible() const {
}
bool HWNDMessageHandler::IsActive() const {
@@ -727,7 +718,7 @@ index ac502dee8a217..b074472db272f 100644
}
bool HWNDMessageHandler::IsMinimized() const {
@@ -3275,10 +3279,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3268,10 +3272,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::EventType::kMousewheel) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index e522423645bf3..8e2ebe681241c 100644
index ccee45644b385..19012698e0f3f 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -274,6 +274,8 @@ viz_component("service") {
@@ -276,6 +276,8 @@ viz_component("service") {
"transitions/surface_animation_manager.h",
"transitions/transferable_resource_tracker.cc",
"transitions/transferable_resource_tracker.h",
@@ -150,10 +150,10 @@ index f0aca972c4a81..87b40c9ded9df 100644
TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this);
diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc
index 8e2ddfa9337b5..99f9da6929afb 100644
index 130067b91baa3..44b8e274ef3d4 100644
--- content/browser/compositor/viz_process_transport_factory.cc
+++ content/browser/compositor/viz_process_transport_factory.cc
@@ -389,8 +389,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -387,8 +387,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@@ -170,10 +170,10 @@ index 8e2ddfa9337b5..99f9da6929afb 100644
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h
index 9cabc57b4a561..54a1515c6f689 100644
index c608918dfbf9a..49012891abbf6 100644
--- mojo/public/cpp/bindings/sync_call_restrictions.h
+++ mojo/public/cpp/bindings/sync_call_restrictions.h
@@ -42,6 +42,7 @@ class Compositor;
@@ -41,6 +41,7 @@ class Compositor;
} // namespace ui
namespace viz {
@@ -181,7 +181,7 @@ index 9cabc57b4a561..54a1515c6f689 100644
class GpuHostImpl;
class HostFrameSinkManager;
class HostGpuMemoryBufferManager;
@@ -112,6 +113,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
@@ -111,6 +112,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
// SynchronousCompositorHost is used for Android webview.
friend class content::SynchronousCompositorHost;
friend class mojo::ScopedAllowSyncCallForTesting;
@@ -191,10 +191,10 @@ index 9cabc57b4a561..54a1515c6f689 100644
// For destroying the GL context/surface that draw to a platform window before
// the platform window is destroyed.
diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom
index afdda5292ce89..cd82387967c66 100644
index e063835e87f08..ec1de608884dc 100644
--- services/viz/privileged/mojom/compositing/display_private.mojom
+++ services/viz/privileged/mojom/compositing/display_private.mojom
@@ -117,13 +117,15 @@ interface DisplayPrivate {
@@ -113,13 +113,15 @@ interface DisplayPrivate {
// DisplayClient allows privileged clients to receive events from the Display.
interface DisplayClient {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index fe352434dd26e..72b68afb94d80 100644
index e57951543e9f2..a28de9c75366a 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3947,6 +3947,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -4103,6 +4103,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -15,7 +15,7 @@ index fe352434dd26e..72b68afb94d80 100644
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3957,6 +3963,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -4113,6 +4119,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -23,7 +23,7 @@ index fe352434dd26e..72b68afb94d80 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -4167,6 +4174,9 @@ void WebContentsImpl::RenderWidgetCreated(
@@ -4325,6 +4332,9 @@ void WebContentsImpl::RenderWidgetCreated(
"render_widget_host", render_widget_host);
CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId()));
created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host;
@@ -33,7 +33,7 @@ index fe352434dd26e..72b68afb94d80 100644
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -5086,6 +5096,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5274,6 +5284,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options);
}
@@ -49,7 +49,7 @@ index fe352434dd26e..72b68afb94d80 100644
// Check whether there is an available prerendered page for this navigation if
// this is not for guest. If it exists, take WebContents pre-created for
// hosting the prerendered page instead of creating new WebContents.
@@ -9913,6 +9932,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -10092,6 +10111,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
}
CloseListenerManager::DidChangeFocusedFrame(this);
@@ -59,7 +59,7 @@ index fe352434dd26e..72b68afb94d80 100644
}
FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() {
@@ -10561,6 +10583,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
@@ -10742,6 +10764,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::Resize");
#if defined(USE_AURA)
aura::Window* window = GetNativeView();
@@ -71,7 +71,7 @@ index fe352434dd26e..72b68afb94d80 100644
window->SetBounds(gfx::Rect(window->bounds().origin(), new_bounds.size()));
#elif BUILDFLAG(IS_ANDROID)
content::RenderWidgetHostView* view = GetRenderWidgetHostView();
@@ -10573,6 +10600,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
@@ -10754,6 +10781,11 @@ void WebContentsImpl::Resize(const gfx::Rect& new_bounds) {
gfx::Size WebContentsImpl::GetSize() {
#if defined(USE_AURA)
aura::Window* window = GetNativeView();
@@ -120,10 +120,10 @@ index f1105a13aa0eb..d1dba26bbac1f 100644
return gfx::Size(NSWidth(frame), NSHeight(frame));
}
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 437060750090e..337acf70169b1 100644
index ab2df2fac2358..b1e45af82d261 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -121,10 +121,12 @@ class BrowserPluginGuestDelegate;
@@ -121,11 +121,13 @@ class BrowserPluginGuestDelegate;
class GuestPageHolder;
class RenderFrameHost;
class RenderViewHost;
@@ -131,12 +131,13 @@ index 437060750090e..337acf70169b1 100644
class RenderWidgetHostView;
class ScreenOrientationDelegate;
class SiteInstance;
class UnownedInnerWebContentsClient;
class WebContentsDelegate;
+class WebContentsView;
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -270,6 +272,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
@@ -279,6 +281,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
@@ -148,7 +149,7 @@ index 437060750090e..337acf70169b1 100644
// the value that'll be returned by GetLastActiveTimeTicks(). If this is
// left default initialized then the value is not passed on to the
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index da319cb207331..bcd4de085fa6b 100644
index d33274984bf65..47e79413dab7f 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -101,9 +101,11 @@ class EyeDropperListener;
@@ -163,7 +164,7 @@ index da319cb207331..bcd4de085fa6b 100644
struct ContextMenuParams;
struct DropData;
struct MediaPlayerWatchTime;
@@ -376,6 +378,14 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -380,6 +382,14 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@@ -179,7 +180,7 @@ index da319cb207331..bcd4de085fa6b 100644
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index 4f97e13f9125e..1946f9909803b 100644
index 7e0dd469a7059..25c2b9e2c54ff 100644
--- 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 {
@@ -192,7 +193,7 @@ index 4f97e13f9125e..1946f9909803b 100644
// This method is invoked when the `blink::WebView` of the current
// RenderViewHost is ready, e.g. because we recreated it after a crash.
virtual void RenderViewReady() {}
@@ -952,6 +955,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -958,6 +961,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index fa4beef133fd9..bc19a7b8bcc84 100644
index 54e25fb12f680..d3bcea5b348ea 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -837,6 +837,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -836,6 +836,11 @@ class BLINK_PLATFORM_EXPORT Platform {
}
#endif

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index b1689844282d6..a4288bf5d3ba2 100644
index 7c1eb9baabfb9..30761c0906087 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -344,6 +344,7 @@ class BLINK_EXPORT WebView {
@@ -343,6 +343,7 @@ class BLINK_EXPORT WebView {
// Sets whether select popup menus should be rendered by the browser.
static void SetUseExternalPopupMenus(bool);
@@ -10,7 +10,7 @@ index b1689844282d6..a4288bf5d3ba2 100644
// Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0;
@@ -486,6 +487,11 @@ class BLINK_EXPORT WebView {
@@ -485,6 +486,11 @@ class BLINK_EXPORT WebView {
virtual void SetPageAttributionSupport(
network::mojom::AttributionSupport support) = 0;
@@ -23,10 +23,10 @@ index b1689844282d6..a4288bf5d3ba2 100644
~WebView() = default;
};
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 1af1fa035b3da..f92d9b70fbd32 100644
index feba9635b4066..c512154ada654 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -257,8 +257,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -258,8 +258,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@@ -42,7 +42,7 @@ index 1af1fa035b3da..f92d9b70fbd32 100644
}
namespace {
@@ -615,6 +620,7 @@ WebViewImpl::WebViewImpl(
@@ -616,6 +621,7 @@ WebViewImpl::WebViewImpl(
blink::ZoomFactorToZoomLevel(kMinimumBrowserZoomFactor)),
maximum_zoom_level_(
blink::ZoomFactorToZoomLevel(kMaximumBrowserZoomFactor)),
@@ -51,10 +51,10 @@ index 1af1fa035b3da..f92d9b70fbd32 100644
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
page_base_background_color_(
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index 06f7cf79b4526..e0d395867f552 100644
index eaa593b41ec2e..25328ea602056 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -140,7 +140,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -139,7 +139,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@@ -97,7 +97,7 @@ index 06f7cf79b4526..e0d395867f552 100644
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
index de39a688207f8..41e5ffcfd5e09 100644
index 23e8b0820df25..bcccbe2d61b96 100644
--- third_party/blink/renderer/core/frame/local_dom_window.cc
+++ third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -52,6 +52,7 @@
@@ -116,7 +116,7 @@ index de39a688207f8..41e5ffcfd5e09 100644
#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/forms/form_controller.h"
@@ -1922,8 +1924,9 @@ void LocalDOMWindow::moveBy(int x, int y) const {
@@ -1960,8 +1962,9 @@ void LocalDOMWindow::moveBy(int x, int y) const {
return;
}
@@ -127,7 +127,7 @@ index de39a688207f8..41e5ffcfd5e09 100644
LocalFrame* frame = GetFrame();
Page* page = frame->GetPage();
@@ -1943,8 +1946,9 @@ void LocalDOMWindow::moveTo(int x, int y) const {
@@ -1981,8 +1984,9 @@ void LocalDOMWindow::moveTo(int x, int y) const {
return;
}
@@ -138,7 +138,7 @@ index de39a688207f8..41e5ffcfd5e09 100644
LocalFrame* frame = GetFrame();
Page* page = frame->GetPage();
@@ -1967,7 +1971,8 @@ void LocalDOMWindow::resizeBy(int x,
@@ -2005,7 +2009,8 @@ void LocalDOMWindow::resizeBy(int x,
}
if (IsPictureInPictureWindow()) {
@@ -148,7 +148,7 @@ index de39a688207f8..41e5ffcfd5e09 100644
exception_state.ThrowDOMException(
DOMExceptionCode::kNotAllowedError,
"resizeBy() requires user activation in document picture-in-picture");
@@ -1995,7 +2000,8 @@ void LocalDOMWindow::resizeTo(int width,
@@ -2033,7 +2038,8 @@ void LocalDOMWindow::resizeTo(int width,
}
if (IsPictureInPictureWindow()) {
@@ -158,7 +158,7 @@ index de39a688207f8..41e5ffcfd5e09 100644
exception_state.ThrowDOMException(
DOMExceptionCode::kNotAllowedError,
"resizeTo() requires user activation in document picture-in-picture");
@@ -2464,6 +2470,12 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow(
@@ -2502,6 +2508,12 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow(
To<LocalDOMWindow>(result.frame->DomWindow());
pip_dom_window->SetIsPictureInPictureWindow();
@@ -172,10 +172,10 @@ index de39a688207f8..41e5ffcfd5e09 100644
pip_dom_window->document()->SetCompatibilityMode(
entered_window->document()->GetCompatibilityMode());
diff --git third_party/blink/renderer/core/frame/local_dom_window.h third_party/blink/renderer/core/frame/local_dom_window.h
index 615d1851fa041..a97811623a2e2 100644
index 6856371c0729b..c851a94235306 100644
--- third_party/blink/renderer/core/frame/local_dom_window.h
+++ third_party/blink/renderer/core/frame/local_dom_window.h
@@ -566,6 +566,11 @@ class CORE_EXPORT LocalDOMWindow final : public DOMWindow,
@@ -582,6 +582,11 @@ class CORE_EXPORT LocalDOMWindow final : public DOMWindow,
void SetIsPictureInPictureWindow();
@@ -187,7 +187,7 @@ index 615d1851fa041..a97811623a2e2 100644
// Return the viewport size including scrollbars.
gfx::Size GetViewportSize() const;
@@ -668,6 +673,8 @@ class CORE_EXPORT LocalDOMWindow final : public DOMWindow,
@@ -686,6 +691,8 @@ class CORE_EXPORT LocalDOMWindow final : public DOMWindow,
// https://wicg.github.io/document-picture-in-picture/
bool is_picture_in_picture_window_ = false;
@@ -197,7 +197,7 @@ index 615d1851fa041..a97811623a2e2 100644
// like bfcache navigation or soft navigation. It changes when navigations
// of these types occur.
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index e3888bb31414a..78dfff2048a67 100644
index 72629f0c1af11..6100502a214ac 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -1002,7 +1002,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,

View File

@@ -399,6 +399,11 @@
"LEGACY_COOKIE_SCOPE",
"ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER",
"CONTROLLED_FRAME",
"REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS",
"LOCAL_NETWORK_ACCESS",
"ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED",
"INITIALIZED_TRANSLATIONS",
"SUSPICIOUS_NOTIFICATION_IDS",
];
function getSettingType(index) {

View File

@@ -3,7 +3,6 @@
// can be found in the LICENSE file.
#include "include/cef_parser.h"
#include "include/test/cef_test_helpers.h"
#include "tests/gtest/include/gtest/gtest.h"
// Create the URL using the spec.
@@ -480,12 +479,7 @@ TEST(ParserTest, ParseJSONAndReturnErrorInvalid) {
CefString error_msg;
CefRefPtr<CefValue> value =
CefParseJSONAndReturnError(data, JSON_PARSER_RFC, error_msg);
CefString expect_error_msg;
if (CefIsFeatureEnabledForTests("UseRustJsonParser")) {
expect_error_msg = "expected value at line 1 column 1";
} else {
expect_error_msg = "Line: 1, column: 1, Unexpected token.";
}
CefString expect_error_msg = "expected value at line 1 column 1";
EXPECT_FALSE(value.get());
EXPECT_EQ(expect_error_msg, error_msg);
}
@@ -495,12 +489,7 @@ TEST(ParserTest, ParseJSONAndReturnErrorTrailingComma) {
CefString error_msg;
CefRefPtr<CefValue> value =
CefParseJSONAndReturnError(data, JSON_PARSER_RFC, error_msg);
CefString expect_error_msg;
if (CefIsFeatureEnabledForTests("UseRustJsonParser")) {
expect_error_msg = "trailing comma at line 1 column 13";
} else {
expect_error_msg = "Line: 1, column: 13, Trailing comma not allowed.";
}
CefString expect_error_msg = "trailing comma at line 1 column 13";
EXPECT_FALSE(value.get());
EXPECT_EQ(expect_error_msg, error_msg);
}

View File

@@ -439,7 +439,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate,
CefRefPtr<CefV8Value> value = CefV8Value::CreateDouble(12.1223);
EXPECT_TRUE(value.get());
EXPECT_TRUE(value->IsDouble());
EXPECT_EQ(12.1223, value->GetDoubleValue());
EXPECT_DOUBLE_EQ(12.1223, value->GetDoubleValue());
EXPECT_FALSE(value->IsUndefined());
EXPECT_FALSE(value->IsArray());