Update to Chromium version 116.0.5845.0 (#1160321)

This commit is contained in:
Marshall Greenblatt 2023-06-26 13:13:38 +03:00
parent 71c588c16a
commit 650755a092
72 changed files with 525 additions and 547 deletions

View File

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

View File

@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "9c9fbc9d59a544c8e0c2f0cbed4b6622f2786f1c"
#define CEF_API_HASH_UNIVERSAL "515045085896c9e45c1aaf734ee201efad822f6a"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "240e06747f2ea2d7d4a3071042d45cf80d170420"
#define CEF_API_HASH_PLATFORM "1091d9b7f17abbbf86cbbf50db7106a2bad98ab5"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "cd4a815153a919ad30b95c659688b564823d92fc"
#define CEF_API_HASH_PLATFORM "bfb5a9cb4551e80a0606531399e3244eac457a33"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "4c372cb13e3446b2a54aaaea51b0d47ba7766152"
#define CEF_API_HASH_PLATFORM "1ef1d39d8c95b1d6c93fa60a29e158a96f76ab9d"
#endif
#ifdef __cplusplus

View File

@ -3287,7 +3287,8 @@ typedef enum {
CEF_CPAIT_ZOOM,
CEF_CPAIT_SAVE_IBAN,
CEF_CPAIT_MANDATORY_REAUTH,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_MANDATORY_REAUTH,
CEF_CPAIT_PRICE_INSIGHTS,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_INSIGHTS,
} cef_chrome_page_action_icon_type_t;
///
@ -3417,16 +3418,17 @@ typedef enum {
CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8,
CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9,
CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 11,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 12,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 13,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 14,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 15,
CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 16,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17,
CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 18,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 19,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 20,
CEF_PERMISSION_TYPE_MIDI = 1 << 11,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 12,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 13,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 14,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 15,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 16,
CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 17,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 18,
CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 19,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 20,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 21,
} cef_permission_request_types_t;
///

View File

@ -233,8 +233,6 @@ void AlloyBrowserMainParts::PostCreateMainMessageLoop() {
config->store = command_line->GetSwitchValueASCII(switches::kPasswordStore);
// Forward the product name (defaults to "Chromium").
config->product_name = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
// OSCrypt may target keyring, which requires calls from the main thread.
config->main_thread_runner = content::GetUIThreadTaskRunner({});
// OSCrypt can be disabled in a special settings file.
config->should_use_preference =
command_line->HasSwitch(switches::kEnableEncryptionSelection);

View File

@ -322,6 +322,25 @@ const extensions::Extension* GetEnabledExtensionFromSiteURL(
return registry->enabled_extensions().GetByID(site_url.host());
}
std::unique_ptr<blink::URLLoaderThrottle> CreateGoogleURLLoaderThrottle(
Profile* profile) {
chrome::mojom::DynamicParamsPtr dynamic_params =
chrome::mojom::DynamicParams::New(
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
/*bound_session_params=*/nullptr,
#endif
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps));
return std::make_unique<GoogleURLLoaderThrottle>(
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
/*bound_session_request_throttled_listener=*/nullptr,
#endif
std::move(dynamic_params));
}
} // namespace
AlloyContentBrowserClient::AlloyContentBrowserClient() = default;
@ -894,21 +913,28 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
Profile* profile = Profile::FromBrowserContext(browser_context);
chrome::mojom::DynamicParamsPtr dynamic_params =
chrome::mojom::DynamicParams::New(
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
/*bound_session_params=*/nullptr,
#endif
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps));
result.push_back(std::make_unique<GoogleURLLoaderThrottle>(
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
/*bound_session_request_throttled_listener=*/nullptr,
#endif
std::move(dynamic_params)));
if (auto google_throttle = CreateGoogleURLLoaderThrottle(profile)) {
result.push_back(std::move(google_throttle));
}
return result;
}
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
AlloyContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive(
const network::ResourceRequest& request,
content::BrowserContext* browser_context,
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
int frame_tree_node_id) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> result;
Profile* profile = Profile::FromBrowserContext(browser_context);
if (auto google_throttle = CreateGoogleURLLoaderThrottle(profile)) {
result.push_back(std::move(google_throttle));
}
return result;
}
@ -916,7 +942,9 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
AlloyContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
content::NavigationUIData* navigation_ui_data,
int frame_tree_node_id) {
int frame_tree_node_id,
int64_t navigation_id,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
interceptors;
@ -1091,7 +1119,8 @@ bool AlloyContentBrowserClient::WillCreateURLLoaderFactory(
header_client,
bool* bypass_redirect_checks,
bool* disable_secure_dns,
network::mojom::URLLoaderFactoryOverridePtr* factory_override) {
network::mojom::URLLoaderFactoryOverridePtr* factory_override,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
auto request_handler = net_service::CreateInterceptedRequestHandler(
browser_context, frame, render_process_id,
type == URLLoaderFactoryType::kNavigation,
@ -1285,14 +1314,6 @@ std::string AlloyContentBrowserClient::GetUserAgent() {
return embedder_support::GetUserAgent();
}
std::string AlloyContentBrowserClient::GetFullUserAgent() {
return embedder_support::GetFullUserAgent();
}
std::string AlloyContentBrowserClient::GetReducedUserAgent() {
return embedder_support::GetReducedUserAgent();
}
std::unique_ptr<content::WebContentsViewDelegate>
AlloyContentBrowserClient::GetWebContentsViewDelegate(
content::WebContents* web_contents) {

View File

@ -129,10 +129,19 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
content::NavigationUIData* navigation_ui_data,
int frame_tree_node_id) override;
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
CreateURLLoaderThrottlesForKeepAlive(
const network::ResourceRequest& request,
content::BrowserContext* browser_context,
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
int frame_tree_node_id) override;
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
WillCreateURLLoaderRequestInterceptors(
content::NavigationUIData* navigation_ui_data,
int frame_tree_node_id) override;
int frame_tree_node_id,
int64_t navigation_id,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
override;
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
void GetAdditionalMappedFilesForChildProcess(
@ -178,7 +187,9 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
header_client,
bool* bypass_redirect_checks,
bool* disable_secure_dns,
network::mojom::URLLoaderFactoryOverridePtr* factory_override) override;
network::mojom::URLLoaderFactoryOverridePtr* factory_override,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
bool ConfigureNetworkContextParams(
@ -230,8 +241,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
std::string GetProduct() override;
std::string GetChromeProduct() override;
std::string GetUserAgent() override;
std::string GetFullUserAgent() override;
std::string GetReducedUserAgent() override;
std::unique_ptr<content::WebContentsViewDelegate> GetWebContentsViewDelegate(
content::WebContents* web_contents) override;
blink::UserAgentMetadata GetUserAgentMetadata() override;

View File

@ -34,7 +34,6 @@
#include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_switches.h"
#include "net/log/net_log_capture_mode.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
@ -146,11 +145,6 @@ void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
DCHECK(false);
}
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
DCHECK(false);
return nullptr;
}
metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
DCHECK(false);
@ -235,11 +229,6 @@ ChromeBrowserProcessAlloy::notification_platform_bridge() {
return nullptr;
}
void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
DCHECK(false);
}
policy::ChromeBrowserPolicyConnector*
ChromeBrowserProcessAlloy::browser_policy_connector() {
if (!browser_policy_connector_) {
@ -428,12 +417,6 @@ ChromeBrowserProcessAlloy::serial_policy_allowed_ports() {
return nullptr;
}
HidPolicyAllowedDevices*
ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
DCHECK(false);
return nullptr;
}
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
DCHECK(false);
return nullptr;

View File

@ -51,7 +51,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
// BrowserProcess implementation.
void EndSession() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
device::GeolocationManager* geolocation_manager() override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
metrics::MetricsService* metrics_service() override;
@ -68,8 +67,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
extensions::EventRouterForwarder* extension_event_router_forwarder() override;
NotificationUIManager* notification_ui_manager() override;
NotificationPlatformBridge* notification_platform_bridge() override;
void SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
policy::PolicyService* policy_service() override;
IconManager* icon_manager() override;
@ -111,7 +108,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
override;
BuildState* GetBuildState() override;
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
HidPolicyAllowedDevices* hid_policy_allowed_devices() override;
HidSystemTrayIcon* hid_system_tray_icon() override;
private:

View File

@ -115,7 +115,7 @@ std::unique_ptr<base::MessagePump> MessagePumpFactoryForUI() {
}
#if BUILDFLAG(IS_MAC)
return base::MessagePumpMac::Create();
return base::message_pump_mac::Create();
#else
return std::make_unique<base::MessagePumpForUI>();
#endif

View File

@ -241,7 +241,8 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
header_client,
bool* bypass_redirect_checks,
bool* disable_secure_dns,
network::mojom::URLLoaderFactoryOverridePtr* factory_override) {
network::mojom::URLLoaderFactoryOverridePtr* factory_override,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
// Don't intercept requests for Profiles that were not created by CEF.
// For example, the User Manager profile created via
// profiles::CreateSystemProfileForUserManager.
@ -250,7 +251,8 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
return ChromeContentBrowserClient::WillCreateURLLoaderFactory(
browser_context, frame, render_process_id, type, request_initiator,
navigation_id, ukm_source_id, factory_receiver, header_client,
bypass_redirect_checks, disable_secure_dns, factory_override);
bypass_redirect_checks, disable_secure_dns, factory_override,
navigation_response_task_runner);
}
// Based on content/browser/devtools/devtools_instrumentation.cc
@ -281,7 +283,7 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
navigation_id, ukm_source_id,
&(intercepting_factory->overridden_factory_receiver),
/*header_client=*/nullptr, bypass_redirect_checks, disable_secure_dns,
handler_override);
handler_override, navigation_response_task_runner);
if (use_proxy) {
DCHECK(intercepting_factory->overriding_factory);

View File

@ -68,7 +68,9 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
header_client,
bool* bypass_redirect_checks,
bool* disable_secure_dns,
network::mojom::URLLoaderFactoryOverridePtr* factory_override) override;
network::mojom::URLLoaderFactoryOverridePtr* factory_override,
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
override;
bool HandleExternalProtocol(
const GURL& url,
content::WebContents::Getter web_contents_getter,

View File

@ -19,7 +19,6 @@
#include "base/base64.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/guid.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/json/string_escape.h"
@ -28,6 +27,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@ -341,8 +341,9 @@ void CefDevToolsFrontend::ReadyToCommitNavigation(
if (it == extensions_api_.end()) {
return;
}
std::string script = base::StringPrintf("%s(\"%s\")", it->second.c_str(),
base::GenerateGUID().c_str());
std::string script = base::StringPrintf(
"%s(\"%s\")", it->second.c_str(),
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str());
content::DevToolsFrontendHost::SetupExtensionsAPI(frame, script);
}

View File

@ -8,7 +8,6 @@
#include "libcef/browser/browser_host_base.h"
#include "libcef/browser/extensions/browser_extensions_util.h"
#include "base/memory/singleton.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "ui/shell_dialogs/select_file_dialog_factory.h"
@ -26,27 +25,17 @@ namespace {
// |run_from_cef=false| to trigger creation of the default platform dialog.
class CefSelectFileDialogFactory final : public ui::SelectFileDialogFactory {
public:
CefSelectFileDialogFactory() = default;
CefSelectFileDialogFactory(const CefSelectFileDialogFactory&) = delete;
CefSelectFileDialogFactory& operator=(const CefSelectFileDialogFactory&) =
delete;
static CefSelectFileDialogFactory* GetInstance() {
// Leaky because there is no useful cleanup to do.
return base::Singleton<
CefSelectFileDialogFactory,
base::LeakySingletonTraits<CefSelectFileDialogFactory>>::get();
}
ui::SelectFileDialog* Create(
ui::SelectFileDialog::Listener* listener,
std::unique_ptr<ui::SelectFilePolicy> policy) override;
bool IsCefFactory() const override { return true; }
private:
friend struct base::DefaultSingletonTraits<CefSelectFileDialogFactory>;
CefSelectFileDialogFactory() { ui::SelectFileDialog::SetFactory(this); }
};
// Delegates the running of the dialog to CefFileDialogManager.
@ -158,8 +147,8 @@ ui::SelectFileDialog* CefSelectFileDialogFactory::Create(
namespace file_dialog_runner {
void RegisterFactory() {
// Implicitly registers on creation.
CefSelectFileDialogFactory::GetInstance();
ui::SelectFileDialog::SetFactory(
std::make_unique<CefSelectFileDialogFactory>());
}
} // namespace file_dialog_runner

View File

@ -14,6 +14,7 @@
#include "libcef/browser/native/menu_runner_mac.h"
#include "libcef/browser/thread_util.h"
#include "base/apple/owned_objc.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_restrictions.h"
@ -456,15 +457,16 @@ void CefBrowserPlatformDelegateNativeMac::ViewText(const std::string& text) {
bool CefBrowserPlatformDelegateNativeMac::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
// Give the top level menu equivalents a chance to handle the event.
if ([event.os_event type] == NSEventTypeKeyDown) {
return [[NSApp mainMenu] performKeyEquivalent:event.os_event];
NSEvent* ns_event = event.os_event.Get();
if (ns_event.type == NSEventTypeKeyDown) {
return [[NSApp mainMenu] performKeyEquivalent:ns_event];
}
return false;
}
CefEventHandle CefBrowserPlatformDelegateNativeMac::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
return CAST_NSEVENT_TO_CEF_EVENT_HANDLE(event.os_event);
return CAST_NSEVENT_TO_CEF_EVENT_HANDLE(event.os_event.Get());
}
std::unique_ptr<CefJavaScriptDialogRunner>
@ -529,7 +531,8 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
isARepeat:NO
keyCode:key_event.native_key_code];
result = content::NativeWebKeyboardEvent(synthetic_event);
result = content::NativeWebKeyboardEvent(
base::apple::OwnedNSEvent(synthetic_event));
if (key_event.type == KEYEVENT_CHAR) {
result.SetType(blink::WebInputEvent::Type::kChar);
}

View File

@ -70,7 +70,8 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
url::Origin(), absl::nullopt /* navigation_id */, ukm::SourceIdObj(),
&maybe_proxy_factory_receiver, nullptr /* header_client */,
nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
nullptr /* factory_override */);
nullptr /* factory_override */,
nullptr /* navigation_response_task_runner */);
// If anyone above indicated that they care about proxying, pass the
// intermediate pipe along to the URLLoaderFactoryGetter.
@ -133,4 +134,4 @@ void URLLoaderFactoryGetter::DeleteOnCorrectThread() const {
delete this;
}
} // namespace net_service
} // namespace net_service

View File

@ -77,7 +77,7 @@ void CefLayeredWindowUpdaterOSR::OnAllocatedSharedMemory(
// Make sure |pixel_size| is sane.
size_t expected_bytes;
bool size_result = viz::ResourceSizes::MaybeSizeInBytes(
pixel_size, viz::ResourceFormat::RGBA_8888, &expected_bytes);
pixel_size, viz::SinglePlaneFormat::kRGBA_8888, &expected_bytes);
if (!size_result) {
return;
}

View File

@ -62,8 +62,9 @@ void SoftwareOutputDeviceProxy::Resize(const gfx::Size& viewport_pixel_size,
canvas_.reset();
size_t required_bytes;
if (!ResourceSizes::MaybeSizeInBytes(
viewport_pixel_size_, ResourceFormat::RGBA_8888, &required_bytes)) {
if (!ResourceSizes::MaybeSizeInBytes(viewport_pixel_size_,
SinglePlaneFormat::kRGBA_8888,
&required_bytes)) {
DLOG(ERROR) << "Invalid viewport size " << viewport_pixel_size_.ToString();
return;
}

View File

@ -199,6 +199,8 @@ cef_permission_request_types_t GetCefRequestType(
return CEF_PERMISSION_TYPE_IDLE_DETECTION;
case permissions::RequestType::kMicStream:
return CEF_PERMISSION_TYPE_MIC_STREAM;
case permissions::RequestType::kMidi:
return CEF_PERMISSION_TYPE_MIDI;
case permissions::RequestType::kMidiSysex:
return CEF_PERMISSION_TYPE_MIDI_SYSEX;
case permissions::RequestType::kMultipleDownloads:

View File

@ -41,6 +41,7 @@
#include "media/media_buildflags.h"
#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "ui/color/color_provider_manager.h"
#include "ui/native_theme/native_theme.h"
namespace renderer_prefs {
@ -206,6 +207,7 @@ blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme(
// |native_theme| - For other platforms based on native theme scheme.
bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs,
const GURL& url,
content::WebContents* web_contents,
const ui::NativeTheme* native_theme) {
auto old_preferred_color_scheme = web_prefs->preferred_color_scheme;
@ -213,19 +215,14 @@ bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs,
web_prefs->preferred_color_scheme =
ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme());
// Force a light preferred color scheme on certain URLs if kWebUIDarkMode is
// disabled; some of the UI is not yet correctly themed.
if (!base::FeatureList::IsEnabled(features::kWebUIDarkMode)) {
// Update based on last committed url.
bool force_light = url.SchemeIs(content::kChromeUIScheme);
if (!force_light) {
force_light = url.SchemeIs(extensions::kExtensionScheme) &&
url.host_piece() == extension_misc::kPdfExtensionId;
}
if (force_light) {
web_prefs->preferred_color_scheme =
blink::mojom::PreferredColorScheme::kLight;
}
if (url.SchemeIs(content::kChromeUIScheme)) {
// WebUI should track the color mode of the ColorProvider associated with
// |web_contents|.
web_prefs->preferred_color_scheme =
web_contents->GetColorMode() ==
ui::ColorProviderManager::ColorMode::kLight
? blink::mojom::PreferredColorScheme::kLight
: blink::mojom::PreferredColorScheme::kDark;
}
return old_preferred_color_scheme != web_prefs->preferred_color_scheme;
@ -419,7 +416,7 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
UpdatePreferredColorScheme(
&web,
web_contents->GetPrimaryMainFrame()->GetSiteInstance()->GetSiteURL(),
native_theme);
web_contents, native_theme);
// Set preferences based on the extension.
SetExtensionPrefs(web_contents, rvh, web);
@ -445,7 +442,7 @@ bool PopulateWebPreferencesAfterNavigation(
blink::web_pref::WebPreferences& web) {
auto* native_theme = ui::NativeTheme::GetInstanceForWeb();
return UpdatePreferredColorScheme(&web, web_contents->GetLastCommittedURL(),
native_theme);
web_contents, native_theme);
}
} // namespace renderer_prefs

View File

@ -133,3 +133,13 @@ bool CefSSLHostStateDelegate::HasAllowException(
return policy_iterator != cert_policy_for_host_.end() &&
policy_iterator->second.HasAllowException();
}
bool CefSSLHostStateDelegate::HasAllowExceptionForAnyHost(
content::StoragePartition* storage_partition) {
for (auto const& it : cert_policy_for_host_) {
if (it.second.HasAllowException()) {
return true;
}
}
return false;
}

View File

@ -83,6 +83,8 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
void RevokeUserAllowExceptions(const std::string& host) override;
bool HasAllowException(const std::string& host,
content::StoragePartition* storage_partition) override;
bool HasAllowExceptionForAnyHost(
content::StoragePartition* storage_partition) override;
private:
// Certificate policies for each host.

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 4925a756be531..dbd2464d4cf9b 100644
index 304223b58a706..67eb34f1f2ebb 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -40,6 +40,7 @@ import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index 4925a756be531..dbd2464d4cf9b 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
@@ -1529,7 +1530,11 @@ component("base") {
@@ -1588,7 +1589,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@ -23,7 +23,7 @@ index 4925a756be531..dbd2464d4cf9b 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1928,6 +1933,12 @@ component("base") {
@@ -1994,6 +1999,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}

View File

@ -33,7 +33,7 @@ index 641bbaf2c7576..afdd641e38452 100644
// Generic container overload.
template <typename Range>
diff --git base/win/registry.cc base/win/registry.cc
index 473f5fdc861ce..eb85a31611560 100644
index 4b3c3d75a2bb4..2869b29a410b9 100644
--- base/win/registry.cc
+++ base/win/registry.cc
@@ -13,6 +13,14 @@

View File

@ -1,20 +1,20 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index a0df3473186a6..02c859e2eca78 100644
index 93d9c1e810bfb..5a3fdee5eb0dc 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -177,11 +177,6 @@ static_library("test_support") {
if (!is_chromeos) {
# TODO(rasikan): Add to ios and chromeos when unblocked by the chromiumos
# change to add the shared lib to the chrome-binary-tests directory.
- public_deps += [ ":test_trace_processor" ]
- sources += [
- "test_trace_processor.cc",
- "test_trace_processor.h",
- ]
if (is_ios) {
deps += [
":test_trace_processor+bundle",
@@ -496,7 +491,7 @@ if (enable_base_tracing) {
if (enable_base_tracing) {
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
- public_deps += [ ":test_trace_processor" ]
- sources += [
- "test_trace_processor.cc",
- "test_trace_processor.h",
- ]
if (is_ios) {
deps += [
":test_trace_processor+bundle",
@@ -527,7 +522,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 a0df3473186a6..02c859e2eca78 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -505,6 +500,8 @@ if (enable_base_tracing) {
@@ -536,6 +531,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@ -32,7 +32,7 @@ index a0df3473186a6..02c859e2eca78 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -522,33 +519,6 @@ if (enable_base_tracing) {
@@ -553,33 +550,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ]
}
@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index 1e96da71a8437..2e1b48a4aa9c9 100644
index 5d381713fe246..69da944902eb8 100644
--- content/shell/BUILD.gn
+++ content/shell/BUILD.gn
@@ -831,7 +831,6 @@ if (is_mac) {
@@ -833,7 +833,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" ]
@ -99,19 +99,3 @@ index 1e96da71a8437..2e1b48a4aa9c9 100644
} else {
# Both the main :content_shell and :content_shell_helper_app executables
# need to link the framework. Because they are at different directory
diff --git gpu/BUILD.gn gpu/BUILD.gn
index 5496a01184497..84a2fe181089f 100644
--- gpu/BUILD.gn
+++ gpu/BUILD.gn
@@ -735,10 +735,7 @@ test("gpu_unittests") {
"//url",
]
- # Cronet disables tracing (crbug.com/1400235).
- # TODO(rasikan): Remove when unblocked by chromiumos change to add shared lib
- # to add the shared lib to the chrome-binary-tests directory.
- if (enable_base_tracing && !is_cronet_build && is_chromeos) {
+ if (enable_base_tracing) {
deps += [ "//base/test:test_trace_processor" ]
sources += [
"//base/test/test_trace_processor.cc",

View File

@ -1,8 +1,8 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 69f9daf8388e9..6f1bc7c9ab40b 100644
index 0e9aa441e3298..d22508fe1965f 100644
--- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc
@@ -201,7 +201,7 @@ BrowserTaskExecutor::OnUserInputStart() {
@@ -208,7 +208,7 @@ BrowserTaskExecutor::OnUserInputStart() {
// static
void BrowserTaskExecutor::Shutdown() {

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 38f318f9c0b45..0c8c86efedd07 100644
index 2bfca65cd8d13..0a5b7a68fca46 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1815,6 +1815,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
@@ -1860,6 +1860,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
@ -20,10 +20,10 @@ index 38f318f9c0b45..0c8c86efedd07 100644
// Make an exception to allow most visited tiles to commit in
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index ad258abf7e17f..4d94f7144f5ce 100644
index 948ee821dfea0..d63fd2bb9508b 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -7446,10 +7446,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -7281,10 +7281,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
@ -47,7 +47,7 @@ index ad258abf7e17f..4d94f7144f5ce 100644
}
return origin_and_debug_info;
@@ -7479,6 +7491,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -7314,6 +7326,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
SandboxFlagsToCommit());

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 23a8da453c3d2..66ad9b2ab0ed6 100644
index d751ddbb3fd58..87941c9f50dac 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -2015,8 +2015,6 @@ config("thin_archive") {
@@ -2051,8 +2051,6 @@ config("thin_archive") {
# confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 77d5dfbe1d547..29d9252d29739 100644
index c7ff5942d379b..c6d138ad64f95 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@ -10,7 +10,7 @@ index 77d5dfbe1d547..29d9252d29739 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1957,6 +1958,7 @@ static_library("browser") {
@@ -1965,6 +1966,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@ -18,7 +18,7 @@ index 77d5dfbe1d547..29d9252d29739 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2547,6 +2549,10 @@ static_library("browser") {
@@ -2556,6 +2558,10 @@ static_library("browser") {
]
}

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index 6dc8016311847..851f866e388f5 100644
index 9c5260579cf05..021b4bc3c5499 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -214,9 +214,9 @@ class BrowserProcess {
@@ -202,9 +202,9 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
@ -14,10 +14,10 @@ index 6dc8016311847..851f866e388f5 100644
std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index ff0bfdce017a5..0971782184774 100644
index 73dc09a7ee5af..f7ab03c788969 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -1054,18 +1054,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -1032,18 +1032,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@ -38,10 +38,10 @@ index ff0bfdce017a5..0971782184774 100644
std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 0f98eece3c159..a261c43634870 100644
index 701b6cc46045c..6ea15c988c15b 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -187,8 +187,8 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -184,8 +184,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;

View File

@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
return false;
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 9e536d6f48970..aeb659d55123c 100644
index 16bf45bea457e..d9db045e7bd68 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@ -24,7 +24,7 @@ index 9e536d6f48970..aeb659d55123c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -466,6 +467,10 @@ static_library("ui") {
@@ -478,6 +479,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -35,15 +35,15 @@ index 9e536d6f48970..aeb659d55123c 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -490,6 +495,7 @@ static_library("ui") {
@@ -502,6 +507,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
+ "//cef/libcef/features",
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2706,6 +2712,8 @@ static_library("ui") {
"//chrome/app:chrome_dll_resources",
@@ -2726,6 +2732,8 @@ static_library("ui") {
"views/apps/app_dialog/app_block_dialog_view.h",
"views/apps/app_dialog/app_pause_dialog_view.cc",
"views/apps/app_dialog/app_pause_dialog_view.h",
@ -52,7 +52,7 @@ index 9e536d6f48970..aeb659d55123c 100644
"views/apps/app_info_dialog/arc_app_info_links_panel.cc",
"views/apps/app_info_dialog/arc_app_info_links_panel.h",
"views/apps/chrome_app_window_client_views_chromeos.cc",
@@ -4499,8 +4507,6 @@ static_library("ui") {
@@ -4528,8 +4536,6 @@ static_library("ui") {
"views/accessibility/theme_tracking_non_accessible_image_view.h",
"views/apps/app_dialog/app_dialog_view.cc",
"views/apps/app_dialog/app_dialog_view.h",
@ -61,7 +61,7 @@ index 9e536d6f48970..aeb659d55123c 100644
"views/apps/app_info_dialog/app_info_dialog_container.cc",
"views/apps/app_info_dialog/app_info_dialog_container.h",
"views/apps/app_info_dialog/app_info_dialog_views.cc",
@@ -6082,6 +6088,7 @@ static_library("ui") {
@@ -6135,6 +6141,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@ -70,7 +70,7 @@ index 9e536d6f48970..aeb659d55123c 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 71297e151bb62..8c642d031f3c1 100644
index 9125b6d7e3e87..9140a9cf4ca7d 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -264,6 +264,25 @@
@ -113,7 +113,7 @@ index 71297e151bb62..8c642d031f3c1 100644
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -650,6 +676,12 @@ Browser::~Browser() {
@@ -651,6 +677,12 @@ Browser::~Browser() {
// away so they don't try and call back to us.
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
@ -126,7 +126,7 @@ index 71297e151bb62..8c642d031f3c1 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1379,6 +1411,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1381,6 +1413,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@ -141,7 +141,7 @@ index 71297e151bb62..8c642d031f3c1 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1386,8 +1426,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1388,8 +1428,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -162,7 +162,7 @@ index 71297e151bb62..8c642d031f3c1 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1590,6 +1640,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1592,6 +1642,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params);
}
@ -177,7 +177,7 @@ index 71297e151bb62..8c642d031f3c1 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1747,6 +1805,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1749,6 +1807,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -186,7 +186,7 @@ index 71297e151bb62..8c642d031f3c1 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1775,6 +1835,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1777,6 +1837,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -195,7 +195,7 @@ index 71297e151bb62..8c642d031f3c1 100644
if (!GetStatusBubble())
return;
@@ -1782,6 +1844,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1784,6 +1846,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@ -213,7 +213,7 @@ index 71297e151bb62..8c642d031f3c1 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1806,6 +1879,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -1808,6 +1881,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@ -233,7 +233,7 @@ index 71297e151bb62..8c642d031f3c1 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -1898,6 +1984,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1900,6 +1986,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -244,7 +244,7 @@ index 71297e151bb62..8c642d031f3c1 100644
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -2009,11 +2099,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -2011,11 +2101,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@ -260,7 +260,7 @@ index 71297e151bb62..8c642d031f3c1 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2203,6 +2297,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2205,6 +2299,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@ -276,7 +276,7 @@ index 71297e151bb62..8c642d031f3c1 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2743,13 +2846,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -2753,13 +2856,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@ -298,7 +298,7 @@ index 71297e151bb62..8c642d031f3c1 100644
return window_ ? window_->GetStatusBubble() : nullptr;
}
@@ -2883,6 +2993,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2893,6 +3003,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents);
}
@ -308,7 +308,7 @@ index 71297e151bb62..8c642d031f3c1 100644
void Browser::TabDetachedAtImpl(content::WebContents* contents,
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 23a838ba30c68..52601ebdcc9bd 100644
index 2cbbda0614965..976a9e8be44b6 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@ -356,7 +356,7 @@ index 23a838ba30c68..52601ebdcc9bd 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -472,6 +489,12 @@ class Browser : public TabStripModelObserver,
@@ -474,6 +491,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
@ -369,7 +369,7 @@ index 23a838ba30c68..52601ebdcc9bd 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -848,11 +871,19 @@ class Browser : public TabStripModelObserver,
@@ -850,11 +873,19 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -389,7 +389,7 @@ index 23a838ba30c68..52601ebdcc9bd 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1264,6 +1295,8 @@ class Browser : public TabStripModelObserver,
@@ -1266,6 +1297,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@ -398,7 +398,7 @@ index 23a838ba30c68..52601ebdcc9bd 100644
CreationSource creation_source_ = CreationSource::kUnknown;
UnloadController unload_controller_;
@@ -1328,6 +1361,10 @@ class Browser : public TabStripModelObserver,
@@ -1330,6 +1363,10 @@ class Browser : public TabStripModelObserver,
extension_browser_window_helper_;
#endif
@ -410,10 +410,10 @@ index 23a838ba30c68..52601ebdcc9bd 100644
// The opener browser of the document picture-in-picture browser. Null if the
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index edf4d8c7933e9..9e7c236dbf16a 100644
index d4f4ba7efd1be..4b0834aceed14 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -555,6 +555,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -556,6 +556,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index 6bcdf281c430a..cee4d03ce296b 100644
index a07ea61672f8d..e9d0666011add 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -9,6 +9,7 @@

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 7e25c4f0656fa..446075c9dfaf7 100644
index 2ab92db1a1136..dc9f25b79f3bd 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -322,6 +322,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -330,6 +330,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@ -16,7 +16,7 @@ index 7e25c4f0656fa..446075c9dfaf7 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -568,6 +575,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -577,6 +584,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@ -27,7 +27,7 @@ index 7e25c4f0656fa..446075c9dfaf7 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -808,6 +819,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -824,6 +835,14 @@ RenderViewContextMenu::RenderViewContextMenu(
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@ -42,10 +42,10 @@ index 7e25c4f0656fa..446075c9dfaf7 100644
}
RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1229,6 +1248,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems();
@@ -1260,6 +1279,12 @@ void RenderViewContextMenu::InitMenu() {
autofill::PopupHidingReason::kContextMenuOpened);
}
}
+
+ if (first_observer_) {
+ // Do this last so that the observer can optionally modify previously
@ -55,7 +55,7 @@ index 7e25c4f0656fa..446075c9dfaf7 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3224,6 +3249,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -3281,6 +3306,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}
@ -69,10 +69,10 @@ index 7e25c4f0656fa..446075c9dfaf7 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 d37c3a18df476..d5c84270f0680 100644
index 0cbc7b7181130..8346c35242724 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -142,6 +142,12 @@ class RenderViewContextMenu
@@ -146,6 +146,12 @@ class RenderViewContextMenu
}
#endif
@ -85,7 +85,7 @@ index d37c3a18df476..d5c84270f0680 100644
protected:
Profile* GetProfile() const;
@@ -404,6 +410,9 @@ class RenderViewContextMenu
@@ -415,6 +421,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;

View File

@ -139,7 +139,7 @@ index 1ee6c28cd47bc..62fd628dffd07 100644
params->need_local_path ? ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH
: ui::SelectFileDialog::FileTypeInfo::ANY_PATH;
diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
index d8d05b844383c..a18fe71e383d1 100644
index e3a85080fd37d..2f3e8e64614d7 100644
--- chrome/browser/file_select_helper.h
+++ chrome/browser/file_select_helper.h
@@ -61,7 +61,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@ -238,10 +238,10 @@ index 101e91826023b..35456ffad43f3 100644
paths.push_back(std::move(path));
}
diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc
index 4a67edd5e5ea0..dfbfd166fc33a 100644
index e2c00b2ec1532..a2e8753766597 100644
--- ui/shell_dialogs/select_file_dialog.cc
+++ ui/shell_dialogs/select_file_dialog.cc
@@ -87,8 +87,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) {
@@ -88,8 +88,10 @@ void SelectFileDialog::SetFactory(
// static
scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
Listener* listener,
@ -255,10 +255,10 @@ index 4a67edd5e5ea0..dfbfd166fc33a 100644
return CreateSelectFileDialog(listener, std::move(policy));
}
diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h
index ab71dd6c559ef..71899846eab4e 100644
index 3f1db1a9c6fd3..1f0e4af378c78 100644
--- ui/shell_dialogs/select_file_dialog.h
+++ ui/shell_dialogs/select_file_dialog.h
@@ -113,7 +113,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -114,7 +114,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// is refcounted and uses a background thread.
static scoped_refptr<SelectFileDialog> Create(
Listener* listener,
@ -268,7 +268,7 @@ index ab71dd6c559ef..71899846eab4e 100644
SelectFileDialog(const SelectFileDialog&) = delete;
SelectFileDialog& operator=(const SelectFileDialog&) = delete;
@@ -210,6 +211,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -211,6 +212,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
const GURL* caller = nullptr);
bool HasMultipleFileTypeChoices();
@ -288,7 +288,7 @@ index ab71dd6c559ef..71899846eab4e 100644
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
@@ -235,6 +249,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -236,6 +250,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// The listener to be notified of selection completion.
raw_ptr<Listener, DanglingUntriaged> listener_;
@ -300,7 +300,7 @@ index ab71dd6c559ef..71899846eab4e 100644
private:
// Tests if the file selection dialog can be displayed by
// testing if the AllowFileSelectionDialogs-Policy is
@@ -247,8 +266,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -248,8 +267,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Returns true if the dialog has multiple file type choices.
virtual bool HasMultipleFileTypeChoicesImpl() = 0;

View File

@ -120,7 +120,7 @@ index 51ed6bcf6b540..9ae4737e0737e 100644
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index 938e6ab7ca8ee..ece420f09418e 100644
index f8534ef8ee922..ca0c139d7ef1e 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -53,10 +53,12 @@ DialogDelegate::DialogDelegate() {
@ -189,7 +189,7 @@ index 938e6ab7ca8ee..ece420f09418e 100644
// Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
// widgets to prevent top-level window behavior (independent movement, etc).
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index fca669a962357..8a2a2acea788b 100644
index ca8ef29878e8e..90b845c480505 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -97,13 +97,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {

View File

@ -33,7 +33,7 @@ index ab1d8fd9bfa84..77f65b44e591a 100644
~BrowserFrameMac() override;
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
index eb1570b99202a..6f0e0ec08539f 100644
index 55f9663efa82a..d0fabd2273a80 100644
--- chrome/browser/ui/views/frame/browser_frame_mac.mm
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm
@@ -181,7 +181,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {

View File

@ -44,7 +44,7 @@ index 16107572d4d0d..409e9ea870482 100644
base::FeatureList::IsEnabled(
features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
index dece5822d8899..855ab4273e916 100644
index 18e2eec8f64ff..d36b3206aeb63 100644
--- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@
@ -65,7 +65,7 @@ index dece5822d8899..855ab4273e916 100644
return site_engagement::SiteEngagementService::Get(
Profile::FromBrowserContext(browser_context))
->GetScore(origin);
@@ -332,8 +336,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
@@ -338,8 +342,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
std::make_unique<ContextualNotificationPermissionUiSelector>());
selectors.emplace_back(std::make_unique<PrefNotificationPermissionUiSelector>(
Profile::FromBrowserContext(browser_context)));
@ -77,7 +77,7 @@ index dece5822d8899..855ab4273e916 100644
}
diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc
index e70f9fcc696e5..f61ee1548f8b0 100644
index bac111192fab1..695c240875c31 100644
--- chrome/browser/permissions/permission_manager_factory.cc
+++ chrome/browser/permissions/permission_manager_factory.cc
@@ -6,6 +6,7 @@
@ -88,12 +88,12 @@ index e70f9fcc696e5..f61ee1548f8b0 100644
#include "chrome/browser/background_fetch/background_fetch_permission_context.h"
#include "chrome/browser/background_sync/periodic_background_sync_permission_context.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -59,8 +60,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
@@ -56,8 +57,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
std::make_unique<GeolocationPermissionContextDelegate>(profile);
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+ if (!cef::IsAlloyRuntimeEnabled()) {
delegates.geolocation_manager = g_browser_process->geolocation_manager();
delegates.geolocation_manager = device::GeolocationManager::GetInstance();
DCHECK(delegates.geolocation_manager);
+ }
#endif

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/bookmarks/bookmark_stats.cc chrome/browser/ui/bookmarks/bookmark_stats.cc
index 45f661faa6e0b..777a1f6c333b6 100644
index 7ae18c5a960b0..d48ba838efe6f 100644
--- chrome/browser/ui/bookmarks/bookmark_stats.cc
+++ chrome/browser/ui/bookmarks/bookmark_stats.cc
@@ -21,7 +21,9 @@ bool IsBookmarkBarLocation(BookmarkLaunchLocation location) {

View File

@ -52,10 +52,10 @@ index 6cffe941b26f9..3e6223ab0d423 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index 8b08095a9b21e..71b14e1f876cf 100644
index 946b9cb533714..80815f7feb8f8 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -99,6 +99,10 @@ class Profile : public content::BrowserContext {
@@ -104,6 +104,10 @@ class Profile : public content::BrowserContext {
// be applicable to run. Please see crbug.com/1098697#c3 for more details.
static OTRProfileID CreateUnique(const std::string& profile_id_prefix);
@ -66,16 +66,16 @@ index 8b08095a9b21e..71b14e1f876cf 100644
// Creates a unique OTR profile id to be used for DevTools browser contexts.
static OTRProfileID CreateUniqueForDevTools();
@@ -502,6 +506,8 @@ class Profile : public content::BrowserContext {
base::WeakPtr<Profile> GetWeakPtr();
@@ -529,6 +533,8 @@ class Profile : public content::BrowserContext {
return instant_service_;
}
+ void NotifyOffTheRecordProfileCreated(Profile* off_the_record);
+
protected:
// Creates an OffTheRecordProfile which points to this Profile.
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
@@ -513,7 +519,6 @@ class Profile : public content::BrowserContext {
@@ -540,7 +546,6 @@ class Profile : public content::BrowserContext {
static PrefStore* CreateExtensionPrefStore(Profile*,
bool incognito_pref_store);
@ -99,7 +99,7 @@ index a3ee1846fcf77..13edaf1203d69 100644
return raw_otr_profile;
}
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 80acbb1473fc7..9db21208f8e81 100644
index 92dec1c25477c..0723bdb6bc6ad 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -389,7 +389,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@ -161,7 +161,7 @@ index 884e79cd54e0d..4e840df66756d 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
oauth2_login_manager_ =
diff --git chrome/browser/profiles/renderer_updater_factory.cc chrome/browser/profiles/renderer_updater_factory.cc
index 908a1c3615d70..462500925f05a 100644
index 711f449323737..b277b4386c16a 100644
--- chrome/browser/profiles/renderer_updater_factory.cc
+++ chrome/browser/profiles/renderer_updater_factory.cc
@@ -4,6 +4,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 3dce9f70a6cd1..39119ef60c61d 100644
index d0d299f92a292..3bee2edbcd073 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -32,6 +32,7 @@ static_library("safe_browsing") {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index 67dc4a2e0695e..16f819e133886 100644
index b8cfd5d2daa3b..51b52a3f34409 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -30,6 +30,7 @@
@ -10,8 +10,8 @@ index 67dc4a2e0695e..16f819e133886 100644
#include "chrome/browser/browser_features.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
@@ -68,6 +69,10 @@
#include "ui/color/color_provider.h"
@@ -70,6 +71,10 @@
#include "ui/color/color_provider_manager.h"
#include "ui/native_theme/native_theme.h"
+#if BUILDFLAG(ENABLE_CEF)
@ -21,7 +21,7 @@ index 67dc4a2e0695e..16f819e133886 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "base/scoped_observation.h"
#include "extensions/browser/extension_registry_observer.h"
@@ -270,11 +275,19 @@ void ThemeService::Init() {
@@ -272,11 +277,19 @@ void ThemeService::Init() {
// OnExtensionServiceReady. Otherwise, the ThemeObserver won't be
// constructed in time to observe the corresponding events.
#if BUILDFLAG(ENABLE_EXTENSIONS)
@ -42,18 +42,18 @@ index 67dc4a2e0695e..16f819e133886 100644
theme_syncable_service_ =
std::make_unique<ThemeSyncableService>(profile_, this);
diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc
index c8382bbee253b..a48c7b52252db 100644
index ebf3978910959..af00465d254a1 100644
--- chrome/browser/themes/theme_service_factory.cc
+++ chrome/browser/themes/theme_service_factory.cc
@@ -7,6 +7,7 @@
#include "base/no_destructor.h"
@@ -9,6 +9,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
@@ -31,6 +32,10 @@
@@ -34,6 +35,10 @@
#include "ui/linux/linux_ui_factory.h"
#endif
@ -64,7 +64,7 @@ index c8382bbee253b..a48c7b52252db 100644
namespace {
const ThemeHelper& GetThemeHelper() {
@@ -79,7 +84,15 @@ ThemeServiceFactory::ThemeServiceFactory()
@@ -95,7 +100,15 @@ ThemeServiceFactory::ThemeServiceFactory()
.Build()) {
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());

View File

@ -14,10 +14,10 @@ index 95cd290b601a3..89e8ab892e5ea 100644
extensions::WebViewRendererState::GetInstance();
std::string partition_id;
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
index 8b3f569882aeb..afc8007a6228b 100644
index 438276b719c2f..69635e429be78 100644
--- chrome/browser/plugins/plugin_utils.cc
+++ chrome/browser/plugins/plugin_utils.cc
@@ -70,6 +70,13 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
@@ -68,6 +68,13 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
content::BrowserContext* browser_context) {
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
#if BUILDFLAG(ENABLE_EXTENSIONS)
@ -31,7 +31,7 @@ index 8b3f569882aeb..afc8007a6228b 100644
Profile* profile = Profile::FromBrowserContext(browser_context);
if (extensions::ChromeContentBrowserClientExtensionsPart::
AreExtensionsDisabledForProfile(profile)) {
@@ -80,9 +87,6 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
@@ -78,9 +85,6 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
MimeTypesHandler::GetMIMETypeAllowlist();
// Go through the allowed extensions and try to use them to intercept
// the URL request.
@ -42,7 +42,7 @@ index 8b3f569882aeb..afc8007a6228b 100644
const extensions::Extension* extension =
registry->enabled_extensions().GetByID(extension_id);
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index ada53df4386e9..c3d4ccb8394f0 100644
index 43fc365662842..8aa6804c98fe1 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -984,6 +984,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@ -53,7 +53,7 @@ index ada53df4386e9..c3d4ccb8394f0 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1151,7 +1152,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1141,7 +1142,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -63,7 +63,7 @@ index ada53df4386e9..c3d4ccb8394f0 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1160,7 +1162,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1150,7 +1152,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -73,7 +73,7 @@ index ada53df4386e9..c3d4ccb8394f0 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1170,7 +1173,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1160,7 +1163,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 8bb0cecdce072..308d4cd72b58e 100644
index 75bb3119411d2..462fa070d07a8 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@
@ -18,7 +18,7 @@ index 8bb0cecdce072..308d4cd72b58e 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -234,6 +236,10 @@ static_library("renderer") {
@@ -237,6 +239,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 0141f1f97e0b4..d7e1c98b68c4f 100644
index 3a1539905f1fb..84071f39325a2 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -40,6 +40,7 @@
@ -10,7 +10,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -503,6 +504,8 @@ struct MainFunction {
@@ -504,6 +505,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@ -19,7 +19,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#if BUILDFLAG(IS_WIN)
// Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs.
@@ -652,6 +655,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -653,6 +656,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@ -30,7 +30,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DCHECK(base::ThreadPoolInstance::Get());
@@ -868,7 +875,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -876,7 +883,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@ -40,7 +40,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#if BUILDFLAG(IS_ANDROID)
record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1296,6 +1304,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1304,6 +1312,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@ -48,7 +48,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX)
@@ -1306,6 +1315,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1314,6 +1323,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@ -56,7 +56,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#if BUILDFLAG(IS_WIN)
child_process_logging::Init();
@@ -1500,6 +1510,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1508,6 +1518,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@ -64,7 +64,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1543,6 +1554,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1551,6 +1562,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -72,7 +72,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1666,6 +1678,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1670,6 +1682,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -80,7 +80,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 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 =
@@ -1688,6 +1701,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1692,6 +1705,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -88,7 +88,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1785,6 +1799,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1789,6 +1803,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
channel == version_info::Channel::DEV);
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
@ -96,7 +96,7 @@ index 0141f1f97e0b4..d7e1c98b68c4f 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(channel,
@@ -1793,5 +1808,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1797,5 +1812,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
PoissonAllocationSamplerInclusion::kEnforce,
memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kDynamic)
@ -126,7 +126,7 @@ index dad9f981d2e01..29baaf84465a0 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 91fe738fb59f1..10e7748c43a8f 100644
index c54e44c41861a..cee906951e418 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -51,6 +51,7 @@
@ -137,7 +137,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -1518,7 +1519,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1554,7 +1555,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@ -146,7 +146,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
// Handle special early return paths (which couldn't be processed even earlier
// as they require the process singleton to be held) first.
@@ -1565,7 +1566,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1601,7 +1602,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return content::RESULT_CODE_NORMAL_EXIT;
#endif // BUILDFLAG(IS_WIN)
}
@ -155,7 +155,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
#if BUILDFLAG(IS_WIN)
// Check if there is any machine level Chrome installed on the current
@@ -1620,12 +1621,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1656,12 +1657,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
@ -170,7 +170,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1771,6 +1774,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1807,6 +1810,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -181,7 +181,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@@ -1809,11 +1816,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1845,11 +1852,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@ -197,7 +197,7 @@ index 91fe738fb59f1..10e7748c43a8f 100644
#endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index 789d147f0b305..64a33cce013c5 100644
index ad3976cb46454..b49f7467156ed 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -17,6 +17,7 @@
@ -208,15 +208,15 @@ index 789d147f0b305..64a33cce013c5 100644
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h"
@@ -114,6 +115,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -118,6 +119,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
}
#endif // !BUILDFLAG(CHROME_FOR_TESTING)
+#if !BUILDFLAG(ENABLE_CEF)
// Create the app delegate. This object is intentionally leaked as a global
// singleton. It is accessed through -[NSApp delegate].
AppController* app_controller = [[AppController alloc] init];
@@ -122,6 +124,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
// Create the app delegate by requesting the shared AppController.
CHECK_EQ(nil, NSApp.delegate);
AppController* app_controller = AppController.sharedController;
@@ -126,6 +128,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated];
@ -224,18 +224,16 @@ index 789d147f0b305..64a33cce013c5 100644
ui::WarmScreenCapture();
@@ -180,7 +183,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
@@ -184,5 +187,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
}
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
+#if !BUILDFLAG(ENABLE_CEF)
AppController* appController =
base::mac::ObjCCastStrict<AppController>([NSApp delegate]);
[appController didEndMainMessageLoop];
[AppController.sharedController didEndMainMessageLoop];
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 1b9db89f8dce3..980999042366a 100644
index 6c5105b963a03..7b326cbc9246c 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -41,6 +41,7 @@
@ -246,7 +244,7 @@ index 1b9db89f8dce3..980999042366a 100644
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -1538,6 +1539,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1535,6 +1536,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@ -255,7 +253,7 @@ index 1b9db89f8dce3..980999042366a 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1570,6 +1573,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1567,6 +1570,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@ -267,7 +265,7 @@ index 1b9db89f8dce3..980999042366a 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4306,9 +4314,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4316,9 +4324,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@ -279,7 +277,7 @@ index 1b9db89f8dce3..980999042366a 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6229,7 +6239,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6335,7 +6345,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@ -288,7 +286,7 @@ index 1b9db89f8dce3..980999042366a 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6247,6 +6257,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6353,6 +6363,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@ -297,7 +295,7 @@ index 1b9db89f8dce3..980999042366a 100644
}
std::vector<base::FilePath>
@@ -7260,10 +7272,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -7377,10 +7389,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -310,7 +308,7 @@ index 1b9db89f8dce3..980999042366a 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7282,7 +7294,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -7399,7 +7411,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@ -320,7 +318,7 @@ index 1b9db89f8dce3..980999042366a 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -7418,7 +7431,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -7535,7 +7548,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@ -330,10 +328,10 @@ index 1b9db89f8dce3..980999042366a 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 902dcaf5df1ca..d8e698886df54 100644
index 599083d73c876..c6c565291a8fe 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -135,6 +135,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -136,6 +136,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@ -342,7 +340,7 @@ index 902dcaf5df1ca..d8e698886df54 100644
// TODO(https://crbug.com/787567): This file is about calls from content/ out
// to chrome/ to get values or notify about events, but both of these
// functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -617,7 +619,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -630,7 +632,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@ -351,7 +349,7 @@ index 902dcaf5df1ca..d8e698886df54 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1010,7 +1012,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1049,7 +1051,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@ -361,7 +359,7 @@ index 902dcaf5df1ca..d8e698886df54 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index ffc921ad54a3e..590abcaf1b49d 100644
index 645106f10a85f..67a5dd14b1a2b 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -13,6 +13,7 @@
@ -372,7 +370,7 @@ index ffc921ad54a3e..590abcaf1b49d 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h"
@@ -177,6 +178,10 @@
@@ -179,6 +180,10 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
@ -383,7 +381,7 @@ index ffc921ad54a3e..590abcaf1b49d 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1439,6 +1444,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1529,6 +1534,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@ -395,7 +393,7 @@ index ffc921ad54a3e..590abcaf1b49d 100644
}
// Register prefs applicable to all profiles.
@@ -1839,6 +1849,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -1930,6 +1940,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 c1f28ebc372df..275657f54c517 100644
index 728db9db53e6c..6a6f6bede9985 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -395,6 +395,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -408,6 +408,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 c1f28ebc372df..275657f54c517 100644
return false;
}
@@ -411,6 +412,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -424,6 +425,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@ -24,7 +24,7 @@ index c1f28ebc372df..275657f54c517 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1102,11 +1110,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1155,11 +1163,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@ -41,10 +41,10 @@ index c1f28ebc372df..275657f54c517 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index f6c50fc75faf8..30b0f9fa68554 100644
index 9bbe98269afb6..99ba07e148f84 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -192,6 +192,57 @@ void SetCommandIcon(ui::SimpleMenuModel* model,
@@ -585,6 +585,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@ -102,7 +102,7 @@ index f6c50fc75faf8..30b0f9fa68554 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -960,7 +1011,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1303,7 +1354,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@ -111,16 +111,7 @@ index f6c50fc75faf8..30b0f9fa68554 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -975,7 +1026,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
-bool AppMenuModel::IsCommandIdVisible(int command_id) const {
+bool AppMenuModel::IsCommandIdVisibleInternal(int command_id) const {
switch (command_id) {
case IDC_PIN_TO_START_SCREEN:
return false;
@@ -998,6 +1049,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const {
@@ -1318,6 +1369,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@ -139,10 +130,6 @@ index f6c50fc75faf8..30b0f9fa68554 100644
+}
+
+bool AppMenuModel::IsCommandIdVisible(int command_id) const {
+ if (!IsCommandIdVisibleInternal(command_id)) {
+ return false;
+ }
+
+#if BUILDFLAG(ENABLE_CEF)
+ if (browser_->cef_delegate()) {
+ return browser_->cef_delegate()->IsAppMenuItemVisible(command_id);
@ -155,7 +142,7 @@ index f6c50fc75faf8..30b0f9fa68554 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if ((command_id == IDC_RECENT_TABS_MENU) ||
(command_id == AppMenuModel::kMinRecentTabsCommandId)) {
@@ -1148,11 +1227,15 @@ void AppMenuModel::Build() {
@@ -1468,11 +1543,15 @@ void AppMenuModel::Build() {
}
}
@ -176,7 +163,7 @@ index f6c50fc75faf8..30b0f9fa68554 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -1243,9 +1326,13 @@ void AppMenuModel::Build() {
@@ -1545,9 +1624,13 @@ void AppMenuModel::Build() {
kMoreToolsMenuItem);
if (!features::IsChromeRefresh2023()) {
@ -193,7 +180,7 @@ index f6c50fc75faf8..30b0f9fa68554 100644
}
if (!features::IsChromeRefresh2023()) {
@@ -1327,6 +1414,11 @@ void AppMenuModel::Build() {
@@ -1629,6 +1712,11 @@ void AppMenuModel::Build() {
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
}
@ -206,15 +193,22 @@ index f6c50fc75faf8..30b0f9fa68554 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index 8648fccbe4a2e..386dee69b5eff 100644
index 4d70f711ce633..2a3834702dca2 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -258,6 +258,9 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -194,6 +194,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override;
+ bool IsCommandIdVisible(int command_id) const override;
bool IsCommandIdAlerted(int command_id) const override;
bool GetAcceleratorForCommandId(int command_id,
ui::Accelerator* accelerator) const override;
@@ -218,6 +219,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
// Appends a zoom menu (without separators).
void CreateZoomMenu();
+ bool IsCommandIdEnabledInternal(int command_id) const;
+ bool IsCommandIdVisibleInternal(int command_id) const;
+
private:
// Adds actionable global error menu items to the menu.
@ -237,7 +231,7 @@ index 59024587ef6b7..0c30aa71768cf 100644
void FindBarHost::RegisterAccelerators() {
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 24b85357b90b8..67e1bacb8d518 100644
index d9f30b0876f4a..c4675bf8b95b7 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -75,15 +75,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) {
@ -334,20 +328,10 @@ index 24b85357b90b8..67e1bacb8d518 100644
auto key = Widget::GetColorProviderKey();
+ if (!browser_view_)
+ return key;
key.frame_type = UseCustomFrame()
? ui::ColorProviderManager::FrameType::kChromium
: ui::ColorProviderManager::FrameType::kNative;
@@ -420,6 +450,9 @@ ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
}
absl::optional<SkColor> BrowserFrame::GetUserColor() const {
+ if (!browser_view_) {
+ return absl::nullopt;
+ }
#if BUILDFLAG(IS_CHROMEOS_ASH)
// ChromeOS SystemWebApps use the OS theme all the time.
if (ash::IsSystemWebApp(browser_view_->browser())) {
@@ -533,5 +566,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
// color_mode.
[this, &key]() {
@@ -558,5 +588,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
}
bool BrowserFrame::IsIncognitoBrowser() const {
@ -357,7 +341,7 @@ index 24b85357b90b8..67e1bacb8d518 100644
return browser_view_->browser()->profile()->IsIncognitoProfile();
}
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 795f057fedc51..54b08509919af 100644
index 965bd2525b212..6a637609b65e9 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -61,7 +61,9 @@ enum class TabDragKind {
@ -371,10 +355,10 @@ index 795f057fedc51..54b08509919af 100644
BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(const BrowserFrame&) = delete;
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 39a1660cae03a..0faf50eb14298 100644
index 306affc1d9573..3a7cad35c6352 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -314,11 +314,10 @@ using content::NativeWebKeyboardEvent;
@@ -320,11 +320,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
using web_modal::WebContentsModalDialogHost;
@ -389,7 +373,7 @@ index 39a1660cae03a..0faf50eb14298 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -789,11 +788,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -793,11 +792,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@ -413,7 +397,7 @@ index 39a1660cae03a..0faf50eb14298 100644
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -837,7 +847,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -841,7 +851,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
@ -421,7 +405,7 @@ index 39a1660cae03a..0faf50eb14298 100644
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -893,8 +902,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -897,8 +906,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@ -439,7 +423,7 @@ index 39a1660cae03a..0faf50eb14298 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1087,12 +1103,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
@@ -1086,12 +1102,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
#if BUILDFLAG(IS_MAC)
bool BrowserView::UsesImmersiveFullscreenMode() const {
@ -456,7 +440,7 @@ index 39a1660cae03a..0faf50eb14298 100644
}
bool BrowserView::UsesImmersiveFullscreenTabbedMode() const {
@@ -1817,6 +1835,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1816,6 +1834,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@ -465,7 +449,7 @@ index 39a1660cae03a..0faf50eb14298 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -2722,7 +2742,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -2759,7 +2779,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -475,7 +459,7 @@ index 39a1660cae03a..0faf50eb14298 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3222,7 +3243,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3295,7 +3316,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@ -485,7 +469,7 @@ index 39a1660cae03a..0faf50eb14298 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -3776,8 +3798,10 @@ void BrowserView::Layout() {
@@ -3852,8 +3874,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -498,7 +482,7 @@ index 39a1660cae03a..0faf50eb14298 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -3843,6 +3867,11 @@ void BrowserView::AddedToWidget() {
@@ -3919,6 +3943,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@ -510,7 +494,7 @@ index 39a1660cae03a..0faf50eb14298 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -3889,13 +3918,9 @@ void BrowserView::AddedToWidget() {
@@ -3966,13 +3995,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@ -526,7 +510,7 @@ index 39a1660cae03a..0faf50eb14298 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4300,7 +4325,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4377,7 +4402,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@ -536,7 +520,7 @@ index 39a1660cae03a..0faf50eb14298 100644
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -4671,6 +4697,8 @@ Profile* BrowserView::GetProfile() {
@@ -4748,6 +4774,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@ -545,7 +529,7 @@ index 39a1660cae03a..0faf50eb14298 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -4693,6 +4721,8 @@ void BrowserView::HideDownloadShelf() {
@@ -4770,6 +4798,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@ -555,10 +539,10 @@ index 39a1660cae03a..0faf50eb14298 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 3e812382f77e6..d821b03bfa510 100644
index bde91001c6f75..a7434456fc75f 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow,
@@ -123,11 +123,16 @@ class BrowserView : public BrowserWindow,
public webapps::AppBannerManager::Observer {
public:
METADATA_HEADER(BrowserView);
@ -589,7 +573,7 @@ index 3e812382f77e6..d821b03bfa510 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 cf12bbd30e086..a227f64d8d5e9 100644
index 25fa3e495f4b1..21ef37e0b2495 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -47,6 +47,10 @@
@ -603,7 +587,7 @@ index cf12bbd30e086..a227f64d8d5e9 100644
using views::View;
using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost;
@@ -560,6 +564,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -569,6 +573,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -634,10 +618,10 @@ index 5e059b9878fc2..c1f6fbcd40ec4 100644
ContentsWebView::~ContentsWebView() {
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 85a3c9eec15fe..e9a8bc50532f8 100644
index 21e08a062b192..c9b6ba5cc7538 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -93,6 +93,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@@ -94,6 +94,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
};
for (PageActionIconType type : params.types_enabled) {
@ -651,10 +635,10 @@ index 85a3c9eec15fe..e9a8bc50532f8 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 2753a95f8ff35..9745477102917 100644
index fb8bfdbcb2bd5..741d84ecba4ea 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -559,33 +559,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -559,29 +559,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@ -676,12 +660,6 @@ index 2753a95f8ff35..9745477102917 100644
return GetFrameView()->EverHasVisibleBackgroundTabShapes();
}
bool BrowserTabStripController::ShouldPaintAsActiveFrame() const {
+ if (!GetFrameView())
+ return false;
return GetFrameView()->ShouldPaintAsActive();
}
bool BrowserTabStripController::CanDrawStrokes() const {
+ if (!GetFrameView())
+ return false;
@ -703,10 +681,10 @@ index 2753a95f8ff35..9745477102917 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 4682fa0f74996..099742d04102a 100644
index c9e50271f2716..063e5b353f0a3 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -175,12 +175,13 @@ constexpr int kBrowserAppMenuRefreshCollapsedMargin = 2;
@@ -208,12 +208,13 @@ class ToolbarView::ContainerView : public views::View {
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
@ -721,8 +699,8 @@ index 4682fa0f74996..099742d04102a 100644
+ display_mode_(display_mode ? *display_mode : GetDisplayMode(browser)) {
SetID(VIEW_ID_TOOLBAR);
if (display_mode_ == DisplayMode::NORMAL) {
@@ -202,6 +203,19 @@ ToolbarView::~ToolbarView() {
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -238,6 +239,19 @@ ToolbarView::~ToolbarView() {
}
void ToolbarView::Init() {
@ -742,8 +720,8 @@ index 4682fa0f74996..099742d04102a 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
@@ -211,12 +225,13 @@ void ToolbarView::Init() {
#endif
@@ -262,12 +276,13 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
- display_mode_ != DisplayMode::NORMAL);
@ -758,7 +736,7 @@ index 4682fa0f74996..099742d04102a 100644
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -297,8 +312,10 @@ void ToolbarView::Init() {
@@ -349,8 +364,10 @@ void ToolbarView::Init() {
}
}
std::unique_ptr<media_router::CastToolbarButton> cast;
@ -770,7 +748,7 @@ index 4682fa0f74996..099742d04102a 100644
std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -308,7 +325,8 @@ void ToolbarView::Init() {
@@ -360,7 +377,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@ -780,17 +758,17 @@ index 4682fa0f74996..099742d04102a 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -316,7 +334,7 @@ void ToolbarView::Init() {
@@ -368,7 +386,7 @@ void ToolbarView::Init() {
std::unique_ptr<SidePanelToolbarButton> side_panel_button;
std::unique_ptr<SidePanelToolbarContainer> side_panel_toolbar_container;
- if (browser_view_->unified_side_panel()) {
+ if (browser_view_->unified_side_panel() && BUTTON_VISIBLE(kSidePanel)) {
if (base::FeatureList::IsEnabled(
companion::features::kSidePanelCompanion)) {
if (companion::IsCompanionFeatureEnabled()) {
side_panel_toolbar_container =
std::make_unique<SidePanelToolbarContainer>(browser_view_);
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index c38f2b0545d21..fe9a92b2f610c 100644
index be3bd96444563..96669547e3ccf 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -89,7 +89,8 @@ class ToolbarView : public views::AccessiblePaneView,

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index e36b1e99fb93d..1b7c458666cea 100644
index 7e32effcb4b8c..71bfd6c0f4c5c 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -101,7 +101,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -102,7 +102,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
absl::optional<blink::UserAgentMetadata>* override_out);

View File

@ -12,10 +12,10 @@ index f4f583be8fba9..a2ed253f3724d 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 4438dea521489..987aa9714bd1c 100644
index b8649b77e9a29..0d25d60e81b1a 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -749,6 +749,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
@@ -751,6 +751,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
resource_request_->has_user_gesture, initiating_origin,
initiator_document_.AsRenderFrameHostIfValid(), &loader_factory);
@ -34,10 +34,10 @@ index 4438dea521489..987aa9714bd1c 100644
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory));
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index a5ea7baed1f09..8f3f679aed305 100644
index d9b45cc4c8277..6dfa6ed1a6500 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -986,7 +986,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1006,7 +1006,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@ -46,7 +46,7 @@ index a5ea7baed1f09..8f3f679aed305 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -995,6 +995,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1015,6 +1015,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en";
@ -55,7 +55,7 @@ index a5ea7baed1f09..8f3f679aed305 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 3db43fde00af4..1be6b3926fcd3 100644
index f750767092895..d19f046ed2846 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -37,6 +37,7 @@
@ -66,7 +66,7 @@ index 3db43fde00af4..1be6b3926fcd3 100644
#include "content/public/common/alternative_error_page_override_info.mojom-forward.h"
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h"
@@ -1815,7 +1816,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1868,7 +1869,7 @@ class CONTENT_EXPORT ContentBrowserClient {
//
// If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext.
@ -75,7 +75,7 @@ index 3db43fde00af4..1be6b3926fcd3 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2023,6 +2024,19 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2076,6 +2077,19 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -95,7 +95,7 @@ index 3db43fde00af4..1be6b3926fcd3 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.
@@ -2079,6 +2093,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2132,6 +2146,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@ -107,7 +107,7 @@ index 3db43fde00af4..1be6b3926fcd3 100644
// on blink::features::kUserAgentReduction. Content may cache this value.
virtual std::string GetUserAgent();
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 834a07bb92d77..64e72df7a6abc 100644
index a4130ad4dc815..b303f6c8768b7 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -96,6 +96,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -120,7 +120,7 @@ index 834a07bb92d77..64e72df7a6abc 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -313,6 +316,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -318,6 +321,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -132,10 +132,10 @@ index 834a07bb92d77..64e72df7a6abc 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 6b37ab029be69..d8d33d81ca246 100644
index b1ad4bd6c6108..b2f6cef961faf 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -626,6 +626,8 @@ void RenderThreadImpl::Init() {
@@ -620,6 +620,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@ -145,10 +145,10 @@ index 6b37ab029be69..d8d33d81ca246 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 58caad274969f..1584a5b3ed0cb 100644
index 134a4b1f1ce8f..c2de5eb620bf5 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -961,6 +961,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -943,6 +943,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@ -165,10 +165,10 @@ index 58caad274969f..1584a5b3ed0cb 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 2a01122b62190..ad09cca7df98a 100644
index 587565fa2fd5d..d68eeea7e842e 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -228,6 +228,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -224,6 +224,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID)

View File

@ -94,7 +94,7 @@ index 3062f57603321..d8532c9c2eabb 100644
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index fa26be0ffd110..f231ab04022e3 100644
index ab6bc68812e36..1cd5ba7bd27f3 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -46,6 +46,7 @@
@ -105,13 +105,12 @@ index fa26be0ffd110..f231ab04022e3 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -1324,6 +1325,12 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1306,6 +1307,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}
+void ContentMainRunnerImpl::ShutdownOnUIThread() {
+ base::ScopedAllowBaseSyncPrimitivesForTesting allow_wait;
+ unregister_thread_closure_.RunAndReset();
+ discardable_shared_memory_manager_.reset();
+}
+
@ -119,7 +118,7 @@ index fa26be0ffd110..f231ab04022e3 100644
std::unique_ptr<ContentMainRunner> ContentMainRunner::Create() {
return ContentMainRunnerImpl::Create();
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h
index 22173f344ae14..fe63790ef128f 100644
index da60e9346b283..c36effdd7e5ee 100644
--- content/app/content_main_runner_impl.h
+++ content/app/content_main_runner_impl.h
@@ -27,7 +27,7 @@ class DiscardableSharedMemoryManager;
@ -154,7 +153,7 @@ index 283161145d792..9f3f635abdd1c 100644
if (main_argv)
setproctitle_init(main_argv);
diff --git content/public/app/content_main.h content/public/app/content_main.h
index baf8a17691bac..9e6b32c9c3692 100644
index 9be99b20469c0..7d5095593b5fa 100644
--- content/public/app/content_main.h
+++ content/public/app/content_main.h
@@ -96,6 +96,13 @@ struct CONTENT_EXPORT ContentMainParams {

View File

@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index 13c7a8525dee2..450c496570bcc 100644
index 456414fea977b..3bf7d939aaa50 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -18,6 +18,7 @@
@ -21,7 +21,7 @@ index 13c7a8525dee2..450c496570bcc 100644
namespace embedder_support {
namespace {
@@ -350,6 +355,14 @@ std::string GetMajorVersionForUserAgentString(
@@ -339,6 +344,14 @@ blink::UserAgentBrandList GetBrandFullVersionList(
std::string GetProductAndVersion(
ForceMajorVersionToMinorPosition force_major_to_minor,
UserAgentReductionEnterprisePolicyState user_agent_reduction) {

View File

@ -198,10 +198,10 @@ index c3197eb4790fa..1e7ae767b0582 100644
}
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index de61251db35b6..ad94482e2e7db 100644
index fbef1f4fba931..1f98adb6b0bcb 100644
--- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h
@@ -31,6 +31,7 @@
@@ -32,6 +32,7 @@
#include "url/gurl.h"
class ExtensionFunctionRegistry;
@ -209,7 +209,7 @@ index de61251db35b6..ad94482e2e7db 100644
class PrefService;
namespace base {
@@ -75,6 +76,7 @@ class ComponentExtensionResourceManager;
@@ -76,6 +77,7 @@ class ComponentExtensionResourceManager;
class Extension;
class ExtensionCache;
class ExtensionError;
@ -217,7 +217,7 @@ index de61251db35b6..ad94482e2e7db 100644
class ExtensionHostDelegate;
class ExtensionSet;
class ExtensionSystem;
@@ -247,6 +249,14 @@ class ExtensionsBrowserClient {
@@ -248,6 +250,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0;
@ -233,7 +233,7 @@ index de61251db35b6..ad94482e2e7db 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index e885327697fb9..7dc4c91069762 100644
index ac0da20879dc1..46e1eabeccab3 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -377,9 +377,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,

View File

@ -12,7 +12,7 @@ index a9b0a5a827fc8..9a0fd388756f3 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index ea3d57d093740..bad302160e7c9 100644
index 9298bc0945ff2..eb3a9628785f4 100644
--- BUILD.gn
+++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@ -89,7 +89,7 @@ index 60f573a736ba5..90dd6d0b37314 100644
+_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow
+
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 2254e8a56cda6..20ca93ea9fe32 100644
index 7b939af86e260..4f89bcabf4d77 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
@ -99,8 +99,8 @@ index 2254e8a56cda6..20ca93ea9fe32 100644
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//extensions/buildflags/buildflags.gni")
@@ -80,6 +81,10 @@ template("chrome_repack_percent") {
import("//components/signin/features.gni")
@@ -81,6 +82,10 @@ template("chrome_repack_percent") {
"//ui/chromeos/resources",
]
}
@ -135,7 +135,7 @@ index adc881122cb9c..cafa71386fad6 100644
source_patterns +=
[ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 4e6af9a522de5..b1851bc764355 100644
index e9b34c78999b0..a1e06920636f6 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni")
@ -146,7 +146,7 @@ index 4e6af9a522de5..b1851bc764355 100644
import("//chrome/process_version_rc_template.gni")
import("//components/nacl/features.gni")
import("//third_party/ffmpeg/ffmpeg_options.gni")
@@ -121,11 +122,13 @@ action("mini_installer_archive") {
@@ -125,11 +126,13 @@ action("mini_installer_archive") {
inputs = [
"$root_out_dir/chrome.dll",
"$root_out_dir/chrome.exe",

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 99f8fb6dbfd4c..20fc423ee927f 100644
index 887146425378c..7c823a9abc017 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1144,6 +1144,15 @@
@@ -1188,6 +1188,15 @@
# END "everything else" section.
# Everything but chrome/, components/, content/, and ios/

View File

@ -1,5 +1,5 @@
diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn
index 642afd72cc0f9..5f12133c0ac5a 100644
index 52940b9bc43aa..3781cc157c6ab 100644
--- device/bluetooth/BUILD.gn
+++ device/bluetooth/BUILD.gn
@@ -46,10 +46,12 @@ source_set("deprecated_experimental_mojo") {

View File

@ -1,8 +1,8 @@
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
index c9777e07fdd31..3858ce8c28cb3 100644
index cb282e3a526fb..e95bb8c96112b 100644
--- ui/accessibility/platform/BUILD.gn
+++ ui/accessibility/platform/BUILD.gn
@@ -286,6 +286,10 @@ component("platform") {
@@ -283,6 +283,10 @@ component("platform") {
if (use_gio) {
configs += [ "//build/linux:gio_config" ]
}

View File

@ -1,8 +1,8 @@
diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm
index 8da699b0da21d..a97bb8ed14d58 100644
index 363dc67d5abad..2d8a96056a05b 100644
--- base/message_loop/message_pump_mac.mm
+++ base/message_loop/message_pump_mac.mm
@@ -780,7 +780,8 @@ void MessagePumpUIApplication::Detach() {
@@ -765,7 +765,8 @@ void MessagePumpUIApplication::Detach() {
#else
ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
@ -12,7 +12,7 @@ index 8da699b0da21d..a97bb8ed14d58 100644
DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask());
// Pumping events in private runloop modes is known to interact badly with
// app modal windows like NSAlert.
@@ -790,7 +791,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
@@ -776,7 +777,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() {
}
ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() {

View File

@ -10,10 +10,10 @@ index f936d951fe272..90a3165172dce 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 78206280cfbb8..5a7499747956b 100644
index 00b3c891bf3bd..82edec32942e7 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -1709,7 +1709,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
@@ -1706,7 +1706,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 78206280cfbb8..5a7499747956b 100644
bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const {
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index f59007a90f6a9..acf35092949a6 100644
index 1e15e62d01b6c..a24f0a762c47b 100644
--- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc
@@ -286,7 +286,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
@@ -288,7 +288,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
}
bool ResourceRequest::SendsCookies() const {

View File

@ -1,8 +1,8 @@
diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index c7cfa008b872f..e401aef2c54e2 100644
index 8a1f7c56a000a..2be7d42e7e6b6 100644
--- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc
@@ -984,7 +984,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
@@ -988,7 +988,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@ -11,7 +11,7 @@ index c7cfa008b872f..e401aef2c54e2 100644
if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false;
@@ -1011,7 +1011,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
@@ -1015,7 +1015,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@ -41,10 +41,10 @@ index afefe3cd83dee..6668463247644 100644
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 48e6fa3d8447e..2972566646730 100644
index 95d27f99acc0e..6955c18cde0fd 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3265,6 +3265,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -3250,6 +3250,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
@ -57,10 +57,10 @@ index 48e6fa3d8447e..2972566646730 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index fd91b2f251938..da0fb34b4606f 100644
index e74883df0950b..cee6677e3875e 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -796,6 +796,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -795,6 +795,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();

View File

@ -84,7 +84,7 @@ index d5767fe27db0d..5778847a68208 100644
}
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 7afee9ec16059..5686f028d7e69 100644
index 341fffbe509b5..678a0ed4d2b26 100644
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -23,6 +23,7 @@

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 3b059b6121562..d2e343643e593 100644
index 421a0b8ba291a..96fb53d746a7a 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -697,6 +697,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
@@ -707,6 +707,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@ -1,5 +1,5 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index 9c2ec4298fa8d..c8114659affc9 100644
index c3ba9d2f8d60b..9ecc36cefb41c 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -934,6 +934,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)

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 680ac2d851294..f8c1a8b64b2c4 100644
index c01cc787de463..9c09d462ce05e 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -6,6 +6,7 @@
@ -10,7 +10,7 @@ index 680ac2d851294..f8c1a8b64b2c4 100644
#include <set>
#include <utility>
@@ -729,10 +730,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
@@ -728,10 +729,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@ -27,7 +27,7 @@ index 680ac2d851294..f8c1a8b64b2c4 100644
}
absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
@@ -2284,6 +2287,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2292,6 +2295,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
// This needs to happen only after |window_| has been initialized using
// Init(), because it needs to have the layer.
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
index b30891c5efe8d..4b411229d5251 100644
index 319bb85903871..9cd291c0553ea 100644
--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
+++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
@@ -23,6 +23,7 @@
@ -10,7 +10,7 @@ index b30891c5efe8d..4b411229d5251 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/analysis/analysis_settings.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.h"
@@ -246,6 +247,9 @@ bool ContentAnalysisDelegate::IsEnabled(Profile* profile,
@@ -247,6 +248,9 @@ bool ContentAnalysisDelegate::IsEnabled(Profile* profile,
GURL url,
Data* data,
AnalysisConnector connector) {
@ -21,7 +21,7 @@ index b30891c5efe8d..4b411229d5251 100644
// If the corresponding Connector policy isn't set, don't perform scans.
if (!service || !service->IsConnectorEnabled(connector))
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index cf11f6a7e1077..dd21d7625c085 100644
index 2795ff21d23b8..68552c8e0ba40 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -22,6 +22,7 @@
@ -66,10 +66,10 @@ index cf11f6a7e1077..dd21d7625c085 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -817,7 +832,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize);
@@ -818,7 +833,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
const int disk_cache_size = local_state->GetInteger(prefs::kDiskCacheSize);
network_context_params->http_cache_max_size = disk_cache_size;
network_context_params->shared_dictionary_cache_max_size = disk_cache_size;
+ }
+ if (!in_memory) {
@ -77,7 +77,7 @@ index cf11f6a7e1077..dd21d7625c085 100644
::network::mojom::NetworkContextFilePaths::New();
diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc
index fd58815c03393..c3865639affb1 100644
index 9cf4c48627d33..23cf9f77b0ce2 100644
--- chrome/browser/signin/identity_manager_factory.cc
+++ chrome/browser/signin/identity_manager_factory.cc
@@ -11,6 +11,7 @@
@ -88,7 +88,7 @@ index fd58815c03393..c3865639affb1 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/image_fetcher/image_decoder_impl.h"
#include "chrome/browser/profiles/profile.h"
@@ -89,6 +90,7 @@ IdentityManagerFactory::~IdentityManagerFactory() {
@@ -96,6 +97,7 @@ IdentityManagerFactory::~IdentityManagerFactory() {
// static
signin::IdentityManager* IdentityManagerFactory::GetForProfile(
Profile* profile) {
@ -97,7 +97,7 @@ index fd58815c03393..c3865639affb1 100644
GetInstance()->GetServiceForBrowserContext(profile, true));
}
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index d54a6b2b2ef84..6ced1c9fb0750 100644
index f8e822c0d54fe..2ec330cefe8fe 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -554,6 +554,25 @@ void CookieMonster::SetCookieableSchemes(
@ -127,7 +127,7 @@ index d54a6b2b2ef84..6ced1c9fb0750 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 8c47efddd4a33..cdd8b38e58803 100644
index e4018759ec521..dd4a711ca4d3b 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -208,6 +208,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@ -178,10 +178,10 @@ index ba7f48e90026c..a509cc4565e9f 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 660df7d04bff9..f3cb3381ce462 100644
index d553d31e90ca7..c27dc5a747aca 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2328,16 +2328,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2349,16 +2349,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@ -210,10 +210,10 @@ index 660df7d04bff9..f3cb3381ce462 100644
base::FeatureList::IsEnabled(features::kFledgePst)) {
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index e11f45e366c8f..a97152a3f0014 100644
index bff25abd86e9d..114a818850751 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -357,6 +357,9 @@ struct NetworkContextParams {
@@ -356,6 +356,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 3ae0bd0aefe45..0360dfb2079f2 100644
index 710d5ce9e029e..052c820aab988 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -498,10 +498,6 @@ class LoginHandlerDelegate {
@@ -502,10 +502,6 @@ class LoginHandlerDelegate {
}
WebContents* web_contents = web_contents_getter_.Run();
@ -13,7 +13,7 @@ index 3ae0bd0aefe45..0360dfb2079f2 100644
// WeakPtr is not strictly necessary here due to OnRequestCancelled.
creating_login_delegate_ = true;
@@ -553,12 +549,6 @@ void OnAuthRequiredContinuation(
@@ -557,12 +553,6 @@ void OnAuthRequiredContinuation(
mojo::PendingRemote<network::mojom::AuthChallengeResponder>
auth_challenge_responder,
base::RepeatingCallback<WebContents*(void)> web_contents_getter) {
@ -26,7 +26,7 @@ index 3ae0bd0aefe45..0360dfb2079f2 100644
new LoginHandlerDelegate(
std::move(auth_challenge_responder), std::move(web_contents_getter),
auth_info, is_request_for_primary_main_frame, process_id, request_id, url,
@@ -3050,8 +3040,12 @@ void StoragePartitionImpl::GetQuotaSettings(
@@ -3119,8 +3109,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@ -40,7 +40,7 @@ index 3ae0bd0aefe45..0360dfb2079f2 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -3061,9 +3055,12 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -3130,9 +3124,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New();

View File

@ -14,7 +14,7 @@ index ee170d7984eb3..f45d171d15ea3 100644
if (crashed_overlay_view_ == crashed_overlay_view)
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index 42ccdb874b455..0142d75b381d5 100644
index 2b7d528daf579..c71ff2a9c8dd3 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -88,6 +88,10 @@ class WEBVIEW_EXPORT WebView : public View,

View File

@ -1,8 +1,8 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index caf0822f9c14c..a052f4265212c 100644
index da966a58b11be..81b0199b4b6e5 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -63,6 +63,8 @@
@@ -64,6 +64,8 @@
X("cc") \
X("cc.debug") \
X("cdp.perf") \

View File

@ -1,5 +1,5 @@
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index 6e4b373945d6a..6fcb29d67451d 100644
index 704d47d68d7f5..950ba03efdba8 100644
--- ui/base/models/menu_model.h
+++ ui/base/models/menu_model.h
@@ -17,8 +17,11 @@
@ -14,7 +14,7 @@ index 6e4b373945d6a..6fcb29d67451d 100644
}
namespace ui {
@@ -149,6 +152,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel
@@ -152,6 +155,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel
// |event_flags| is a bit mask of ui::EventFlags.
virtual void ActivatedAt(size_t index, int event_flags);
@ -106,10 +106,10 @@ index 3c78525361ebf..c922dfe5019a3 100644
} // namespace gfx
diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h
index 109522be316f2..25fb550337fb6 100644
index c1c0631071a11..aa2c01ebce43e 100644
--- ui/views/animation/ink_drop_host.h
+++ ui/views/animation/ink_drop_host.h
@@ -189,6 +189,8 @@ class VIEWS_EXPORT InkDropHost {
@@ -194,6 +194,8 @@ class VIEWS_EXPORT InkDropHost {
View* host_view() { return host_view_; }
const View* host_view() const { return host_view_; }
@ -240,10 +240,10 @@ index 711dc633bffc2..0fa2626150de2 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 127c58864174e..156ea7b413541 100644
index f8b3ded1dba82..86b9ddd90ee16 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -470,7 +470,8 @@ void MenuController::Run(Widget* parent,
@@ -563,7 +563,8 @@ void MenuController::Run(Widget* parent,
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
@ -253,7 +253,7 @@ index 127c58864174e..156ea7b413541 100644
exit_type_ = ExitType::kNone;
possible_drag_ = false;
drag_in_progress_ = false;
@@ -517,6 +518,7 @@ void MenuController::Run(Widget* parent,
@@ -608,6 +609,7 @@ void MenuController::Run(Widget* parent,
owner_->AddObserver(this);
native_view_for_gestures_ = native_view_for_gestures;
@ -261,7 +261,7 @@ index 127c58864174e..156ea7b413541 100644
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
// will use the existing one.
@@ -2195,6 +2197,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2239,6 +2241,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
params.do_capture = do_capture;
params.native_view_for_gestures = native_view_for_gestures_;
params.owned_window_anchor = anchor;
@ -269,7 +269,7 @@ index 127c58864174e..156ea7b413541 100644
if (item->GetParentMenuItem()) {
params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -2898,8 +2901,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
@@ -2943,8 +2946,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@ -284,7 +284,7 @@ index 127c58864174e..156ea7b413541 100644
// Show the sub-menu.
SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -2919,8 +2927,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2964,8 +2972,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@ -297,23 +297,23 @@ index 127c58864174e..156ea7b413541 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
index 2dd7c64ce4328..c456df19ddb53 100644
index e10b92be74908..59a12cab09536 100644
--- ui/views/controls/menu/menu_controller.h
+++ ui/views/controls/menu/menu_controller.h
@@ -113,7 +113,9 @@ class VIEWS_EXPORT MenuController
@@ -134,7 +134,9 @@ class VIEWS_EXPORT MenuController
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
- gfx::NativeView native_view_for_gestures = nullptr);
+ gfx::NativeView native_view_for_gestures = nullptr,
- gfx::NativeView native_view_for_gestures = gfx::NativeView());
+ gfx::NativeView native_view_for_gestures = gfx::NativeView(),
+ gfx::AcceleratedWidget parent_widget =
+ gfx::kNullAcceleratedWidget);
bool for_drop() const { return for_drop_; }
@@ -724,6 +726,8 @@ class VIEWS_EXPORT MenuController
@@ -703,6 +705,8 @@ class VIEWS_EXPORT MenuController
// RunType::SEND_GESTURE_EVENTS_TO_OWNER is set.
gfx::NativeView native_view_for_gestures_ = nullptr;
gfx::NativeView native_view_for_gestures_ = gfx::NativeView();
+ gfx::AcceleratedWidget parent_widget_ = gfx::kNullAcceleratedWidget;
+
@ -360,11 +360,11 @@ index b8fa1c116ebcd..015f15ed72385 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
index d246468d9510b..baf6a250bca8d 100644
index 8a2eb859afa1f..c5d4532a1ce68 100644
--- ui/views/controls/menu/menu_host.cc
+++ ui/views/controls/menu/menu_host.cc
@@ -143,6 +143,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
: gfx::kNullNativeWindow;
: gfx::NativeWindow();
params.bounds = init_params.bounds;
+ params.parent_widget = init_params.parent_widget;
@ -383,7 +383,7 @@ index d246468d9510b..baf6a250bca8d 100644
#if BUILDFLAG(IS_WIN)
diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h
index dac3249c247e5..0573e84ac24a4 100644
index c048ab2aa5ae4..810f62eed6676 100644
--- ui/views/controls/menu/menu_host.h
+++ ui/views/controls/menu/menu_host.h
@@ -55,6 +55,8 @@ class MenuHost : public Widget, public WidgetObserver {
@ -396,10 +396,10 @@ index dac3249c247e5..0573e84ac24a4 100644
explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index e235da77b57fb..ef0a2d3c3f303 100644
index f99daa29d9181..49b4a3da021ea 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1115,6 +1115,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -1096,6 +1096,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@ -415,7 +415,7 @@ index e235da77b57fb..ef0a2d3c3f303 100644
} else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1182,6 +1191,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1160,6 +1169,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
}
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@ -430,7 +430,7 @@ index e235da77b57fb..ef0a2d3c3f303 100644
// use the default color.
if (!paint_as_selected && foreground_color_id_.has_value()) {
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index ec8856bfaebfa..53100322e12a0 100644
index 5ae6f3805ebd3..0c6361eac037a 100644
--- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc
@@ -4,6 +4,7 @@
@ -565,13 +565,13 @@ index adb22671b94fa..59cc421e82e1b 100644
bool MenuRunner::IsRunning() const {
diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h
index 9d51c2e38b893..7fbe67198a1e5 100644
index 562b67396f27f..7679dbd79e565 100644
--- ui/views/controls/menu/menu_runner.h
+++ ui/views/controls/menu/menu_runner.h
@@ -152,6 +152,8 @@ class VIEWS_EXPORT MenuRunner {
MenuAnchorPosition anchor,
ui::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures = nullptr,
gfx::NativeView native_view_for_gestures = gfx::NativeView(),
+ gfx::AcceleratedWidget parent_widget =
+ gfx::kNullAcceleratedWidget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt);
@ -716,7 +716,7 @@ index 187e55af5d7be..3a980d26fdaae 100644
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
if (root_location != root_current_location &&
diff --git ui/views/view.h ui/views/view.h
index a37618c6d37ed..6615e4e59db0b 100644
index eec88617b7c9b..b5d77709d0bba 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -21,6 +21,7 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index d770e7b922232..efb97d9a53574 100644
index d7ff9f7303d80..40aa86fe87638 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -657,6 +657,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@@ -640,6 +640,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_;
}
@ -18,7 +18,7 @@ index d770e7b922232..efb97d9a53574 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 7b8afe19a3088..2a2ca57077f73 100644
index aed9a4aaa7c9f..ca312b74c79e4 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -71,6 +71,7 @@ class CursorManager;
@ -29,7 +29,7 @@ index 7b8afe19a3088..2a2ca57077f73 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -141,6 +142,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -135,6 +136,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Size& max_size) override;
void DisableAutoResize(const gfx::Size& new_size) override;
float GetDeviceScaleFactor() const final;
@ -38,7 +38,7 @@ index 7b8afe19a3088..2a2ca57077f73 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
ui::mojom::VirtualKeyboardMode GetVirtualKeyboardMode() override;
@@ -177,6 +180,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -171,6 +174,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
// Called when screen information or native widget bounds change.
virtual void UpdateScreenInfo();
@ -49,7 +49,7 @@ index 7b8afe19a3088..2a2ca57077f73 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_|
@@ -430,6 +437,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -424,6 +431,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0;
@ -62,7 +62,7 @@ index 7b8afe19a3088..2a2ca57077f73 100644
// Sets the cursor for this view to the one specified.
virtual void UpdateCursor(const ui::Cursor& cursor) = 0;
@@ -678,6 +691,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -672,6 +685,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
// to all displays.
gfx::Size system_cursor_size_;
@ -73,7 +73,7 @@ index 7b8afe19a3088..2a2ca57077f73 100644
private:
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
@@ -699,10 +716,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -693,10 +710,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
void SynchronizeVisualProperties();
@ -85,7 +85,7 @@ index 7b8afe19a3088..2a2ca57077f73 100644
// renderer process changes. This method is called before notifying
// RenderWidgetHostImpl in order to allow the view to allocate a new
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index bef7961f8b227..72e064659fbda 100644
index c611cb3bd15b2..ee6b5407f50cb 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -52,6 +52,10 @@ namespace {
@ -99,7 +99,7 @@ index bef7961f8b227..72e064659fbda 100644
#if BUILDFLAG(IS_WIN)
// A callback function for EnumThreadWindows to enumerate and dismiss
// any owned popup windows.
@@ -862,6 +866,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
@@ -868,6 +872,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
}
return;
}
@ -114,7 +114,7 @@ index bef7961f8b227..72e064659fbda 100644
#endif
synthetic_move_position_ = center_in_screen;
}
@@ -891,6 +903,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
@@ -897,6 +909,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
}
void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@ -133,10 +133,10 @@ index bef7961f8b227..72e064659fbda 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 c4cb1c13fc35c..a9371d66f3f9c 100644
index d7e649d5590ab..baff410b4e0c6 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 {
@@ -259,6 +259,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
// This must always return the same device scale factor as GetScreenInfo.
virtual float GetDeviceScaleFactor() const = 0;
@ -166,7 +166,7 @@ index 7ebbdf4700a63..0e09252466b82 100644
req.y = bounds_in_pixels_.y();
req.width = bounds_in_pixels_.width();
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index 4d15a5c0937e6..9db89f2ac8d91 100644
index e4e6d3104da9e..bb372b0cd2960 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
+++ ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -23,6 +23,8 @@ DesktopScreenWin::~DesktopScreenWin() {
@ -243,7 +243,7 @@ index 01d4ffe408a84..fbe41fefbb2bd 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
};
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index d676ba8d52c54..df78950ec1381 100644
index e589b36f45df8..6b25e64bee95a 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -280,8 +280,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
@ -359,10 +359,10 @@ index 2e4bacce52a45..76916c5d21cb9 100644
// the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 1f1b98525de2f..053a93a98c909 100644
index e3355509996d0..4cd3bd85ce94b 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -367,7 +367,8 @@ void Widget::Init(InitParams params) {
@@ -368,7 +368,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -372,7 +372,7 @@ index 1f1b98525de2f..053a93a98c909 100644
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) {
@@ -467,13 +468,21 @@ void Widget::Init(InitParams params) {
@@ -468,13 +469,21 @@ void Widget::Init(InitParams params) {
if (show_state == ui::SHOW_STATE_MAXIMIZED) {
Maximize();
@ -413,12 +413,12 @@ index 1f1b98525de2f..053a93a98c909 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index da0ed1c82d3cf..21cb551cd7852 100644
index 62d8dc50f08f2..c4481a5002013 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -351,6 +351,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the concept with bubble anchoring a la BubbleDialogDelegateView.
gfx::NativeView parent = nullptr;
gfx::NativeView parent = gfx::NativeView();
+ gfx::AcceleratedWidget parent_widget = gfx::kNullAcceleratedWidget;
+
@ -426,7 +426,7 @@ index da0ed1c82d3cf..21cb551cd7852 100644
// 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
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 56c992edca67a..21cee8b517edd 100644
index 6d22d8f082c55..8a959d9aea0eb 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate
@ -455,10 +455,10 @@ index 3b9b00b7d79ae..e759e3c1a9f34 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index bde6bc5a8a3ad..653a71d1c26d3 100644
index 60e4436e29b8e..952ae51938ab4 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -939,8 +939,12 @@ bool HWNDMessageHandler::IsActive() const {
@@ -940,8 +940,12 @@ bool HWNDMessageHandler::IsActive() const {
// In headless mode return expected activation state instead of the
// actual one. This ensures that onfocus/onblur notifications work
// as expected and no unexpected throttling occurs.
@ -472,7 +472,7 @@ index bde6bc5a8a3ad..653a71d1c26d3 100644
}
bool HWNDMessageHandler::IsMinimized() const {
@@ -3318,10 +3322,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3336,10 +3340,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@ -54,10 +54,10 @@ index 5eeaadec9773f..93a716decfbb9 100644
#endif
diff --git components/viz/host/layered_window_updater_impl.cc components/viz/host/layered_window_updater_impl.cc
index 271486b45dcc8..a62210d8ca3c8 100644
index 8f726bde2cb5d..0737835d1e9d1 100644
--- components/viz/host/layered_window_updater_impl.cc
+++ components/viz/host/layered_window_updater_impl.cc
@@ -44,7 +44,7 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory(
@@ -46,7 +46,7 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory(
// |region|'s handle will close when it goes out of scope.
}
@ -80,7 +80,7 @@ index 8af69cac78b74..9f74e511c263d 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 5583233391b21..d02bc281fc96e 100644
index ef3c8ba80dd34..1088d6e3c5797 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -228,6 +228,8 @@ viz_component("service") {
@ -134,10 +134,10 @@ index 0bc450ca4faf2..bdbdca76246c6 100644
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
display_client);
diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc
index d4d4c1444e7a1..d62a3939a31fa 100644
index 796ae2688436e..37a3406790210 100644
--- components/viz/service/display_embedder/software_output_device_win.cc
+++ components/viz/service/display_embedder/software_output_device_win.cc
@@ -192,8 +192,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
@@ -193,8 +193,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
if (!canvas_)
return;
@ -150,10 +150,10 @@ index d4d4c1444e7a1..d62a3939a31fa 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 ea2888e6e6ce0..2461e0dcb2038 100644
index c86f1e090cb84..22df6791b7139 100644
--- content/browser/compositor/viz_process_transport_factory.cc
+++ content/browser/compositor/viz_process_transport_factory.cc
@@ -401,8 +401,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -395,8 +395,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();

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 f36fb125659ff..7bd78b680ae4b 100644
index 4efa2e72fdc34..1319dfa2c2b2f 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3216,6 +3216,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3242,6 +3242,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 f36fb125659ff..7bd78b680ae4b 100644
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3226,6 +3232,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3252,6 +3258,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@ -23,7 +23,7 @@ index f36fb125659ff..7bd78b680ae4b 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3406,6 +3413,9 @@ void WebContentsImpl::RenderWidgetCreated(
@@ -3441,6 +3448,9 @@ void WebContentsImpl::RenderWidgetCreated(
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
"render_widget_host", render_widget_host);
created_widgets_.insert(render_widget_host);
@ -33,7 +33,7 @@ index f36fb125659ff..7bd78b680ae4b 100644
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -4134,6 +4144,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4170,6 +4180,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options);
}
@ -49,7 +49,7 @@ index f36fb125659ff..7bd78b680ae4b 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.
@@ -8051,6 +8070,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -8117,6 +8136,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// frames).
SetFocusedFrameTree(&node->frame_tree());
}
@ -60,10 +60,10 @@ index f36fb125659ff..7bd78b680ae4b 100644
void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index c998b0813ca04..6f8376bfb3ab7 100644
index ea1643f689885..6cf095a71303b 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -96,10 +96,12 @@ class BrowserContext;
@@ -97,10 +97,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@ -76,7 +76,7 @@ index c998b0813ca04..6f8376bfb3ab7 100644
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -242,6 +244,10 @@ class WebContents : public PageNavigator,
@@ -243,6 +245,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
@ -88,7 +88,7 @@ index c998b0813ca04..6f8376bfb3ab7 100644
// the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 5da6f93293bc5..349ae25c0af08 100644
index c5bda327264c3..4b82e0c9ff345 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -59,9 +59,11 @@ class EyeDropperListener;
@ -119,7 +119,7 @@ index 5da6f93293bc5..349ae25c0af08 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 977cd925f574c..43d6c1e953e94 100644
index 9694d1854873e..ae7327bd8d80b 100644
--- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h
@@ -220,6 +220,9 @@ class CONTENT_EXPORT WebContentsObserver {
@ -132,7 +132,7 @@ index 977cd925f574c..43d6c1e953e94 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() {}
@@ -812,6 +815,10 @@ class CONTENT_EXPORT WebContentsObserver {
@@ -817,6 +820,10 @@ class CONTENT_EXPORT WebContentsObserver {
// 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 1620ec518a7ef..3a636e9298fff 100644
index 2d99d8aff36e3..eafd224d24ed1 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -781,6 +781,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -775,6 +775,11 @@ class BLINK_PLATFORM_EXPORT Platform {
}
#endif

View File

@ -11,10 +11,10 @@ index 8a18ecf567cd3..9697d43bbbfb9 100644
// Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0;
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index a1bcdb3b7ceb5..321a5fac3b4e4 100644
index 3fd94156edd98..b5552b362519a 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -250,8 +250,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@ -30,7 +30,7 @@ index a1bcdb3b7ceb5..321a5fac3b4e4 100644
}
namespace {
@@ -571,6 +576,7 @@ WebViewImpl::WebViewImpl(
@@ -572,6 +577,7 @@ WebViewImpl::WebViewImpl(
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
@ -39,7 +39,7 @@ index a1bcdb3b7ceb5..321a5fac3b4e4 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 cce09d720fda1..c723dcdb1ff73 100644
index 6a180620e00c7..09d11bfd3c83f 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -137,7 +137,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@ -52,7 +52,7 @@ index cce09d720fda1..c723dcdb1ff73 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -851,6 +852,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -853,6 +854,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false;

View File

@ -1,8 +1,8 @@
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
index 4d566d8c23762..84ac469ac3170 100644
index 490ecf09ab473..58340ea8a3921 100644
--- sandbox/policy/win/sandbox_win.cc
+++ sandbox/policy/win/sandbox_win.cc
@@ -967,6 +967,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -975,6 +975,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
const base::HandlesToInheritVector& handles_to_inherit,
SandboxDelegate* delegate,
base::Process* process) {