Update to Chromium version 113.0.5672.0 (#1121455)

This commit is contained in:
Marshall Greenblatt 2023-04-04 14:00:13 -04:00
parent c83b3cda24
commit 4b3c3132cb
76 changed files with 617 additions and 645 deletions

View File

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

View File

@ -74,7 +74,7 @@
#endif #endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
#include "components/os_crypt/os_crypt.h" #include "components/os_crypt/sync/os_crypt.h"
#endif #endif
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -83,7 +83,7 @@
#include "chrome/browser/ui/views/theme_profile_key.h" #include "chrome/browser/ui/views/theme_profile_key.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/grit/chromium_strings.h" #include "chrome/grit/chromium_strings.h"
#include "components/os_crypt/key_storage_config_linux.h" #include "components/os_crypt/sync/key_storage_config_linux.h"
#include "libcef/browser/printing/print_dialog_linux.h" #include "libcef/browser/printing/print_dialog_linux.h"
#include "ui/base/cursor/cursor_factory.h" #include "ui/base/cursor/cursor_factory.h"
#include "ui/base/ime/input_method.h" #include "ui/base/ime/input_method.h"

View File

@ -89,6 +89,7 @@
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" #include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
#include "components/pdf/browser/pdf_web_contents_helper.h" #include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/pdf/common/internal_plugin_helpers.h" #include "components/pdf/common/internal_plugin_helpers.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/spellcheck/common/spellcheck.mojom.h" #include "components/spellcheck/common/spellcheck.mojom.h"
#include "components/version_info/version_info.h" #include "components/version_info/version_info.h"
#include "content/browser/plugin_service_impl.h" #include "content/browser/plugin_service_impl.h"
@ -923,8 +924,10 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
Profile* profile = Profile::FromBrowserContext(browser_context); Profile* profile = Profile::FromBrowserContext(browser_context);
chrome::mojom::DynamicParams dynamic_params = { chrome::mojom::DynamicParams dynamic_params = {
profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch), profile->GetPrefs()->GetBoolean(
profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict), policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)}; profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)};
result.push_back( result.push_back(
std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params))); std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params)));

View File

@ -32,6 +32,7 @@
#include "content/public/browser/network_service_instance.h" #include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "net/log/net_log_capture_mode.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/network_switches.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
@ -143,6 +144,11 @@ void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
NOTREACHED(); NOTREACHED();
} }
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
NOTREACHED();
return nullptr;
}
metrics_services_manager::MetricsServicesManager* metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() { ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
NOTREACHED(); NOTREACHED();
@ -222,6 +228,11 @@ ChromeBrowserProcessAlloy::notification_platform_bridge() {
return nullptr; return nullptr;
} }
void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
NOTREACHED();
}
policy::ChromeBrowserPolicyConnector* policy::ChromeBrowserPolicyConnector*
ChromeBrowserProcessAlloy::browser_policy_connector() { ChromeBrowserProcessAlloy::browser_policy_connector() {
if (!browser_policy_connector_) { if (!browser_policy_connector_) {
@ -416,12 +427,6 @@ ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
return nullptr; return nullptr;
} }
breadcrumbs::BreadcrumbPersistentStorageManager*
ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() {
NOTREACHED();
return nullptr;
}
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() { HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
NOTREACHED(); NOTREACHED();
return nullptr; return nullptr;

View File

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

View File

@ -69,9 +69,9 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {} TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {}
ExtensionFunction::ResponseAction TabsCreateFunction::Run() { ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
std::unique_ptr<tabs::Create::Params> params( absl::optional<tabs::Create::Params> params =
tabs::Create::Params::Create(args())); tabs::Create::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params.get()); EXTENSION_FUNCTION_VALIDATE(params);
CefExtensionFunctionDetails::OpenTabParams options; CefExtensionFunctionDetails::OpenTabParams options;
options.window_id = params->create_properties.window_id; options.window_id = params->create_properties.window_id;
@ -108,9 +108,9 @@ content::WebContents* BaseAPIFunction::GetWebContents(int tab_id) {
} }
ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
std::unique_ptr<tabs::Update::Params> params( absl::optional<tabs::Update::Params> params =
tabs::Update::Params::Create(args())); tabs::Update::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params.get()); EXTENSION_FUNCTION_VALIDATE(params);
tab_id_ = params->tab_id ? *params->tab_id : -1; tab_id_ = params->tab_id ? *params->tab_id : -1;
content::WebContents* web_contents = GetWebContents(tab_id_); content::WebContents* web_contents = GetWebContents(tab_id_);
@ -195,8 +195,8 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
int tab_id, int tab_id,
std::string* error) { std::string* error) {
GURL url; GURL url;
auto url_expected = auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
ExtensionTabUtil::PrepareURLForNavigation(url_string, extension()); url_string, extension(), browser_context());
if (url_expected.has_value()) { if (url_expected.has_value()) {
url = *url_expected; url = *url_expected;
} else { } else {
@ -278,7 +278,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
return set_init_result(VALIDATION_FAILURE); return set_init_result(VALIDATION_FAILURE);
} }
std::unique_ptr<InjectDetails> details(new InjectDetails()); std::unique_ptr<InjectDetails> details(new InjectDetails());
if (!InjectDetails::Populate(details_value, details.get())) { if (!InjectDetails::Populate(details_value.GetDict(), *details)) {
return set_init_result(VALIDATION_FAILURE); return set_init_result(VALIDATION_FAILURE);
} }
@ -419,8 +419,8 @@ bool TabsRemoveCSSFunction::ShouldRemoveCSS() const {
} }
ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() { ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
std::unique_ptr<tabs::SetZoom::Params> params( absl::optional<tabs::SetZoom::Params> params =
tabs::SetZoom::Params::Create(args())); tabs::SetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params); EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1; int tab_id = params->tab_id ? *params->tab_id : -1;
@ -451,8 +451,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
} }
ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() { ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
std::unique_ptr<tabs::GetZoom::Params> params( absl::optional<tabs::GetZoom::Params> params =
tabs::GetZoom::Params::Create(args())); tabs::GetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params); EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1; int tab_id = params->tab_id ? *params->tab_id : -1;
@ -471,8 +471,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() { ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings; using api::tabs::ZoomSettings;
std::unique_ptr<tabs::SetZoomSettings::Params> params( absl::optional<tabs::SetZoomSettings::Params> params =
tabs::SetZoomSettings::Params::Create(args())); tabs::SetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params); EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1; int tab_id = params->tab_id ? *params->tab_id : -1;
@ -522,8 +522,8 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
} }
ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() { ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
std::unique_ptr<tabs::GetZoomSettings::Params> params( absl::optional<tabs::GetZoomSettings::Params> params =
tabs::GetZoomSettings::Params::Create(args())); tabs::GetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params); EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1; int tab_id = params->tab_id ? *params->tab_id : -1;

View File

@ -325,7 +325,7 @@ std::unique_ptr<api::tabs::Tab> CefExtensionFunctionDetails::OpenTab(
GURL url; GURL url;
if (params.url.has_value()) { if (params.url.has_value()) {
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation( auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
*params.url, function()->extension()); *params.url, function()->extension(), function()->browser_context());
if (url_expected.has_value()) { if (url_expected.has_value()) {
url = *url_expected; url = *url_expected;
} else { } else {

View File

@ -385,9 +385,13 @@ int CefMainRunner::ContentMainInitialize(const CefMainArgs& args,
bool CefMainRunner::ContentMainRun(bool* initialized, bool CefMainRunner::ContentMainRun(bool* initialized,
base::OnceClosure context_initialized) { base::OnceClosure context_initialized) {
main_delegate_->BeforeMainThreadRun(); main_delegate_->BeforeMainThreadRun(multi_threaded_message_loop_);
if (multi_threaded_message_loop_) { if (multi_threaded_message_loop_) {
// Detach the CommandLine from the main thread so that it can be
// attached and modified from the UI thread going forward.
base::CommandLine::ForCurrentProcess()->DetachFromCurrentSequence();
base::WaitableEvent uithread_startup_event( base::WaitableEvent uithread_startup_event(
base::WaitableEvent::ResetPolicy::AUTOMATIC, base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED); base::WaitableEvent::InitialState::NOT_SIGNALED);

View File

@ -23,7 +23,6 @@
#include "third_party/blink/public/common/input/web_input_event.h" #include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h" #include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h" #include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#import "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h" #import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
#include "ui/events/base_event_utils.h" #include "ui/events/base_event_utils.h"
@ -439,8 +438,7 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetScreenPoint(
NSPoint view_pt = {static_cast<CGFloat>(view.x()), NSPoint view_pt = {static_cast<CGFloat>(view.x()),
bounds.size.height - static_cast<CGFloat>(view.y())}; bounds.size.height - static_cast<CGFloat>(view.y())};
NSPoint window_pt = [nsview convertPoint:view_pt toView:nil]; NSPoint window_pt = [nsview convertPoint:view_pt toView:nil];
NSPoint screen_pt = NSPoint screen_pt = [[nsview window] convertPointToScreen:window_pt];
ui::ConvertPointFromWindowToScreen([nsview window], window_pt);
return gfx::Point(screen_pt.x, screen_pt.y); return gfx::Point(screen_pt.x, screen_pt.y);
} }
return gfx::Point(); return gfx::Point();

View File

@ -35,7 +35,6 @@
#include "chrome/browser/ui/webui/print_preview/policy_settings.h" #include "chrome/browser/ui/webui/print_preview/policy_settings.h"
#include "chrome/common/buildflags.h" #include "chrome/common/buildflags.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/net/safe_search_util.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/grit/locale_settings.h" #include "chrome/grit/locale_settings.h"
#include "components/certificate_transparency/pref_names.h" #include "components/certificate_transparency/pref_names.h"
@ -48,6 +47,7 @@
#include "components/language/core/browser/language_prefs.h" #include "components/language/core/browser/language_prefs.h"
#include "components/language/core/browser/pref_names.h" #include "components/language/core/browser/pref_names.h"
#include "components/permissions/permission_actions_history.h" #include "components/permissions/permission_actions_history.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h" #include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/json_pref_store.h" #include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h" #include "components/prefs/pref_filter.h"
@ -57,6 +57,7 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.h" #include "components/proxy_config/proxy_config_dictionary.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_search_api/safe_search_util.h"
#include "components/spellcheck/browser/pref_names.h" #include "components/spellcheck/browser/pref_names.h"
#include "components/sync_preferences/pref_service_syncable.h" #include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_preferences/pref_service_syncable_factory.h" #include "components/sync_preferences/pref_service_syncable_factory.h"
@ -69,7 +70,7 @@
#include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
#include "components/os_crypt/os_crypt.h" #include "components/os_crypt/sync/os_crypt.h"
#endif #endif
#if BUILDFLAG(ENABLE_SUPERVISED_USERS) #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
@ -281,9 +282,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
// Print preferences. // Print preferences.
// Based on ProfileImpl::RegisterProfilePrefs. // Based on ProfileImpl::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false); registry->RegisterBooleanPref(policy::policy_prefs::kForceGoogleSafeSearch,
registry->RegisterIntegerPref(prefs::kForceYouTubeRestrict, false);
safe_search_util::YOUTUBE_RESTRICT_OFF); registry->RegisterIntegerPref(policy::policy_prefs::kForceYouTubeRestrict,
safe_search_api::YOUTUBE_RESTRICT_OFF);
registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string()); registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true); registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled,

View File

@ -32,7 +32,8 @@ void AlloyMainRunnerDelegate::BeforeMainThreadInitialize(
g_browser_process = new ChromeBrowserProcessAlloy(); g_browser_process = new ChromeBrowserProcessAlloy();
} }
void AlloyMainRunnerDelegate::BeforeMainThreadRun() { void AlloyMainRunnerDelegate::BeforeMainThreadRun(
bool multi_threaded_message_loop) {
static_cast<ChromeBrowserProcessAlloy*>(g_browser_process)->Initialize(); static_cast<ChromeBrowserProcessAlloy*>(g_browser_process)->Initialize();
} }

View File

@ -31,7 +31,7 @@ class AlloyMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides. // CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override; content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override; void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun() override; void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void AfterUIThreadInitialize() override; void AfterUIThreadInitialize() override;
void AfterUIThreadShutdown() override; void AfterUIThreadShutdown() override;
void BeforeMainThreadShutdown() override; void BeforeMainThreadShutdown() override;

View File

@ -15,6 +15,7 @@
#include "chrome/common/profiler/main_thread_stack_sampling_profiler.h" #include "chrome/common/profiler/main_thread_stack_sampling_profiler.h"
#include "components/keep_alive_registry/keep_alive_types.h" #include "components/keep_alive_registry/keep_alive_types.h"
#include "components/keep_alive_registry/scoped_keep_alive.h" #include "components/keep_alive_registry/scoped_keep_alive.h"
#include "components/metrics/persistent_system_profile.h"
ChromeMainRunnerDelegate::ChromeMainRunnerDelegate( ChromeMainRunnerDelegate::ChromeMainRunnerDelegate(
CefMainRunnerHandler* runner, CefMainRunnerHandler* runner,
@ -42,6 +43,16 @@ void ChromeMainRunnerDelegate::BeforeMainThreadInitialize(
#endif #endif
} }
void ChromeMainRunnerDelegate::BeforeMainThreadRun(
bool multi_threaded_message_loop) {
if (multi_threaded_message_loop) {
// Detach from the main thread so that these objects can be attached and
// modified from the UI thread going forward.
metrics::GlobalPersistentSystemProfile::GetInstance()
->DetachFromCurrentThread();
}
}
void ChromeMainRunnerDelegate::BeforeMainMessageLoopRun( void ChromeMainRunnerDelegate::BeforeMainMessageLoopRun(
base::RunLoop* run_loop) { base::RunLoop* run_loop) {
// The ScopedKeepAlive instance triggers shutdown logic when released on the // The ScopedKeepAlive instance triggers shutdown logic when released on the

View File

@ -33,6 +33,7 @@ class ChromeMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides. // CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override; content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override; void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void BeforeMainMessageLoopRun(base::RunLoop* run_loop) override; void BeforeMainMessageLoopRun(base::RunLoop* run_loop) override;
bool HandleMainMessageLoopQuit() override; bool HandleMainMessageLoopQuit() override;
void BeforeUIThreadInitialize() override; void BeforeUIThreadInitialize() override;

View File

@ -21,7 +21,7 @@ class CefMainRunnerDelegate {
virtual content::ContentMainDelegate* GetContentMainDelegate() = 0; virtual content::ContentMainDelegate* GetContentMainDelegate() = 0;
virtual void BeforeMainThreadInitialize(const CefMainArgs& args) {} virtual void BeforeMainThreadInitialize(const CefMainArgs& args) {}
virtual void BeforeMainThreadRun() {} virtual void BeforeMainThreadRun(bool multi_threaded_message_loop) {}
virtual void BeforeMainMessageLoopRun(base::RunLoop* run_loop) {} virtual void BeforeMainMessageLoopRun(base::RunLoop* run_loop) {}
virtual bool HandleMainMessageLoopQuit() { return false; } virtual bool HandleMainMessageLoopQuit() { return false; }
virtual void BeforeUIThreadInitialize() {} virtual void BeforeUIThreadInitialize() {}

View File

@ -34,10 +34,11 @@
#include "libcef/renderer/render_frame_util.h" #include "libcef/renderer/render_frame_util.h"
#include "libcef/renderer/thread_util.h" #include "libcef/renderer/thread_util.h"
#include "base/auto_reset.h"
#include "base/functional/bind.h" #include "base/functional/bind.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/threading/thread_local.h" #include "third_party/abseil-cpp/absl/base/attributes.h"
#include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/web_frame.h" #include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame.h"
@ -83,20 +84,34 @@ bool GetPrivate(v8::Local<v8::Context> context,
.ToLocal(result); .ToLocal(result);
} }
// Chromium uses the default Isolate for the main render process thread and a
// new Isolate for each WebWorker thread. Continue this pattern by tracking
// Isolate information on a per-thread basis. This implementation will need to
// be re-worked (perhaps using a map keyed on v8::Isolate::GetCurrent()) if
// in the future Chromium begins using the same Isolate across multiple threads.
class CefV8IsolateManager;
ABSL_CONST_INIT thread_local CefV8IsolateManager* g_isolate_manager = nullptr;
// Manages memory and state information associated with a single Isolate. // Manages memory and state information associated with a single Isolate.
class CefV8IsolateManager { class CefV8IsolateManager {
public: public:
CefV8IsolateManager() CefV8IsolateManager()
: isolate_(v8::Isolate::GetCurrent()), : resetter_(&g_isolate_manager, this),
isolate_(v8::Isolate::GetCurrent()),
task_runner_(CEF_RENDER_TASK_RUNNER()), task_runner_(CEF_RENDER_TASK_RUNNER()),
message_listener_registered_(false), message_listener_registered_(false),
worker_id_(0) { worker_id_(0) {
DCHECK(isolate_); DCHECK(isolate_);
DCHECK(task_runner_.get()); DCHECK(task_runner_.get());
} }
~CefV8IsolateManager() { ~CefV8IsolateManager() = default;
static CefV8IsolateManager* Get() { return g_isolate_manager; }
void Destroy() {
DCHECK_EQ(isolate_, v8::Isolate::GetCurrent()); DCHECK_EQ(isolate_, v8::Isolate::GetCurrent());
DCHECK(context_map_.empty()); DCHECK(context_map_.empty());
delete this;
} }
scoped_refptr<CefV8ContextState> GetContextState( scoped_refptr<CefV8ContextState> GetContextState(
@ -175,6 +190,8 @@ class CefV8IsolateManager {
const GURL& worker_url() const { return worker_url_; } const GURL& worker_url() const { return worker_url_; }
private: private:
const base::AutoReset<CefV8IsolateManager*> resetter_;
v8::Isolate* isolate_; v8::Isolate* isolate_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
@ -193,43 +210,6 @@ class CefV8IsolateManager {
GURL worker_url_; GURL worker_url_;
}; };
// Chromium uses the default Isolate for the main render process thread and a
// new Isolate for each WebWorker thread. Continue this pattern by tracking
// Isolate information on a per-thread basis. This implementation will need to
// be re-worked (perhaps using a map keyed on v8::Isolate::GetCurrent()) if
// in the future Chromium begins using the same Isolate across multiple threads.
class CefV8StateManager {
public:
CefV8StateManager() {}
void CreateIsolateManager() {
DCHECK(!current_tls_.Get());
current_tls_.Set(new CefV8IsolateManager());
}
void DestroyIsolateManager() {
DCHECK(current_tls_.Get());
delete current_tls_.Get();
current_tls_.Set(nullptr);
}
CefV8IsolateManager* GetIsolateManager() {
CefV8IsolateManager* manager = current_tls_.Get();
DCHECK(manager);
return manager;
}
private:
base::ThreadLocalPointer<CefV8IsolateManager> current_tls_;
};
base::LazyInstance<CefV8StateManager>::Leaky g_v8_state =
LAZY_INSTANCE_INITIALIZER;
CefV8IsolateManager* GetIsolateManager() {
return g_v8_state.Pointer()->GetIsolateManager();
}
class V8TrackObject : public CefTrackNode { class V8TrackObject : public CefTrackNode {
public: public:
explicit V8TrackObject(v8::Isolate* isolate) explicit V8TrackObject(v8::Isolate* isolate)
@ -810,7 +790,7 @@ void MessageListenerCallbackImpl(v8::Handle<v8::Message> message,
return; return;
} }
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext(); CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext();
v8::Local<v8::StackTrace> v8Stack = message->GetStackTrace(); v8::Local<v8::StackTrace> v8Stack = message->GetStackTrace();
CefRefPtr<CefV8StackTrace> stackTrace = CefRefPtr<CefV8StackTrace> stackTrace =
@ -831,23 +811,24 @@ void MessageListenerCallbackImpl(v8::Handle<v8::Message> message,
// Global functions. // Global functions.
void CefV8IsolateCreated() { void CefV8IsolateCreated() {
g_v8_state.Pointer()->CreateIsolateManager(); new CefV8IsolateManager();
} }
void CefV8IsolateDestroyed() { void CefV8IsolateDestroyed() {
g_v8_state.Pointer()->DestroyIsolateManager(); auto* isolate_manager = CefV8IsolateManager::Get();
isolate_manager->Destroy();
} }
void CefV8ReleaseContext(v8::Local<v8::Context> context) { void CefV8ReleaseContext(v8::Local<v8::Context> context) {
GetIsolateManager()->ReleaseContext(context); CefV8IsolateManager::Get()->ReleaseContext(context);
} }
void CefV8SetUncaughtExceptionStackSize(int stack_size) { void CefV8SetUncaughtExceptionStackSize(int stack_size) {
GetIsolateManager()->SetUncaughtExceptionStackSize(stack_size); CefV8IsolateManager::Get()->SetUncaughtExceptionStackSize(stack_size);
} }
void CefV8SetWorkerAttributes(int worker_id, const GURL& worker_url) { void CefV8SetWorkerAttributes(int worker_id, const GURL& worker_url) {
GetIsolateManager()->SetWorkerAttributes(worker_id, worker_url); CefV8IsolateManager::Get()->SetWorkerAttributes(worker_id, worker_url);
} }
bool CefRegisterExtension(const CefString& extension_name, bool CefRegisterExtension(const CefString& extension_name,
@ -856,7 +837,7 @@ bool CefRegisterExtension(const CefString& extension_name,
// Verify that this method was called on the correct thread. // Verify that this method was called on the correct thread.
CEF_REQUIRE_RT_RETURN(false); CEF_REQUIRE_RT_RETURN(false);
CefV8IsolateManager* isolate_manager = GetIsolateManager(); auto* isolate_manager = CefV8IsolateManager::Get();
V8TrackString* name = new V8TrackString(extension_name); V8TrackString* name = new V8TrackString(extension_name);
isolate_manager->AddGlobalTrackObject(name); isolate_manager->AddGlobalTrackObject(name);
@ -879,7 +860,7 @@ bool CefRegisterExtension(const CefString& extension_name,
// Helper macros // Helper macros
#define CEF_V8_HAS_ISOLATE() (!!GetIsolateManager()) #define CEF_V8_HAS_ISOLATE() (!!CefV8IsolateManager::Get())
#define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \ #define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \
if (!CEF_V8_HAS_ISOLATE()) { \ if (!CEF_V8_HAS_ISOLATE()) { \
NOTREACHED() << "V8 isolate is not valid"; \ NOTREACHED() << "V8 isolate is not valid"; \
@ -929,7 +910,7 @@ CefV8HandleBase::CefV8HandleBase(v8::Isolate* isolate,
: isolate_(isolate) { : isolate_(isolate) {
DCHECK(isolate_); DCHECK(isolate_);
CefV8IsolateManager* manager = GetIsolateManager(); CefV8IsolateManager* manager = CefV8IsolateManager::Get();
DCHECK(manager); DCHECK(manager);
DCHECK_EQ(isolate_, manager->isolate()); DCHECK_EQ(isolate_, manager->isolate());
@ -943,7 +924,7 @@ CefV8HandleBase::CefV8HandleBase(v8::Isolate* isolate,
CefRefPtr<CefV8Context> CefV8Context::GetCurrentContext() { CefRefPtr<CefV8Context> CefV8Context::GetCurrentContext() {
CefRefPtr<CefV8Context> context; CefRefPtr<CefV8Context> context;
CEF_V8_REQUIRE_ISOLATE_RETURN(context); CEF_V8_REQUIRE_ISOLATE_RETURN(context);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
if (isolate->InContext()) { if (isolate->InContext()) {
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
context = new CefV8ContextImpl(isolate, isolate->GetCurrentContext()); context = new CefV8ContextImpl(isolate, isolate->GetCurrentContext());
@ -955,7 +936,7 @@ CefRefPtr<CefV8Context> CefV8Context::GetCurrentContext() {
CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext() { CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext() {
CefRefPtr<CefV8Context> context; CefRefPtr<CefV8Context> context;
CEF_V8_REQUIRE_ISOLATE_RETURN(context); CEF_V8_REQUIRE_ISOLATE_RETURN(context);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
if (isolate->InContext()) { if (isolate->InContext()) {
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
context = context =
@ -967,7 +948,7 @@ CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext() {
// static // static
bool CefV8Context::InContext() { bool CefV8Context::InContext() {
CEF_V8_REQUIRE_ISOLATE_RETURN(false); CEF_V8_REQUIRE_ISOLATE_RETURN(false);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
return isolate->InContext(); return isolate->InContext();
} }
@ -1179,7 +1160,7 @@ CefV8ValueImpl::Handle::~Handle() {
context_state_->DeleteTrackObject(tracker_); context_state_->DeleteTrackObject(tracker_);
} }
} else { } else {
GetIsolateManager()->DeleteGlobalTrackObject(tracker_); CefV8IsolateManager::Get()->DeleteGlobalTrackObject(tracker_);
} }
} else { } else {
delete tracker_; delete tracker_;
@ -1235,7 +1216,7 @@ void CefV8ValueImpl::Handle::SetWeakIfNecessary() {
// |tracker_| will be deleted when: // |tracker_| will be deleted when:
// A. The process shuts down, or // A. The process shuts down, or
// B. SecondWeakCallback is called for the weak handle. // B. SecondWeakCallback is called for the weak handle.
GetIsolateManager()->AddGlobalTrackObject(tracker_); CefV8IsolateManager::Get()->AddGlobalTrackObject(tracker_);
} }
} }
@ -1268,7 +1249,7 @@ void CefV8ValueImpl::Handle::SecondWeakCallback(
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() { CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitUndefined(); impl->InitUndefined();
return impl.get(); return impl.get();
@ -1277,7 +1258,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateUndefined() {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateNull() { CefRefPtr<CefV8Value> CefV8Value::CreateNull() {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitNull(); impl->InitNull();
return impl.get(); return impl.get();
@ -1286,7 +1267,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateNull() {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) { CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitBool(value); impl->InitBool(value);
return impl.get(); return impl.get();
@ -1295,7 +1276,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateBool(bool value) {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) { CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitInt(value); impl->InitInt(value);
return impl.get(); return impl.get();
@ -1304,7 +1285,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateInt(int32 value) {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) { CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitUInt(value); impl->InitUInt(value);
return impl.get(); return impl.get();
@ -1313,7 +1294,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateUInt(uint32 value) {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) { CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitDouble(value); impl->InitDouble(value);
return impl.get(); return impl.get();
@ -1322,7 +1303,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateDouble(double value) {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateDate(CefBaseTime value) { CefRefPtr<CefV8Value> CefV8Value::CreateDate(CefBaseTime value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
impl->InitDate(value); impl->InitDate(value);
return impl.get(); return impl.get();
@ -1331,7 +1312,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateDate(CefBaseTime value) {
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreateString(const CefString& value) { CefRefPtr<CefV8Value> CefV8Value::CreateString(const CefString& value) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate); CefRefPtr<CefV8ValueImpl> impl = new CefV8ValueImpl(isolate);
CefString str(value); CefString str(value);
impl->InitString(str); impl->InitString(str);
@ -1344,7 +1325,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
CefRefPtr<CefV8Interceptor> interceptor) { CefRefPtr<CefV8Interceptor> interceptor) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
@ -1395,7 +1376,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) { CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
@ -1426,7 +1407,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArrayBuffer(
CefRefPtr<CefV8ArrayBufferReleaseCallback> release_callback) { CefRefPtr<CefV8ArrayBufferReleaseCallback> release_callback) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) { if (context.IsEmpty()) {
@ -1476,7 +1457,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
return nullptr; return nullptr;
} }
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
@ -1520,7 +1501,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
// static // static
CefRefPtr<CefV8Value> CefV8Value::CreatePromise() { CefRefPtr<CefV8Value> CefV8Value::CreatePromise() {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext(); v8::Local<v8::Context> context = isolate->GetCurrentContext();
@ -2626,7 +2607,7 @@ bool CefV8ValueImpl::HasCaught(v8::Local<v8::Context> context,
CefRefPtr<CefV8StackTrace> CefV8StackTrace::GetCurrent(int frame_limit) { CefRefPtr<CefV8StackTrace> CefV8StackTrace::GetCurrent(int frame_limit) {
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::Isolate* isolate = CefV8IsolateManager::Get()->isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace( v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(
isolate, frame_limit, v8::StackTrace::kDetailed); isolate, frame_limit, v8::StackTrace::kDetailed);

View File

@ -390,14 +390,6 @@ patches = [
# when extensions are disabled. # when extensions are disabled.
'name': 'extensions_1947', 'name': 'extensions_1947',
}, },
{
# macOS: Fix undesirable switch to discrete GPU during startup.
# https://github.com/chromiumembedded/cef/issues/2398
#
# macOS: Rely on symlinks to find the Libraries directory.
# https://bugs.chromium.org/p/chromium/issues/detail?id=757974#c23
'name': 'mac_gpu',
},
{ {
# macOS: Make the NativeEventProcessor protocol dependency optional. # macOS: Make the NativeEventProcessor protocol dependency optional.
# https://github.com/chromiumembedded/cef/issues/2539 # https://github.com/chromiumembedded/cef/issues/2539
@ -614,13 +606,13 @@ patches = [
'name': 'blink_web_element_4200240' 'name': 'blink_web_element_4200240'
}, },
{ {
# win: Add missing process_handle.h include for cef_sandbox build. # Fix GN gen unresolved dependencies error with cef_sandbox build.
# https://chromium-review.googlesource.com/c/chromium/src/+/4294575 # https://chromium-review.googlesource.com/c/chromium/src/+/4401670
'name': 'base_logging_4294575' 'name': 'gpu_test_trace_4401670'
}, },
{ {
# Fix Check failed: !*GetSingletonDisallowedTls() on shutdown. # Fix ThreadChecker crash on startup with Chrome runtime + multi-threaded
# https://chromium-review.googlesource.com/c/chromium/src/+/4294854 # message loop.
'name': 'rlz_tracker_4294854' 'name': 'metrics_system_profile'
} }
] ]

View File

@ -1,11 +1,11 @@
diff --git base/command_line.cc base/command_line.cc diff --git base/command_line.cc base/command_line.cc
index ae845dcf3972a..a6fc08d159b74 100644 index 0ff6e0c111e63..543659c662892 100644
--- base/command_line.cc --- base/command_line.cc
+++ base/command_line.cc +++ base/command_line.cc
@@ -339,11 +339,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, @@ -346,11 +346,10 @@ void CommandLine::AppendSwitchNative(StringPiece switch_string,
#if BUILDFLAG(ENABLE_COMMANDLINE_SEQUENCE_CHECKS)
void CommandLine::AppendSwitchNative(StringPiece switch_string, sequence_checker_.Check();
CommandLine::StringPieceType value) { #endif
-#if BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN)
const std::string switch_key = ToLowerASCII(switch_string); const std::string switch_key = ToLowerASCII(switch_string);
+#if BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_WIN)

View File

@ -1,20 +0,0 @@
diff --git base/logging.cc base/logging.cc
index 496e68dfcd33a..b1b0af0710f28 100644
--- base/logging.cc
+++ base/logging.cc
@@ -20,6 +20,7 @@
#include "base/debug/crash_logging.h"
#include "base/immediate_crash.h"
#include "base/pending_task.h"
+#include "base/process/process_handle.h"
#include "base/strings/string_piece.h"
#include "base/task/common/task_annotator.h"
#include "base/trace_event/base_tracing.h"
@@ -72,7 +73,6 @@ typedef HANDLE FileHandle;
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include "base/process/process_handle.h"
#define MAX_PATH PATH_MAX
typedef FILE* FileHandle;
#endif

View File

@ -1,8 +1,8 @@
diff --git base/BUILD.gn base/BUILD.gn diff --git base/BUILD.gn base/BUILD.gn
index 422702cb196c5..7118ae9c9f467 100644 index 80f6eaf01c022..b1a35ad087a5b 100644
--- base/BUILD.gn --- base/BUILD.gn
+++ base/BUILD.gn +++ base/BUILD.gn
@@ -39,6 +39,7 @@ import("//build/config/ui.gni") @@ -40,6 +40,7 @@ import("//build/config/ui.gni")
import("//build/nocompile.gni") import("//build/nocompile.gni")
import("//build/timestamp.gni") import("//build/timestamp.gni")
import("//build_overrides/build.gni") import("//build_overrides/build.gni")
@ -10,7 +10,7 @@ index 422702cb196c5..7118ae9c9f467 100644
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
@@ -1509,7 +1510,11 @@ component("base") { @@ -1535,7 +1536,11 @@ component("base") {
"hash/md5_constexpr_internal.h", "hash/md5_constexpr_internal.h",
"hash/sha1.h", "hash/sha1.h",
] ]
@ -23,7 +23,7 @@ index 422702cb196c5..7118ae9c9f467 100644
sources += [ sources += [
"hash/md5_nacl.cc", "hash/md5_nacl.cc",
"hash/md5_nacl.h", "hash/md5_nacl.h",
@@ -1909,6 +1914,12 @@ component("base") { @@ -1935,6 +1940,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
} }
@ -37,7 +37,7 @@ index 422702cb196c5..7118ae9c9f467 100644
"cfgmgr32.lib", "cfgmgr32.lib",
"ntdll.lib", "ntdll.lib",
diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc
index 09ce0dc0c5016..8b847a24918f5 100644 index 0f044388cefee..49fc4cd20be64 100644
--- base/allocator/dispatcher/dispatcher.cc --- base/allocator/dispatcher/dispatcher.cc
+++ base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
@ -185,17 +185,18 @@ index aa7423f88d278..1b2c7d3e3c4a0 100644
return token_ == other.token_; return token_ == other.token_;
#else #else
diff --git base/win/sid.cc base/win/sid.cc diff --git base/win/sid.cc base/win/sid.cc
index 50a120166f08a..dc7da1949b6b1 100644 index 0f1a2ec79aa4b..7f92778a4a776 100644
--- base/win/sid.cc --- base/win/sid.cc
+++ base/win/sid.cc +++ base/win/sid.cc
@@ -16,14 +16,19 @@ @@ -15,6 +15,7 @@
#include <utility> #include <utility>
#include "base/check.h" #include "base/check.h"
+#include "base/notreached.h" +#include "base/notreached.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/strings/string_util_win.h" #include "base/ranges/algorithm.h"
@@ -22,8 +23,12 @@
#include "base/win/scoped_handle.h" #include "base/win/scoped_handle.h"
#include "base/win/scoped_localalloc.h" #include "base/win/scoped_localalloc.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"

View File

@ -1,8 +1,8 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 6006db1791a2a..81e7667183280 100644 index 33ec36151d7fb..947772e015ad9 100644
--- content/browser/scheduler/browser_task_executor.cc --- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc
@@ -273,7 +273,7 @@ BrowserTaskExecutor::OnUserInputStart() { @@ -269,7 +269,7 @@ BrowserTaskExecutor::OnUserInputStart() {
// static // static
void BrowserTaskExecutor::Shutdown() { void BrowserTaskExecutor::Shutdown() {

View File

@ -1,5 +1,5 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 4dbf8a2811c9e..917b6a2e7b56f 100644 index 2cc2e8e2a16da..b9484a5832f74 100644
--- content/browser/child_process_security_policy_impl.cc --- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc
@@ -1800,6 +1800,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( @@ -1800,6 +1800,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
@ -20,10 +20,10 @@ index 4dbf8a2811c9e..917b6a2e7b56f 100644
// Make an exception to allow most visited tiles to commit in // 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 diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index a02a6e4a5eb91..bd5ded3609b10 100644 index 09e2e349e9e29..fdd64503771f9 100644
--- content/browser/renderer_host/navigation_request.cc --- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc
@@ -6973,10 +6973,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( @@ -7139,10 +7139,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin = bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin; network::mojom::WebSandboxFlags::kOrigin;
@ -47,7 +47,7 @@ index a02a6e4a5eb91..bd5ded3609b10 100644
} }
return origin_and_debug_info; return origin_and_debug_info;
@@ -7006,6 +7018,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { @@ -7172,6 +7184,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
SandboxFlagsToCommit()); SandboxFlagsToCommit());

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 9afb4425840b9..cc12baba6d36e 100644 index d3adf9735ca95..30aa892822318 100644
--- build/config/compiler/BUILD.gn --- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn
@@ -1920,8 +1920,6 @@ config("thin_archive") { @@ -1916,8 +1916,6 @@ config("thin_archive") {
# confuses lldb. # confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ] arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index cc7851e0bbb7e..4502edc5de8e6 100644 index 4607e1bd4a189..45fcc0aef8720 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@ -10,7 +10,7 @@ index cc7851e0bbb7e..4502edc5de8e6 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
@@ -1980,6 +1981,7 @@ static_library("browser") { @@ -1939,6 +1940,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags", "//build/config/compiler:compiler_buildflags",
"//cc", "//cc",
@ -18,7 +18,7 @@ index cc7851e0bbb7e..4502edc5de8e6 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -2548,6 +2550,10 @@ static_library("browser") { @@ -2522,6 +2524,10 @@ static_library("browser") {
] ]
} }
@ -29,7 +29,7 @@ index cc7851e0bbb7e..4502edc5de8e6 100644
if (is_android) { if (is_android) {
sources += [ sources += [
"after_startup_task_utils_android.cc", "after_startup_task_utils_android.cc",
@@ -6092,8 +6098,6 @@ static_library("browser") { @@ -6071,8 +6077,6 @@ static_library("browser") {
sources += [ sources += [
"enterprise/chrome_browser_main_extra_parts_enterprise.cc", "enterprise/chrome_browser_main_extra_parts_enterprise.cc",
"enterprise/chrome_browser_main_extra_parts_enterprise.h", "enterprise/chrome_browser_main_extra_parts_enterprise.h",

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index fa9472796576e..3e6a71e1e9697 100644 index 4279a763e28e2..2ec8e4cbfac7d 100644
--- chrome/browser/browser_process.h --- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h +++ chrome/browser/browser_process.h
@@ -199,9 +199,9 @@ class BrowserProcess { @@ -206,9 +206,9 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0;
@ -14,10 +14,10 @@ index fa9472796576e..3e6a71e1e9697 100644
std::unique_ptr<BackgroundModeManager> manager) = 0; std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif #endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index c559c9dee4da0..facb6dc88e2e1 100644 index 00043e84a13e0..6c64dd46b47b9 100644
--- chrome/browser/browser_process_impl.cc --- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc
@@ -1037,18 +1037,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { @@ -1069,18 +1069,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get(); return download_request_limiter_.get();
} }
@ -38,10 +38,10 @@ index c559c9dee4da0..facb6dc88e2e1 100644
std::unique_ptr<BackgroundModeManager> manager) { std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager); background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index c7fab534552b2..075f2e9cfdb66 100644 index 35ab0ab1cc102..74252dc2b53aa 100644
--- chrome/browser/browser_process_impl.h --- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h
@@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess, @@ -176,8 +176,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override; void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override; DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override; DownloadRequestLimiter* download_request_limiter() override;

View File

@ -13,7 +13,7 @@ index 370d6ab102471..fe1e4111780ed 100644
return false; return false;
} }
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 94f900fb2e05e..2d5719c3bc936 100644 index 60994f80e8e51..262869e33aa30 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@ -24,7 +24,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni") import("//chromeos/ash/components/assistant/assistant.gni")
@@ -362,6 +363,10 @@ static_library("ui") { @@ -364,6 +365,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wexit_time_destructors",
] ]
@ -35,7 +35,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
# Since browser and browser_ui actually depend on each other, # Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser. # we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less # However, this means browser_ui and browser should more or less
@@ -386,6 +391,7 @@ static_library("ui") { @@ -388,6 +393,7 @@ static_library("ui") {
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//cc/paint", "//cc/paint",
@ -43,7 +43,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -2543,6 +2549,8 @@ static_library("ui") { @@ -2574,6 +2580,8 @@ static_library("ui") {
"views/apps/app_dialog/app_block_dialog_view.h", "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.cc",
"views/apps/app_dialog/app_pause_dialog_view.h", "views/apps/app_dialog/app_pause_dialog_view.h",
@ -52,7 +52,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
"views/apps/app_info_dialog/arc_app_info_links_panel.cc", "views/apps/app_info_dialog/arc_app_info_links_panel.cc",
"views/apps/app_info_dialog/arc_app_info_links_panel.h", "views/apps/app_info_dialog/arc_app_info_links_panel.h",
"views/apps/chrome_app_window_client_views_chromeos.cc", "views/apps/chrome_app_window_client_views_chromeos.cc",
@@ -4321,8 +4329,6 @@ static_library("ui") { @@ -4369,8 +4377,6 @@ static_library("ui") {
"views/accessibility/theme_tracking_non_accessible_image_view.h", "views/accessibility/theme_tracking_non_accessible_image_view.h",
"views/apps/app_dialog/app_dialog_view.cc", "views/apps/app_dialog/app_dialog_view.cc",
"views/apps/app_dialog/app_dialog_view.h", "views/apps/app_dialog/app_dialog_view.h",
@ -61,7 +61,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
"views/apps/app_info_dialog/app_info_dialog_container.cc", "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_container.h",
"views/apps/app_info_dialog/app_info_dialog_views.cc", "views/apps/app_info_dialog/app_info_dialog_views.cc",
@@ -5853,6 +5859,7 @@ static_library("ui") { @@ -5915,6 +5921,7 @@ static_library("ui") {
if (enable_printing) { if (enable_printing) {
deps += [ deps += [
"//components/printing/browser", "//components/printing/browser",
@ -70,7 +70,7 @@ index 94f900fb2e05e..2d5719c3bc936 100644
] ]
} }
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index f800d1439fd03..0eda6648fa029 100644 index f1e679d2db0f0..9ad5aaf3a4dfd 100644
--- chrome/browser/ui/browser.cc --- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc
@@ -263,6 +263,25 @@ @@ -263,6 +263,25 @@
@ -99,7 +99,7 @@ index f800d1439fd03..0eda6648fa029 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h" #include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif #endif
@@ -509,6 +528,13 @@ Browser::Browser(const CreateParams& params) @@ -510,6 +529,13 @@ Browser::Browser(const CreateParams& params)
tab_strip_model_->AddObserver(this); tab_strip_model_->AddObserver(this);
@ -113,7 +113,7 @@ index f800d1439fd03..0eda6648fa029 100644
location_bar_model_ = std::make_unique<LocationBarModelImpl>( location_bar_model_ = std::make_unique<LocationBarModelImpl>(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -648,6 +674,12 @@ Browser::~Browser() { @@ -649,6 +675,12 @@ Browser::~Browser() {
// away so they don't try and call back to us. // away so they don't try and call back to us.
if (select_file_dialog_.get()) if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed(); select_file_dialog_->ListenerDestroyed();
@ -126,7 +126,7 @@ index f800d1439fd03..0eda6648fa029 100644
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@@ -1357,6 +1389,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( @@ -1358,6 +1390,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event)) if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED; return content::KeyboardEventProcessingResult::HANDLED;
@ -141,7 +141,7 @@ index f800d1439fd03..0eda6648fa029 100644
return window()->PreHandleKeyboardEvent(event); return window()->PreHandleKeyboardEvent(event);
} }
@@ -1364,8 +1404,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, @@ -1365,8 +1405,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) { const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window = DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source); DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -162,7 +162,7 @@ index f800d1439fd03..0eda6648fa029 100644
} }
bool Browser::TabsNeedBeforeUnloadFired() { bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1568,6 +1618,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, @@ -1569,6 +1619,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params); return window->OpenURLFromTab(source, params);
} }
@ -177,7 +177,7 @@ index f800d1439fd03..0eda6648fa029 100644
NavigateParams nav_params(this, params.url, params.transition); NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source; nav_params.source_contents = source;
@@ -1723,6 +1781,8 @@ void Browser::LoadingStateChanged(WebContents* source, @@ -1726,6 +1784,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) { bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -186,7 +186,7 @@ index f800d1439fd03..0eda6648fa029 100644
} }
void Browser::CloseContents(WebContents* source) { void Browser::CloseContents(WebContents* source) {
@@ -1750,6 +1810,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { @@ -1754,6 +1814,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
} }
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -195,7 +195,7 @@ index f800d1439fd03..0eda6648fa029 100644
if (!GetStatusBubble()) if (!GetStatusBubble())
return; return;
@@ -1757,6 +1819,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -1761,6 +1823,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url); GetStatusBubble()->SetURL(url);
} }
@ -213,7 +213,7 @@ index f800d1439fd03..0eda6648fa029 100644
void Browser::ContentsMouseEvent(WebContents* source, void Browser::ContentsMouseEvent(WebContents* source,
bool motion, bool motion,
bool exited) { bool exited) {
@@ -1781,6 +1854,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { @@ -1785,6 +1858,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false; return false;
} }
@ -233,7 +233,7 @@ index f800d1439fd03..0eda6648fa029 100644
void Browser::BeforeUnloadFired(WebContents* web_contents, void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) { bool* proceed_to_fire_unload) {
@@ -1873,6 +1959,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, @@ -1877,6 +1963,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager. // Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents); task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -244,7 +244,7 @@ index f800d1439fd03..0eda6648fa029 100644
} }
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -1984,11 +2074,15 @@ void Browser::EnterFullscreenModeForTab( @@ -1988,11 +2078,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) { const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id); requesting_frame, options.display_id);
@ -260,7 +260,7 @@ index f800d1439fd03..0eda6648fa029 100644
} }
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2188,6 +2282,15 @@ void Browser::RequestMediaAccessPermission( @@ -2194,6 +2288,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents, content::WebContents* web_contents,
const content::MediaStreamRequest& request, const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) { content::MediaResponseCallback callback) {
@ -276,7 +276,7 @@ index f800d1439fd03..0eda6648fa029 100644
const extensions::Extension* extension = const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin); GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2728,13 +2831,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { @@ -2734,13 +2837,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private): // Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() { StatusBubble* Browser::GetStatusBubble() {
@ -298,7 +298,7 @@ index f800d1439fd03..0eda6648fa029 100644
return window_ ? window_->GetStatusBubble() : nullptr; return window_ ? window_->GetStatusBubble() : nullptr;
} }
@@ -2868,6 +2978,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { @@ -2874,6 +2984,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents); web_contents_collection_.StopObserving(web_contents);
} }
@ -308,7 +308,7 @@ index f800d1439fd03..0eda6648fa029 100644
void Browser::TabDetachedAtImpl(content::WebContents* contents, void Browser::TabDetachedAtImpl(content::WebContents* contents,
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 486cff37b13ac..21a3a39f49247 100644 index 83b8260beb59d..480bf6df8f2e5 100644
--- chrome/browser/ui/browser.h --- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -319,7 +319,7 @@ index 486cff37b13ac..21a3a39f49247 100644
#include "chrome/browser/tab_contents/web_contents_collection.h" #include "chrome/browser/tab_contents/web_contents_collection.h"
#include "chrome/browser/themes/theme_service_observer.h" #include "chrome/browser/themes/theme_service_observer.h"
#include "chrome/browser/ui/bookmarks/bookmark_bar.h" #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
@@ -48,6 +49,10 @@ @@ -49,6 +50,10 @@
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/shell_dialogs/select_file_dialog.h" #include "ui/shell_dialogs/select_file_dialog.h"
@ -330,7 +330,7 @@ index 486cff37b13ac..21a3a39f49247 100644
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop. #error This file should only be included on desktop.
#endif #endif
@@ -323,6 +328,11 @@ class Browser : public TabStripModelObserver, @@ -324,6 +329,11 @@ class Browser : public TabStripModelObserver,
double initial_aspect_ratio = 1.0; double initial_aspect_ratio = 1.0;
bool lock_aspect_ratio = false; bool lock_aspect_ratio = false;
@ -342,7 +342,7 @@ index 486cff37b13ac..21a3a39f49247 100644
private: private:
friend class Browser; friend class Browser;
friend class WindowSizerChromeOSTest; friend class WindowSizerChromeOSTest;
@@ -398,6 +408,13 @@ class Browser : public TabStripModelObserver, @@ -399,6 +409,13 @@ class Browser : public TabStripModelObserver,
force_skip_warning_user_on_close_ = force_skip_warning_user_on_close; force_skip_warning_user_on_close_ = force_skip_warning_user_on_close;
} }
@ -356,7 +356,7 @@ index 486cff37b13ac..21a3a39f49247 100644
// Accessors //////////////////////////////////////////////////////////////// // Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; } const CreateParams& create_params() const { return create_params_; }
@@ -471,6 +488,12 @@ class Browser : public TabStripModelObserver, @@ -472,6 +489,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr(); base::WeakPtr<Browser> AsWeakPtr();
@ -369,7 +369,7 @@ index 486cff37b13ac..21a3a39f49247 100644
// Get the FindBarController for this browser, creating it if it does not // Get the FindBarController for this browser, creating it if it does not
// yet exist. // yet exist.
FindBarController* GetFindBarController(); FindBarController* GetFindBarController();
@@ -847,11 +870,19 @@ class Browser : public TabStripModelObserver, @@ -848,11 +871,19 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source, void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override; const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -389,7 +389,7 @@ index 486cff37b13ac..21a3a39f49247 100644
void BeforeUnloadFired(content::WebContents* source, void BeforeUnloadFired(content::WebContents* source,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) override; bool* proceed_to_fire_unload) override;
@@ -1255,6 +1286,8 @@ class Browser : public TabStripModelObserver, @@ -1256,6 +1287,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_; const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_; bool initial_visible_on_all_workspaces_state_;
@ -398,7 +398,7 @@ index 486cff37b13ac..21a3a39f49247 100644
CreationSource creation_source_ = CreationSource::kUnknown; CreationSource creation_source_ = CreationSource::kUnknown;
UnloadController unload_controller_; UnloadController unload_controller_;
@@ -1319,6 +1352,10 @@ class Browser : public TabStripModelObserver, @@ -1320,6 +1353,10 @@ class Browser : public TabStripModelObserver,
extension_browser_window_helper_; extension_browser_window_helper_;
#endif #endif
@ -410,10 +410,10 @@ index 486cff37b13ac..21a3a39f49247 100644
// The opener browser of the document picture-in-picture browser. Null if the // 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 diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index baf326245646a..1b631e80ac3f0 100644 index c4a4bb8af94b0..37d64039e7eed 100644
--- chrome/browser/ui/browser_navigator.cc --- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc
@@ -554,6 +554,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents( @@ -553,6 +553,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents = std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params); WebContents::Create(create_params);

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 diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index e0d7724c3a341..40a25b08152a5 100644 index 56f143c94da9c..8e6b18a9b92eb 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc --- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -315,6 +315,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() { @@ -316,6 +316,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get(); return callback.get();
} }
@ -16,7 +16,7 @@ index e0d7724c3a341..40a25b08152a5 100644
enum class UmaEnumIdLookupType { enum class UmaEnumIdLookupType {
GeneralEnumId, GeneralEnumId,
ContextSpecificEnumId, ContextSpecificEnumId,
@@ -561,6 +568,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { @@ -562,6 +569,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1; return 1;
@ -27,7 +27,7 @@ index e0d7724c3a341..40a25b08152a5 100644
id = CollapseCommandsForUMA(id); id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type); const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id); auto it = map.find(id);
@@ -774,6 +785,14 @@ RenderViewContextMenu::RenderViewContextMenu( @@ -775,6 +786,14 @@ RenderViewContextMenu::RenderViewContextMenu(
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this); pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@ -42,7 +42,7 @@ index e0d7724c3a341..40a25b08152a5 100644
} }
RenderViewContextMenu::~RenderViewContextMenu() = default; RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1187,6 +1206,12 @@ void RenderViewContextMenu::InitMenu() { @@ -1190,6 +1209,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause // menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669). // it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems(); AppendQuickAnswersItems();
@ -55,7 +55,7 @@ index e0d7724c3a341..40a25b08152a5 100644
} }
Profile* RenderViewContextMenu::GetProfile() const { Profile* RenderViewContextMenu::GetProfile() const {
@@ -3130,6 +3155,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( @@ -3148,6 +3173,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb); execute_plugin_action_callback_ = std::move(cb);
} }
@ -69,10 +69,10 @@ index e0d7724c3a341..40a25b08152a5 100644
RenderViewContextMenu::GetHandlersForLinkUrl() { RenderViewContextMenu::GetHandlersForLinkUrl() {
custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = 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 diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index 19678cd892b6e..1e65a38e4cc69 100644 index 4b6e2d55455c3..e25577396d5c1 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h --- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -139,6 +139,12 @@ class RenderViewContextMenu @@ -142,6 +142,12 @@ class RenderViewContextMenu
} }
#endif #endif
@ -96,7 +96,7 @@ index 19678cd892b6e..1e65a38e4cc69 100644
// "Use enhanced spell check" items. // "Use enhanced spell check" items.
std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_;
diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
index ab018dd1ce675..1d80631a0c2ec 100644 index b7522152d2c6d..5201ebe8268f1 100644
--- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc --- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
+++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, @@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 3f7a0625e997f..d0e5a1a05af4b 100644 index 0ff5db3d439bc..586a20ddc8a89 100644
--- chrome/browser/file_select_helper.cc --- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@

View File

@ -112,7 +112,7 @@ index 51ed6bcf6b540..9ae4737e0737e 100644
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0; virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated. // Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index dfd41ce139940..b695144ceaf48 100644 index bfa3af1507a2c..89706052e11d6 100644
--- ui/views/window/dialog_delegate.cc --- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc
@@ -54,10 +54,12 @@ DialogDelegate::DialogDelegate() { @@ -54,10 +54,12 @@ DialogDelegate::DialogDelegate() {
@ -181,7 +181,7 @@ index dfd41ce139940..b695144ceaf48 100644
// Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
// widgets to prevent top-level window behavior (independent movement, etc). // widgets to prevent top-level window behavior (independent movement, etc).
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index 0b660d38eeb03..4f402ee8ddbd4 100644 index cb4e19385ffaa..bbe179c4607a8 100644
--- ui/views/window/dialog_delegate.h --- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h
@@ -94,13 +94,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { @@ -94,13 +94,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/net/proxy_config_monitor.cc chrome/browser/net/proxy_config_monitor.cc diff --git chrome/browser/net/proxy_config_monitor.cc chrome/browser/net/proxy_config_monitor.cc
index 34584b4400276..809b175ff26de 100644 index 6dc5622f50847..89d36c8485e7e 100644
--- chrome/browser/net/proxy_config_monitor.cc --- chrome/browser/net/proxy_config_monitor.cc
+++ chrome/browser/net/proxy_config_monitor.cc +++ chrome/browser/net/proxy_config_monitor.cc
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
@ -10,7 +10,7 @@ index 34584b4400276..809b175ff26de 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/net/proxy_service_factory.h" #include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
@@ -21,6 +22,10 @@ @@ -22,6 +23,10 @@
#include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/ash/profiles/profile_helper.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -21,8 +21,8 @@ index 34584b4400276..809b175ff26de 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/proxy/proxy_api.h" #include "chrome/browser/extensions/api/proxy/proxy_api.h"
#endif #endif
@@ -90,6 +95,9 @@ void ProxyConfigMonitor::AddToNetworkContextParams( @@ -95,6 +100,9 @@ void ProxyConfigMonitor::AddToNetworkContextParams(
.InitWithNewPipeAndPassReceiver()); }
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)

View File

@ -44,7 +44,7 @@ index 16107572d4d0d..409e9ea870482 100644
base::FeatureList::IsEnabled( base::FeatureList::IsEnabled(
features::kPeriodicSyncPermissionForDefaultSearchEngine) && features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
index d0d4fd4f7925b..0755927b00e2c 100644 index 1a2fe8936295a..033ecd276cf45 100644
--- chrome/browser/permissions/chrome_permissions_client.cc --- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
@ -77,7 +77,7 @@ index d0d4fd4f7925b..0755927b00e2c 100644
} }
diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc
index 5e3e2bd6f1e69..4594213db914f 100644 index a6d47eebe0ba6..111a2e52df96f 100644
--- chrome/browser/permissions/permission_manager_factory.cc --- chrome/browser/permissions/permission_manager_factory.cc
+++ chrome/browser/permissions/permission_manager_factory.cc +++ chrome/browser/permissions/permission_manager_factory.cc
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -88,15 +88,15 @@ index 5e3e2bd6f1e69..4594213db914f 100644
#include "chrome/browser/background_fetch/background_fetch_permission_context.h" #include "chrome/browser/background_fetch/background_fetch_permission_context.h"
#include "chrome/browser/background_sync/periodic_background_sync_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" #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -60,8 +61,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts( @@ -59,8 +60,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
std::make_unique<GeolocationPermissionContextDelegate>(profile); std::make_unique<GeolocationPermissionContextDelegate>(profile);
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+ if (!cef::IsAlloyRuntimeEnabled()) { + if (!cef::IsAlloyRuntimeEnabled()) {
delegates.geolocation_manager = delegates.geolocation_manager = g_browser_process->geolocation_manager();
g_browser_process->platform_part()->geolocation_manager(); DCHECK(delegates.geolocation_manager);
+ } + }
#endif // BUILDFLAG(IS_MAC) #endif
delegates.media_stream_device_enumerator = delegates.media_stream_device_enumerator =
MediaCaptureDevicesDispatcher::GetInstance(); MediaCaptureDevicesDispatcher::GetInstance();
diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc
@ -174,7 +174,7 @@ index 82a50b7e22dfe..c4ba55ec6bd54 100644
if (!browser) { if (!browser) {
DLOG(WARNING) << "Permission prompt suppressed because the WebContents is " DLOG(WARNING) << "Permission prompt suppressed because the WebContents is "
diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc
index c3b99f8e21b1c..8abca05c7c482 100644 index ff8391841fc28..08562a3a03aef 100644
--- components/embedder_support/permission_context_utils.cc --- components/embedder_support/permission_context_utils.cc
+++ components/embedder_support/permission_context_utils.cc +++ components/embedder_support/permission_context_utils.cc
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -185,18 +185,19 @@ index c3b99f8e21b1c..8abca05c7c482 100644
#include "components/background_sync/background_sync_permission_context.h" #include "components/background_sync/background_sync_permission_context.h"
#include "components/permissions/contexts/accessibility_permission_context.h" #include "components/permissions/contexts/accessibility_permission_context.h"
#include "components/permissions/contexts/camera_pan_tilt_zoom_permission_context.h" #include "components/permissions/contexts/camera_pan_tilt_zoom_permission_context.h"
@@ -78,11 +79,18 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context, @@ -75,12 +76,19 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context,
browser_context, browser_context,
std::move(delegates.geolocation_permission_context_delegate)); std::move(delegates.geolocation_permission_context_delegate));
#elif BUILDFLAG(IS_MAC) #elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
+ if (cef::IsAlloyRuntimeEnabled()) { + if (cef::IsAlloyRuntimeEnabled()) {
+ permission_contexts[ContentSettingsType::GEOLOCATION] = + permission_contexts[ContentSettingsType::GEOLOCATION] =
+ std::make_unique<permissions::GeolocationPermissionContext>( + std::make_unique<permissions::GeolocationPermissionContext>(
+ browser_context, + browser_context,
+ std::move(delegates.geolocation_permission_context_delegate)); + std::move(delegates.geolocation_permission_context_delegate));
+ } else { + } else {
DCHECK(delegates.geolocation_manager);
permission_contexts[ContentSettingsType::GEOLOCATION] = permission_contexts[ContentSettingsType::GEOLOCATION] =
std::make_unique<permissions::GeolocationPermissionContextMac>( std::make_unique<permissions::GeolocationPermissionContextSystem>(
browser_context, browser_context,
std::move(delegates.geolocation_permission_context_delegate), std::move(delegates.geolocation_permission_context_delegate),
delegates.geolocation_manager); delegates.geolocation_manager);

View File

@ -59,7 +59,7 @@ index f5f266328283d..672609d94d1b7 100644
base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show")); base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show"));
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 41546d7dce559..dce0122a85933 100644 index a315cdc513f1d..036236798652c 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -45,7 +45,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { @@ -45,7 +45,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {

View File

@ -84,10 +84,10 @@ index 1e6a22d95a53f..6ec4182bfc5e7 100644
// Returns whether the user has signed in this profile to an account. // Returns whether the user has signed in this profile to an account.
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 6836199037155..5e0ad06d62fe9 100644 index 3ee6b902b6bc2..6416146fba8af 100644
--- chrome/browser/profiles/profile_impl.cc --- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc
@@ -1018,7 +1018,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, @@ -1015,7 +1015,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile); otr_profiles_[otr_profile_id] = std::move(otr_profile);
@ -99,10 +99,10 @@ index 6836199037155..5e0ad06d62fe9 100644
return raw_otr_profile; return raw_otr_profile;
} }
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 145d5d837ae86..6eeb39eddc79b 100644 index eab4bc302ef7d..9ed7d61345263 100644
--- chrome/browser/profiles/profile_manager.cc --- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc
@@ -385,7 +385,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -392,7 +392,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
base::Unretained(this))); base::Unretained(this)));
#endif #endif
@ -112,7 +112,7 @@ index 145d5d837ae86..6eeb39eddc79b 100644
zombie_metrics_timer_.Start(FROM_HERE, base::Minutes(30), this, zombie_metrics_timer_.Start(FROM_HERE, base::Minutes(30), this,
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index 54502d1b44a82..8134c87824687 100644 index c3626f110e6fb..c7d70d32d8f37 100644
--- chrome/browser/profiles/profile_manager.h --- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h
@@ -130,7 +130,7 @@ class ProfileManager : public Profile::Delegate { @@ -130,7 +130,7 @@ class ProfileManager : public Profile::Delegate {
@ -134,7 +134,7 @@ index 54502d1b44a82..8134c87824687 100644
// Returns the directory where the first created profile is stored, // Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use. // relative to the user data directory currently in use.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
index 43082afabf4bb..fa87aae9cbc93 100644 index b3cf2ad8d367b..431b44e39de40 100644
--- chrome/browser/profiles/renderer_updater.cc --- chrome/browser/profiles/renderer_updater.cc
+++ chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
@ -145,7 +145,7 @@ index 43082afabf4bb..fa87aae9cbc93 100644
#include "chrome/browser/content_settings/content_settings_manager_delegate.h" #include "chrome/browser/content_settings/content_settings_manager_delegate.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
@@ -35,8 +36,10 @@ RendererUpdater::RendererUpdater(Profile* profile) @@ -36,8 +37,10 @@ RendererUpdater::RendererUpdater(Profile* profile)
: profile_(profile), : profile_(profile),
is_off_the_record_(profile_->IsOffTheRecord()), is_off_the_record_(profile_->IsOffTheRecord()),
original_profile_(profile->GetOriginalProfile()) { original_profile_(profile->GetOriginalProfile()) {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 038a280213b6a..f823d021afa1e 100644 index 5e6f67286ba3d..65411bd132294 100644
--- chrome/browser/safe_browsing/BUILD.gn --- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn
@@ -32,6 +32,7 @@ static_library("safe_browsing") { @@ -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 diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index 851cacf36cb21..217c38335903d 100644 index c9a644a755c12..bf4ea541fb359 100644
--- chrome/browser/themes/theme_service.cc --- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@

View File

@ -42,10 +42,10 @@ index 8b3f569882aeb..afc8007a6228b 100644
const extensions::Extension* extension = const extensions::Extension* extension =
registry->enabled_extensions().GetByID(extension_id); registry->enabled_extensions().GetByID(extension_id);
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index a91227b208c16..d89e3d6ba0ad7 100644 index 846a2ee1b05d0..b77a01012bbbb 100644
--- chrome/renderer/chrome_content_renderer_client.cc --- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc
@@ -983,6 +983,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1009,6 +1009,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized || if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) && status == chrome::mojom::PluginStatus::kBlocked) &&
@ -53,7 +53,7 @@ index a91227b208c16..d89e3d6ba0ad7 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed( content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) { identifier)) {
status = chrome::mojom::PluginStatus::kAllowed; status = chrome::mojom::PluginStatus::kAllowed;
@@ -1150,7 +1151,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1176,7 +1177,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface( render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -63,7 +63,7 @@ index a91227b208c16..d89e3d6ba0ad7 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlocked: { case chrome::mojom::PluginStatus::kBlocked: {
@@ -1159,7 +1161,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1185,7 +1187,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading(); placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -73,7 +73,7 @@ index a91227b208c16..d89e3d6ba0ad7 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedByPolicy: { case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1169,7 +1172,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1195,7 +1198,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name)); group_name));
RenderThread::Get()->RecordAction( RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy")); UserMetricsAction("Plugin_BlockedByPolicy"));

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 53733390bf73d..215112f3f5723 100644 index 0a535c03b96b0..3787cbc8dc8d0 100644
--- chrome/renderer/BUILD.gn --- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 18b59a7014ea2..82f2fd1b32897 100644 index d4b31d11a51c4..534973146e405 100644
--- chrome/app/chrome_main_delegate.cc --- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc
@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
@ -10,7 +10,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/chrome_resource_bundle_helper.h"
#include "chrome/browser/defaults.h" #include "chrome/browser/defaults.h"
@@ -503,6 +504,8 @@ struct MainFunction { @@ -498,6 +499,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState(). // Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) { void InitializeUserDataDir(base::CommandLine* command_line) {
@ -19,18 +19,18 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
// Reach out to chrome_elf for the truth on the user data directory. // Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs. // Note that in tests, this links to chrome_elf_test_stubs.
@@ -652,6 +655,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { @@ -647,6 +650,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default; ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID) #endif // !BUILDFLAG(IS_ANDROID)
+void ChromeMainDelegate::CleanupOnUIThread() { +void ChromeMainDelegate::CleanupOnUIThread() {
+ heap_profiler_controller_.reset(); + memory_system_.reset();
+} +}
+ +
absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) { InvokedIn invoked_in) {
DCHECK(base::ThreadPoolInstance::Get()); DCHECK(base::ThreadPoolInstance::Get());
@@ -857,7 +864,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -855,7 +862,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@ -40,7 +40,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
record = record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions); base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1310,6 +1318,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1280,6 +1288,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type = std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType); command_line.GetSwitchValueASCII(switches::kProcessType);
@ -48,7 +48,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
crash_reporter::InitializeCrashKeys(); crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_POSIX)
@@ -1320,6 +1329,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1290,6 +1299,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type); InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line); SetUpInstallerPreferences(command_line);
#endif #endif
@ -56,7 +56,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
child_process_logging::Init(); child_process_logging::Init();
@@ -1514,6 +1524,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1484,6 +1494,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
} }
@ -64,7 +64,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote(). // Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) { if (process_type != switches::kZygoteProcess) {
@@ -1557,6 +1568,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1527,6 +1538,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command // After all the platform Breakpads have been initialized, store the command
// line for crash reporting. // line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line); crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -72,7 +72,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
#if BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData(); MaybePatchGdiGetFontData();
@@ -1680,6 +1692,7 @@ void ChromeMainDelegate::ZygoteForked() { @@ -1650,6 +1662,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler(); SetUpProfilingShutdownHandler();
} }
@ -80,7 +80,7 @@ index 18b59a7014ea2..82f2fd1b32897 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner. // this up for the browser process in a different manner.
const base::CommandLine* command_line = const base::CommandLine* command_line =
@@ -1702,6 +1715,7 @@ void ChromeMainDelegate::ZygoteForked() { @@ -1672,6 +1685,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process. // Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line); crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -88,11 +88,25 @@ index 18b59a7014ea2..82f2fd1b32897 100644
} }
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1763,11 +1777,12 @@ void ChromeMainDelegate::InitializeMemorySystem() {
channel == version_info::Channel::DEV);
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
+ memory_system_ = std::make_unique<memory_system::MemorySystem>();
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(channel,
GetProfileParamsProcess(*command_line))
.SetDispatcherParameters(memory_system::DispatcherParameters::
PoissonAllocationSamplerInclusion::kEnforce)
- .Initialize(memory_system_);
+ .Initialize(*memory_system_);
}
diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h
index bfafb0a895b0f..f42ebc52d4a1a 100644 index dad9f981d2e01..29baaf84465a0 100644
--- chrome/app/chrome_main_delegate.h --- chrome/app/chrome_main_delegate.h
+++ chrome/app/chrome_main_delegate.h +++ chrome/app/chrome_main_delegate.h
@@ -52,6 +52,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate { @@ -49,6 +49,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
~ChromeMainDelegate() override; ~ChromeMainDelegate() override;
@ -101,8 +115,17 @@ index bfafb0a895b0f..f42ebc52d4a1a 100644
protected: protected:
// content::ContentMainDelegate: // content::ContentMainDelegate:
absl::optional<int> BasicStartupComplete() override; absl::optional<int> BasicStartupComplete() override;
@@ -98,7 +100,7 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
ChromeContentClient chrome_content_client_;
- memory_system::MemorySystem memory_system_;
+ std::unique_ptr<memory_system::MemorySystem> memory_system_;
#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 diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index b05ce3c764ddd..92be5fda315cf 100644 index b74b87e496946..89cdeef75fea0 100644
--- chrome/browser/chrome_browser_main.cc --- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc
@@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
@ -113,7 +136,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h" #include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
@@ -1475,7 +1476,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1478,7 +1479,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@ -122,7 +145,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
// Handle special early return paths (which couldn't be processed even earlier // Handle special early return paths (which couldn't be processed even earlier
// as they require the process singleton to be held) first. // as they require the process singleton to be held) first.
@@ -1522,7 +1523,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1525,7 +1526,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return content::RESULT_CODE_NORMAL_EXIT; return content::RESULT_CODE_NORMAL_EXIT;
#endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN)
} }
@ -131,7 +154,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
// Check if there is any machine level Chrome installed on the current // Check if there is any machine level Chrome installed on the current
@@ -1577,12 +1578,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1580,12 +1581,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state()); browser_process_->local_state());
} }
@ -146,7 +169,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient()); page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1731,6 +1734,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1734,6 +1737,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -157,7 +180,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
// This step is costly and is already measured in // This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start. // Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|. // See the comment above for an explanation of |process_command_line|.
@@ -1769,11 +1776,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1772,11 +1779,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer // Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess. // ownership of the browser's lifetime to the BrowserProcess.
@ -173,7 +196,7 @@ index b05ce3c764ddd..92be5fda315cf 100644
#endif // !BUILDFLAG(IS_ANDROID) #endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index 194833d0bae43..21564d96466c0 100644 index d495e1a903fd8..31cf6632e831c 100644
--- chrome/browser/chrome_browser_main_mac.mm --- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -211,7 +234,7 @@ index 194833d0bae43..21564d96466c0 100644
+#endif +#endif
} }
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 600dd1ab9abc4..b4bc133b4a445 100644 index cfbed0fd8183a..63529099116e4 100644
--- chrome/browser/chrome_content_browser_client.cc --- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
@ -222,8 +245,8 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
#include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
@@ -1527,6 +1528,8 @@ void HandleStringData( @@ -1523,6 +1524,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
} // namespace }
ChromeContentBrowserClient::ChromeContentBrowserClient() { ChromeContentBrowserClient::ChromeContentBrowserClient() {
+ keepalive_timer_.reset(new base::OneShotTimer()); + keepalive_timer_.reset(new base::OneShotTimer());
@ -231,7 +254,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart);
#endif #endif
@@ -1552,6 +1555,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { @@ -1548,6 +1551,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
extra_parts_.clear(); extra_parts_.clear();
} }
@ -243,7 +266,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
// static // static
void ChromeContentBrowserClient::RegisterLocalStatePrefs( void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) { PrefRegistrySimple* registry) {
@@ -4313,9 +4321,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( @@ -4342,9 +4350,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite); &search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
@ -255,8 +278,8 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
} }
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6213,7 +6223,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( @@ -6240,7 +6250,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
network_service); #endif
} }
-void ChromeContentBrowserClient::ConfigureNetworkContextParams( -void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@ -264,7 +287,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -6231,6 +6241,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( @@ -6258,6 +6268,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale(); network_context_params->accept_language = GetApplicationLocale();
} }
@ -273,7 +296,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
} }
std::vector<base::FilePath> std::vector<base::FilePath>
@@ -7137,10 +7149,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( @@ -7194,10 +7206,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context); const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -286,7 +309,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
FROM_HERE, keepalive_deadline_ - now, FROM_HERE, keepalive_deadline_ - now,
base::BindOnce( base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired, &ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7159,7 +7171,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { @@ -7216,7 +7228,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_; --num_keepalive_requests_;
if (num_keepalive_requests_ == 0) { if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer"; DVLOG(1) << "Stopping the keepalive timer";
@ -296,7 +319,7 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
// This deletes the keep alive handle attached to the timer function and // This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence. // unblock the shutdown sequence.
} }
@@ -7295,7 +7308,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( @@ -7352,7 +7365,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_; const auto then = keepalive_deadline_;
if (now < then) { if (now < then) {
@ -306,10 +329,10 @@ index 600dd1ab9abc4..b4bc133b4a445 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(), weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 7ecb90a89f1d7..c80ce831382db 100644 index d2337ac7d7fbf..af49a2589cabf 100644
--- chrome/browser/chrome_content_browser_client.h --- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h
@@ -121,6 +121,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -133,6 +133,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override; ~ChromeContentBrowserClient() override;
@ -318,7 +341,7 @@ index 7ecb90a89f1d7..c80ce831382db 100644
// TODO(https://crbug.com/787567): This file is about calls from content/ out // 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 // to chrome/ to get values or notify about events, but both of these
// functions are from chrome/ to chrome/ and don't involve content/ at all. // functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -602,7 +604,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -616,7 +618,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override; override;
void OnNetworkServiceCreated( void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override; network::mojom::NetworkService* network_service) override;
@ -327,7 +350,7 @@ index 7ecb90a89f1d7..c80ce831382db 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -966,7 +968,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -989,7 +991,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0; uint64_t num_keepalive_requests_ = 0;
@ -337,10 +360,10 @@ index 7ecb90a89f1d7..c80ce831382db 100644
#endif #endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index ff57c231cc784..59ac71c36caa0 100644 index bc342655b8367..bc7cbc93dac17 100644
--- chrome/browser/prefs/browser_prefs.cc --- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc
@@ -11,6 +11,7 @@ @@ -12,6 +12,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromecast_buildflags.h" #include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h" #include "build/chromeos_buildflags.h"
@ -348,7 +371,7 @@ index ff57c231cc784..59ac71c36caa0 100644
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h" #include "chrome/browser/accessibility/accessibility_ui.h"
@@ -174,6 +175,10 @@ @@ -177,6 +178,10 @@
#include "chrome/browser/background/background_mode_manager.h" #include "chrome/browser/background/background_mode_manager.h"
#endif #endif
@ -359,7 +382,7 @@ index ff57c231cc784..59ac71c36caa0 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1305,6 +1310,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { @@ -1365,6 +1370,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last. // This is intentionally last.
RegisterLocalStatePrefsForMigration(registry); RegisterLocalStatePrefsForMigration(registry);
@ -371,7 +394,7 @@ index ff57c231cc784..59ac71c36caa0 100644
} }
// Register prefs applicable to all profiles. // Register prefs applicable to all profiles.
@@ -1704,6 +1714,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, @@ -1759,6 +1769,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) { const std::string& locale) {
RegisterProfilePrefs(registry, locale); RegisterProfilePrefs(registry, locale);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index f91c359d9792a..9fe7a7faf33bc 100644 index dc085f13cb279..bad8857a44807 100644
--- chrome/browser/ui/browser_command_controller.cc --- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc
@@ -389,6 +389,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( @@ -389,6 +389,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@ -24,7 +24,7 @@ index f91c359d9792a..9fe7a7faf33bc 100644
// The order of commands in this switch statement must match the function // The order of commands in this switch statement must match the function
// declaration order in browser.h! // declaration order in browser.h!
switch (id) { switch (id) {
@@ -1042,11 +1050,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( @@ -1050,11 +1058,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private: // BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() { bool BrowserCommandController::IsShowingMainUI() {
@ -41,10 +41,10 @@ index f91c359d9792a..9fe7a7faf33bc 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const { bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 655ce2353f106..e9dd7ed68b9c5 100644 index f505dbc9aa7b9..de2fa3e6732f5 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc --- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -151,6 +151,57 @@ absl::optional<std::u16string> GetInstallPWAAppMenuItemName(Browser* browser) { @@ -157,6 +157,57 @@ absl::optional<std::u16string> GetInstallPWAAppMenuItemName(Browser* browser) {
ui::EscapeMenuLabelAmpersands(app_name)); ui::EscapeMenuLabelAmpersands(app_name));
} }
@ -102,7 +102,7 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
} // namespace } // namespace
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@@ -756,7 +807,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { @@ -811,7 +862,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false; return false;
} }
@ -111,7 +111,7 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
GlobalError* error = GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile()) GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id); ->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -771,7 +822,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { @@ -826,7 +877,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
} }
} }
@ -120,7 +120,7 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
switch (command_id) { switch (command_id) {
case IDC_PIN_TO_START_SCREEN: case IDC_PIN_TO_START_SCREEN:
return false; return false;
@@ -794,6 +845,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const { @@ -849,6 +900,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const {
} }
} }
@ -155,8 +155,8 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const { bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if ((command_id == IDC_RECENT_TABS_MENU) || if ((command_id == IDC_RECENT_TABS_MENU) ||
(command_id == AppMenuModel::kMinRecentTabsCommandId)) { (command_id == AppMenuModel::kMinRecentTabsCommandId)) {
@@ -899,9 +978,13 @@ void AppMenuModel::Build() { @@ -965,9 +1044,13 @@ void AppMenuModel::Build() {
bookmark_sub_menu_model_.get()); kExtensionsMenuItem);
} }
- AddSeparator(ui::LOWER_SEPARATOR); - AddSeparator(ui::LOWER_SEPARATOR);
@ -172,7 +172,7 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT); AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -965,9 +1048,14 @@ void AppMenuModel::Build() { @@ -1031,9 +1114,14 @@ void AppMenuModel::Build() {
sub_menus_.back().get()); sub_menus_.back().get());
SetElementIdentifierAt(GetIndexOfCommandId(IDC_MORE_TOOLS_MENU).value(), SetElementIdentifierAt(GetIndexOfCommandId(IDC_MORE_TOOLS_MENU).value(),
kMoreToolsMenuItem); kMoreToolsMenuItem);
@ -190,7 +190,7 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS);
// The help submenu is only displayed on official Chrome builds. As the // The help submenu is only displayed on official Chrome builds. As the
@@ -1004,6 +1092,11 @@ void AppMenuModel::Build() { @@ -1070,6 +1158,11 @@ void AppMenuModel::Build() {
} }
#endif // !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_CHROMEOS_ASH)
@ -203,10 +203,10 @@ index 655ce2353f106..e9dd7ed68b9c5 100644
} }
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index fa3ceed419c16..522671662cbdf 100644 index 26545b0cee2c1..118cf0df456d6 100644
--- chrome/browser/ui/toolbar/app_menu_model.h --- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -208,6 +208,9 @@ class AppMenuModel : public ui::SimpleMenuModel, @@ -230,6 +230,9 @@ class AppMenuModel : public ui::SimpleMenuModel,
// Appends a zoom menu (without separators). // Appends a zoom menu (without separators).
void CreateZoomMenu(); void CreateZoomMenu();
@ -217,10 +217,10 @@ index fa3ceed419c16..522671662cbdf 100644
friend class ::MockAppMenuModel; friend class ::MockAppMenuModel;
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 090ad157308b7..d0534ffb8091c 100644 index 8da09b8c01c3f..d4f2a855bb8e8 100644
--- chrome/browser/ui/views/frame/browser_frame.cc --- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -67,15 +67,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) { @@ -71,15 +71,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public: // BrowserFrame, public:
@ -246,7 +246,7 @@ index 090ad157308b7..d0534ffb8091c 100644
} }
BrowserFrame::~BrowserFrame() {} BrowserFrame::~BrowserFrame() {}
@@ -166,6 +174,12 @@ void BrowserFrame::LayoutWebAppWindowTitle( @@ -170,6 +178,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
} }
int BrowserFrame::GetTopInset() const { int BrowserFrame::GetTopInset() const {
@ -259,7 +259,7 @@ index 090ad157308b7..d0534ffb8091c 100644
return browser_frame_view_->GetTopInset(false); return browser_frame_view_->GetTopInset(false);
} }
@@ -182,6 +196,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { @@ -186,6 +200,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
} }
bool BrowserFrame::UseCustomFrame() const { bool BrowserFrame::UseCustomFrame() const {
@ -268,7 +268,7 @@ index 090ad157308b7..d0534ffb8091c 100644
return native_browser_frame_->UseCustomFrame(); return native_browser_frame_->UseCustomFrame();
} }
@@ -195,20 +211,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { @@ -199,20 +215,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds, void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
ui::WindowShowState* show_state) const { ui::WindowShowState* show_state) const {
@ -299,7 +299,7 @@ index 090ad157308b7..d0534ffb8091c 100644
browser_frame_view_->OnBrowserViewInitViewsComplete(); browser_frame_view_->OnBrowserViewInitViewsComplete();
} }
@@ -270,7 +296,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { @@ -274,7 +300,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const {
ui::ColorProviderManager::ThemeInitializerSupplier* ui::ColorProviderManager::ThemeInitializerSupplier*
BrowserFrame::GetCustomTheme() const { BrowserFrame::GetCustomTheme() const {
// Do not return any custom theme if the browser has to use the dark theme. // Do not return any custom theme if the browser has to use the dark theme.
@ -308,7 +308,7 @@ index 090ad157308b7..d0534ffb8091c 100644
return nullptr; return nullptr;
Browser* browser = browser_view_->browser(); Browser* browser = browser_view_->browser();
@@ -287,6 +313,8 @@ BrowserFrame::GetCustomTheme() const { @@ -291,6 +317,8 @@ BrowserFrame::GetCustomTheme() const {
} }
void BrowserFrame::OnNativeWidgetWorkspaceChanged() { void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
@ -317,7 +317,7 @@ index 090ad157308b7..d0534ffb8091c 100644
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
IsVisibleOnAllWorkspaces()); IsVisibleOnAllWorkspaces());
@@ -374,6 +402,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { @@ -388,6 +416,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) {
ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
auto key = Widget::GetColorProviderKey(); auto key = Widget::GetColorProviderKey();
@ -326,7 +326,17 @@ index 090ad157308b7..d0534ffb8091c 100644
key.frame_type = UseCustomFrame() key.frame_type = UseCustomFrame()
? ui::ColorProviderManager::FrameType::kChromium ? ui::ColorProviderManager::FrameType::kChromium
: ui::ColorProviderManager::FrameType::kNative; : ui::ColorProviderManager::FrameType::kNative;
@@ -460,5 +490,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( @@ -397,6 +427,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())) {
@@ -489,5 +522,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
} }
bool BrowserFrame::ShouldUseDarkTheme() const { bool BrowserFrame::ShouldUseDarkTheme() const {
@ -335,10 +345,10 @@ index 090ad157308b7..d0534ffb8091c 100644
return browser_view_->browser()->profile()->IsIncognitoProfile(); return browser_view_->browser()->profile()->IsIncognitoProfile();
} }
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 89262a0c87266..f94cc5faafb90 100644 index d9fb9af4db3eb..4a809ee9962fd 100644
--- chrome/browser/ui/views/frame/browser_frame.h --- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h +++ chrome/browser/ui/views/frame/browser_frame.h
@@ -57,7 +57,9 @@ enum class TabDragKind { @@ -61,7 +61,9 @@ enum class TabDragKind {
// This is a virtual interface that allows system specific browser frames. // This is a virtual interface that allows system specific browser frames.
class BrowserFrame : public views::Widget, public views::ContextMenuController { class BrowserFrame : public views::Widget, public views::ContextMenuController {
public: public:
@ -349,10 +359,10 @@ index 89262a0c87266..f94cc5faafb90 100644
BrowserFrame(const BrowserFrame&) = delete; BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(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 diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 7f4c8115e35fc..28331cec6c3c7 100644 index ff1d8ce809a68..a58efb5ca5b72 100644
--- chrome/browser/ui/views/frame/browser_view.cc --- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc
@@ -307,11 +307,10 @@ using content::NativeWebKeyboardEvent; @@ -308,11 +308,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents; using content::WebContents;
using web_modal::WebContentsModalDialogHost; using web_modal::WebContentsModalDialogHost;
@ -367,7 +377,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation. // UMA histograms that record animation smoothness for tab loading animation.
@@ -863,11 +862,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { @@ -772,11 +771,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// BrowserView, public: // BrowserView, public:
@ -391,7 +401,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
SetShowIcon( SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -912,7 +922,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) @@ -820,7 +830,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
} }
browser_->tab_strip_model()->AddObserver(this); browser_->tab_strip_model()->AddObserver(this);
@ -399,7 +409,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
// Top container holds tab strip region and toolbar and lives at the front of // Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy. // the view hierarchy.
@@ -969,8 +978,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) @@ -876,8 +885,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>( contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_)); devtools_web_view_, contents_web_view_));
@ -417,7 +427,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
contents_separator_ = contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>()); top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1900,6 +1916,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { @@ -1788,6 +1804,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled()) if (immersive_mode_controller_->IsEnabled())
return false; return false;
@ -426,7 +436,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
} }
@@ -2799,7 +2817,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { @@ -2680,7 +2698,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
} }
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -436,7 +446,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller(); return download_button->bubble_controller();
return nullptr; return nullptr;
@@ -3291,7 +3310,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { @@ -3180,7 +3199,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this) if (top_container()->parent() == this)
return; return;
@ -446,7 +456,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
top_container()->DestroyLayer(); top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0); AddChildViewAt(top_container(), 0);
EnsureFocusOrder(); EnsureFocusOrder();
@@ -3850,8 +3870,10 @@ void BrowserView::Layout() { @@ -3733,8 +3753,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code? // TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -459,7 +469,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
// Some of the situations when the BrowserView is laid out are: // Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode. // - Enter/exit immersive fullscreen mode.
@@ -3917,6 +3939,11 @@ void BrowserView::AddedToWidget() { @@ -3800,6 +3822,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif #endif
@ -470,8 +480,8 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
+ +
toolbar_->Init(); toolbar_->Init();
// TODO(pbos): Manage this either inside SidePanel or the corresponding button // TODO(pbos): Investigate whether the side panels should be creatable when
@@ -3973,13 +4000,9 @@ void BrowserView::AddedToWidget() { @@ -3846,13 +3873,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder(); EnsureFocusOrder();
@ -487,7 +497,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
using_native_frame_ = frame_->ShouldUseNativeFrame(); using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip(); MaybeInitializeWebUITabStrip();
@@ -4385,7 +4408,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, @@ -4258,7 +4281,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout. // Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false; in_process_fullscreen_ = false;
ToolbarSizeChanged(false); ToolbarSizeChanged(false);
@ -497,7 +507,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
} }
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -4733,6 +4757,8 @@ Profile* BrowserView::GetProfile() { @@ -4606,6 +4630,8 @@ Profile* BrowserView::GetProfile() {
} }
void BrowserView::UpdateUIForTabFullscreen() { void BrowserView::UpdateUIForTabFullscreen() {
@ -506,7 +516,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
frame()->GetFrameView()->UpdateFullscreenTopUI(); frame()->GetFrameView()->UpdateFullscreenTopUI();
} }
@@ -4755,6 +4781,8 @@ void BrowserView::HideDownloadShelf() { @@ -4628,6 +4654,8 @@ void BrowserView::HideDownloadShelf() {
} }
bool BrowserView::CanUserExitFullscreen() const { bool BrowserView::CanUserExitFullscreen() const {
@ -516,7 +526,7 @@ index 7f4c8115e35fc..28331cec6c3c7 100644
} }
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index d769d3914a123..6a94752bc96ea 100644 index a2693a336f830..74d7864151d62 100644
--- chrome/browser/ui/views/frame/browser_view.h --- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h
@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow, @@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow,
@ -536,7 +546,7 @@ index d769d3914a123..6a94752bc96ea 100644
void set_frame(BrowserFrame* frame) { void set_frame(BrowserFrame* frame) {
frame_ = frame; frame_ = frame;
paint_as_active_subscription_ = paint_as_active_subscription_ =
@@ -788,6 +793,12 @@ class BrowserView : public BrowserWindow, @@ -773,6 +778,12 @@ class BrowserView : public BrowserWindow,
return web_app_frame_toolbar(); return web_app_frame_toolbar();
} }
@ -550,10 +560,10 @@ index d769d3914a123..6a94752bc96ea 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable. // interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index c9b4becda8dfa..0284fd5f01bc6 100644 index cf12bbd30e086..a227f64d8d5e9 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc --- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -48,6 +48,10 @@ @@ -47,6 +47,10 @@
#include "ui/views/window/client_view.h" #include "ui/views/window/client_view.h"
#include "ui/views/window/hit_test_utils.h" #include "ui/views/window/hit_test_utils.h"
@ -564,7 +574,7 @@ index c9b4becda8dfa..0284fd5f01bc6 100644
using views::View; using views::View;
using web_modal::ModalDialogHostObserver; using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost; using web_modal::WebContentsModalDialogHost;
@@ -564,6 +568,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { @@ -560,6 +564,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) { int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -595,7 +605,7 @@ index 5e059b9878fc2..c1f6fbcd40ec4 100644
ContentsWebView::~ContentsWebView() { 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 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 c26f017f45682..f9f875292c7d6 100644 index 0dcdb241b98f7..1117776bbc85c 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -91,6 +91,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, @@ -91,6 +91,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@ -664,10 +674,10 @@ index f4a5c3ad8cc9c..4f9c1a111e7ce 100644
} }
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 65ba764446ced..140ff05e1b276 100644 index f2b0bd4099b4f..89b7520e359c3 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc --- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -164,12 +164,13 @@ auto& GetViewCommandMap() { @@ -169,12 +169,13 @@ constexpr int kToolbarDividerCornerRadius = 1;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public: // ToolbarView, public:
@ -683,7 +693,7 @@ index 65ba764446ced..140ff05e1b276 100644
SetID(VIEW_ID_TOOLBAR); SetID(VIEW_ID_TOOLBAR);
if (display_mode_ == DisplayMode::NORMAL) { if (display_mode_ == DisplayMode::NORMAL) {
@@ -200,7 +201,7 @@ void ToolbarView::Init() { @@ -205,7 +206,7 @@ void ToolbarView::Init() {
#endif #endif
auto location_bar = std::make_unique<LocationBarView>( auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this, browser_, browser_->profile(), browser_->command_controller(), this,
@ -692,7 +702,7 @@ index 65ba764446ced..140ff05e1b276 100644
// Make sure the toolbar shows by default. // Make sure the toolbar shows by default.
size_animation_.Reset(1); size_animation_.Reset(1);
@@ -224,6 +225,19 @@ void ToolbarView::Init() { @@ -229,6 +230,19 @@ void ToolbarView::Init() {
browser, command, ui::DispositionFromEventFlags(event.flags())); browser, command, ui::DispositionFromEventFlags(event.flags()));
}; };
@ -712,8 +722,8 @@ index 65ba764446ced..140ff05e1b276 100644
std::unique_ptr<ToolbarButton> back = std::make_unique<BackForwardButton>( std::unique_ptr<ToolbarButton> back = std::make_unique<BackForwardButton>(
BackForwardButton::Direction::kBack, BackForwardButton::Direction::kBack,
base::BindRepeating(callback, browser_, IDC_BACK), browser_); base::BindRepeating(callback, browser_, IDC_BACK), browser_);
@@ -248,8 +262,10 @@ void ToolbarView::Init() { @@ -258,8 +272,10 @@ void ToolbarView::Init() {
std::make_unique<ExtensionsToolbarContainer>(browser_); }
} }
std::unique_ptr<media_router::CastToolbarButton> cast; std::unique_ptr<media_router::CastToolbarButton> cast;
- if (media_router::MediaRouterEnabled(browser_->profile())) - if (media_router::MediaRouterEnabled(browser_->profile()))
@ -724,7 +734,7 @@ index 65ba764446ced..140ff05e1b276 100644
std::unique_ptr<MediaToolbarButtonView> media_button; std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) { if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -258,21 +274,23 @@ void ToolbarView::Init() { @@ -268,14 +284,16 @@ void ToolbarView::Init() {
} }
std::unique_ptr<DownloadToolbarButtonView> download_button; std::unique_ptr<DownloadToolbarButtonView> download_button;
@ -743,19 +753,20 @@ index 65ba764446ced..140ff05e1b276 100644
send_tab_to_self_button = send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>( std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_); browser_view_);
} @@ -283,7 +301,7 @@ void ToolbarView::Init() {
std::unique_ptr<SidePanelToolbarButton> side_panel_button; 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()) {
+ if (browser_view_->unified_side_panel() && BUTTON_VISIBLE(kSidePanel)) { + if (browser_view_->unified_side_panel() && BUTTON_VISIBLE(kSidePanel)) {
side_panel_button = std::make_unique<SidePanelToolbarButton>(browser_); if (base::FeatureList::IsEnabled(features::kSidePanelCompanion)) {
} 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 diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 05dfd39061580..29c677a735672 100644 index b3c20d4eaf0b3..62aef2fbc752d 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h --- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -88,7 +88,8 @@ class ToolbarView : public views::AccessiblePaneView, @@ -89,7 +89,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed. // needs to be displayed.
}; };

View File

@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index ba37a4f5c3604..be5d4c2020660 100644 index 8ac089ad10e93..7205803b7156c 100644
--- content/browser/devtools/devtools_instrumentation.h --- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h
@@ -102,7 +102,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -102,7 +102,7 @@ bool ApplyUserAgentMetadataOverrides(
@ -68,18 +68,18 @@ index 97c7dc7c25000..63c42610bfd9c 100644
blink::mojom::V8CacheOptions GetV8CacheOptions(); blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index fcdf677c9772e..b7bfed642fff6 100644 index 64214a7885df2..0cbc7cfc6fe43 100644
--- third_party/blink/renderer/controller/BUILD.gn --- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn
@@ -36,6 +36,7 @@ component("controller") { @@ -35,6 +35,7 @@ component("controller") {
}
configs += [ configs += [
"//build/config/compiler:wexit_time_destructors",
+ "//cef/libcef/features:config", + "//cef/libcef/features:config",
"//third_party/blink/renderer:config", "//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink", "//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer:non_test_config", "//third_party/blink/renderer:non_test_config",
@@ -61,6 +62,8 @@ component("controller") { @@ -60,6 +61,8 @@ component("controller") {
"performance_manager/v8_detailed_memory_reporter_impl.h", "performance_manager/v8_detailed_memory_reporter_impl.h",
"performance_manager/v8_worker_memory_reporter.cc", "performance_manager/v8_worker_memory_reporter.cc",
"performance_manager/v8_worker_memory_reporter.h", "performance_manager/v8_worker_memory_reporter.h",

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index b91c420730c5e..d69af17943fe7 100644 index 3083bd8c2a8d6..1966cb5bee7e9 100644
--- content/browser/devtools/devtools_http_handler.cc --- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc
@@ -589,7 +589,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -588,7 +588,7 @@ void DevToolsHttpHandler::OnJsonRequest(
base::Value::Dict version; base::Value::Dict version;
version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion());
version.Set("WebKit-Version", GetWebKitVersion()); version.Set("WebKit-Version", GetWebKitVersion());
@ -12,10 +12,10 @@ index b91c420730c5e..d69af17943fe7 100644
version.Set("V8-Version", V8_VERSION_STRING); version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host"); std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 22fe0e4ff65ce..e38329c932bf2 100644 index fc00cee495e56..1979a0767edf1 100644
--- content/browser/loader/navigation_url_loader_impl.cc --- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc
@@ -721,6 +721,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { @@ -741,6 +741,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
resource_request_->has_user_gesture, initiating_origin, resource_request_->has_user_gesture, initiating_origin,
initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); initiator_document_.AsRenderFrameHostIfValid(), &loader_factory);
@ -34,10 +34,10 @@ index 22fe0e4ff65ce..e38329c932bf2 100644
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>( factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory)); std::move(loader_factory));
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index 78ae48dcbed95..a5a77e9ad81ce 100644 index cd77eefb577e6..6cff0a16f2eab 100644
--- content/public/browser/content_browser_client.cc --- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc
@@ -965,7 +965,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( @@ -968,7 +968,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated( void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {} network::mojom::NetworkService* network_service) {}
@ -46,7 +46,7 @@ index 78ae48dcbed95..a5a77e9ad81ce 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -974,6 +974,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( @@ -977,6 +977,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) { cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en"; network_context_params->accept_language = "en-us,en";
@ -55,7 +55,7 @@ index 78ae48dcbed95..a5a77e9ad81ce 100644
std::vector<base::FilePath> std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index ceff9665cdb15..657f88d32efd4 100644 index 5500a0cec01ec..ea2fa77649607 100644
--- content/public/browser/content_browser_client.h --- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
@ -66,7 +66,7 @@ index ceff9665cdb15..657f88d32efd4 100644
#include "content/public/common/alternative_error_page_override_info.mojom-forward.h" #include "content/public/common/alternative_error_page_override_info.mojom-forward.h"
#include "content/public/common/page_visibility_state.h" #include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h" #include "content/public/common/window_container_type.mojom-forward.h"
@@ -1776,7 +1777,7 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -1781,7 +1782,7 @@ class CONTENT_EXPORT ContentBrowserClient {
// //
// If |relative_partition_path| is the empty string, it means this needs to // If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext. // create the default NetworkContext for the BrowserContext.
@ -75,7 +75,7 @@ index ceff9665cdb15..657f88d32efd4 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -1979,6 +1980,19 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -1984,6 +1985,19 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document, RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory); mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -95,7 +95,7 @@ index ceff9665cdb15..657f88d32efd4 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture. // Creates an OverlayWindow to be used for video or Picture-in-Picture.
// This window will house the content shown when in Picture-in-Picture mode. // This window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow. // This will return a new OverlayWindow.
@@ -2035,6 +2049,10 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2040,6 +2054,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string. // Used as part of the user agent string.
virtual std::string GetProduct(); virtual std::string GetProduct();
@ -132,10 +132,10 @@ index 77f2c4fbf8c88..ddbacedde912a 100644
// started. // started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 11759a9fcbe02..87936d85135d9 100644 index 3d3645fa25131..2b72ced4c62c4 100644
--- content/renderer/render_thread_impl.cc --- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc
@@ -628,6 +628,8 @@ void RenderThreadImpl::Init() { @@ -624,6 +624,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame); blink::URLLoaderThrottleProviderType::kFrame);
@ -145,10 +145,10 @@ index 11759a9fcbe02..87936d85135d9 100644
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
base::Unretained(this))); base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index e63b39bbeda10..06bd7d40d0f5c 100644 index decef7b3d86c0..4efa8338dc3b5 100644
--- content/renderer/renderer_blink_platform_impl.cc --- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc
@@ -976,6 +976,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { @@ -969,6 +969,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -165,11 +165,11 @@ index e63b39bbeda10..06bd7d40d0f5c 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>(); return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 1c83b5a848a35..909f986cc09df 100644 index a15ca0214e694..cdc2331096cc5 100644
--- content/renderer/renderer_blink_platform_impl.h --- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h
@@ -231,6 +231,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -232,6 +232,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
uint64_t private_memory_footprint_bytes) override; base::TimeDelta MinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif #endif
+ void DevToolsAgentAttached() override; + void DevToolsAgentAttached() override;
@ -179,7 +179,7 @@ index 1c83b5a848a35..909f986cc09df 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin. // plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite(); void SetIsLockedToSite();
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
index fab5d1d83f08c..012f4efe4f63e 100644 index b9f50848e2e75..3ac9b7c3d088a 100644
--- headless/lib/browser/headless_content_browser_client.cc --- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc
@@ -299,7 +299,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( @@ -299,7 +299,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
@ -200,7 +200,7 @@ index fab5d1d83f08c..012f4efe4f63e 100644
std::string HeadlessContentBrowserClient::GetProduct() { std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index 603ebb3aadfec..b189791360362 100644 index be37373d3d4e8..6741578a5f1b8 100644
--- headless/lib/browser/headless_content_browser_client.h --- headless/lib/browser/headless_content_browser_client.h
+++ headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h
@@ -79,7 +79,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { @@ -79,7 +79,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {

View File

@ -1,5 +1,5 @@
diff --git content/app/content_main.cc content/app/content_main.cc diff --git content/app/content_main.cc content/app/content_main.cc
index a3cc7fabebb07..d1e88823f7931 100644 index 3062f57603321..d8532c9c2eabb 100644
--- content/app/content_main.cc --- content/app/content_main.cc
+++ content/app/content_main.cc +++ content/app/content_main.cc
@@ -173,11 +173,8 @@ ContentMainParams::~ContentMainParams() = default; @@ -173,11 +173,8 @@ ContentMainParams::~ContentMainParams() = default;
@ -39,7 +39,7 @@ index a3cc7fabebb07..d1e88823f7931 100644
InitializeMac(); InitializeMac();
#endif #endif
@@ -321,16 +309,49 @@ RunContentProcess(ContentMainParams params, @@ -323,16 +311,49 @@ RunContentProcess(ContentMainParams params,
if (IsSubprocess()) if (IsSubprocess())
CommonSubprocessInit(); CommonSubprocessInit();
@ -59,7 +59,7 @@ index a3cc7fabebb07..d1e88823f7931 100644
+} +}
+ +
+void ContentMainShutdown(ContentMainRunner* content_main_runner) { +void ContentMainShutdown(ContentMainRunner* content_main_runner) {
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
content_main_runner->Shutdown(); content_main_runner->Shutdown();
#endif #endif
+} +}
@ -94,7 +94,7 @@ index a3cc7fabebb07..d1e88823f7931 100644
} }
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 8bfbf0e73fb8d..f80f322b65535 100644 index 0846656e45ba8..1f34295fb0544 100644
--- content/app/content_main_runner_impl.cc --- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
@ -105,7 +105,7 @@ index 8bfbf0e73fb8d..f80f322b65535 100644
#include "base/time/time.h" #include "base/time/time.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "build/build_config.h" #include "build/build_config.h"
@@ -1306,6 +1307,12 @@ void ContentMainRunnerImpl::Shutdown() { @@ -1300,6 +1301,12 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true; is_shutdown_ = true;
} }

View File

@ -146,7 +146,7 @@ index 39b2de869d225..5a4e621c650ee 100644
struct Data; struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
index e5d488e26c170..08d7c35b7cc5c 100644 index 02bf11a6de045..48d00a9c44123 100644
--- third_party/crashpad/crashpad/handler/BUILD.gn --- third_party/crashpad/crashpad/handler/BUILD.gn
+++ third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
@ -157,7 +157,7 @@ index e5d488e26c170..08d7c35b7cc5c 100644
import("../build/crashpad_buildconfig.gni") import("../build/crashpad_buildconfig.gni")
static_library("handler") { static_library("handler") {
@@ -58,6 +59,17 @@ static_library("handler") { @@ -62,6 +63,17 @@ static_library("handler") {
] ]
} }
@ -175,7 +175,7 @@ index e5d488e26c170..08d7c35b7cc5c 100644
public_configs = [ "..:crashpad_config" ] public_configs = [ "..:crashpad_config" ]
public_deps = [ public_deps = [
@@ -73,6 +85,7 @@ static_library("handler") { @@ -77,6 +89,7 @@ static_library("handler") {
"../snapshot", "../snapshot",
"../third_party/mini_chromium:chromeos_buildflags", "../third_party/mini_chromium:chromeos_buildflags",
"../tools:tool_support", "../tools:tool_support",

View File

@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index f213668d18044..32a2d4bcfb1b8 100644 index 9d9a0aac10a35..d1498a8f9df2b 100644
--- components/embedder_support/user_agent_utils.cc --- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@

View File

@ -161,7 +161,7 @@ index 9ba85048d1fcf..f3a5b8bc9bda0 100644
// A pointer to the current or speculative main frame in `host_contents_`. We // A pointer to the current or speculative main frame in `host_contents_`. We
// can't access this frame through the `host_contents_` directly as it does // can't access this frame through the `host_contents_` directly as it does
diff --git extensions/browser/extension_registry.cc extensions/browser/extension_registry.cc diff --git extensions/browser/extension_registry.cc extensions/browser/extension_registry.cc
index f142a40362c75..ed283ef8f1251 100644 index c3197eb4790fa..1e7ae767b0582 100644
--- extensions/browser/extension_registry.cc --- extensions/browser/extension_registry.cc
+++ extensions/browser/extension_registry.cc +++ extensions/browser/extension_registry.cc
@@ -6,9 +6,14 @@ @@ -6,9 +6,14 @@
@ -250,7 +250,7 @@ index 115f31f9ce46d..914b2564d5a21 100644
base::BindOnce(&ProcessManager::HandleCloseExtensionHost, base::BindOnce(&ProcessManager::HandleCloseExtensionHost,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc
index 53ad0736cfbdf..c252591fa646d 100644 index a8108350ddde2..7ae49e78b4327 100644
--- extensions/common/extensions_client.cc --- extensions/common/extensions_client.cc
+++ extensions/common/extensions_client.cc +++ extensions/common/extensions_client.cc
@@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr; @@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr;

View File

@ -12,7 +12,7 @@ index a9b0a5a827fc8..9a0fd388756f3 100644
# https://crbug.com/474506. # https://crbug.com/474506.
"//clank/java/BUILD.gn", "//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index 057b4081c95e5..9817b4c62a89e 100644 index 6b729528b79bd..3b04670a846d6 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -18,6 +18,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -18,6 +18,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@ -23,7 +23,7 @@ index 057b4081c95e5..9817b4c62a89e 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//components/nacl/features.gni") import("//components/nacl/features.gni")
import("//device/vr/buildflags/buildflags.gni") import("//device/vr/buildflags/buildflags.gni")
@@ -279,6 +280,10 @@ group("gn_all") { @@ -278,6 +279,10 @@ group("gn_all") {
deps += root_extra_deps deps += root_extra_deps
@ -35,19 +35,18 @@ index 057b4081c95e5..9817b4c62a89e 100644
deps += [ "//printing:printing_unittests" ] deps += [ "//printing:printing_unittests" ]
} }
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
index 2314ab505bfa2..f10698a79102e 100644 index 1da479dd5eebc..ff9c7e467997c 100644
--- build/config/win/visual_studio_version.gni --- build/config/win/visual_studio_version.gni
+++ build/config/win/visual_studio_version.gni +++ build/config/win/visual_studio_version.gni
@@ -5,21 +5,23 @@ @@ -5,15 +5,14 @@
declare_args() { declare_args() {
# Path to Visual Studio. If empty, the default is used which is to use the # Path to Visual Studio. If empty, the default is used which is to use the
# automatic toolchain in depot_tools. If set, you must also set the # automatic toolchain in depot_tools. If set, you must also set the
- # visual_studio_version and wdk_path. - # visual_studio_version, wdk_path and windows_sdk_version.
+ # visual_studio_version, wdk_path and windows_sdk_version. + # visual_studio_version, visual_studio_runtime_dirs and windows_sdk_version.
visual_studio_path = "" visual_studio_path = ""
# Version of Visual Studio pointed to by the visual_studio_path. # Version of Visual Studio pointed to by the visual_studio_path.
# Currently always "2015".
visual_studio_version = "" visual_studio_version = ""
- # Directory of the Windows driver kit. If visual_studio_path is empty, this - # Directory of the Windows driver kit. If visual_studio_path is empty, this
@ -58,15 +57,7 @@ index 2314ab505bfa2..f10698a79102e 100644
# Full path to the Windows SDK, not including a backslash at the end. # Full path to the Windows SDK, not including a backslash at the end.
# This value is the default location, override if you have a different # This value is the default location, override if you have a different
# installation location. @@ -31,14 +30,13 @@ if (visual_studio_path == "") {
windows_sdk_path = "C:\Program Files (x86)\Windows Kits\10"
+
+ # Version of the Windows SDK pointed to by the windows_sdk_path.
+ windows_sdk_version = ""
}
if (visual_studio_path == "") {
@@ -29,12 +31,13 @@ if (visual_studio_path == "") {
windows_sdk_version = toolchain_data.sdk_version windows_sdk_version = toolchain_data.sdk_version
windows_sdk_path = toolchain_data.sdk_path windows_sdk_path = toolchain_data.sdk_path
visual_studio_version = toolchain_data.vs_version visual_studio_version = toolchain_data.vs_version
@ -75,14 +66,14 @@ index 2314ab505bfa2..f10698a79102e 100644
} else { } else {
assert(visual_studio_version != "", assert(visual_studio_version != "",
"You must set the visual_studio_version if you set the path") "You must set the visual_studio_version if you set the path")
- assert(wdk_path != "",
- "You must set the wdk_path if you set the visual studio path")
- visual_studio_runtime_dirs = []
+ assert(windows_sdk_version != "",
+ "You must set the windows_sdk_version if you set the path")
+ assert(visual_studio_runtime_dirs != "", + assert(visual_studio_runtime_dirs != "",
+ "You must set the visual_studio_runtime_dirs if you set the visual " + + "You must set the visual_studio_runtime_dirs if you set the visual " +
+ "studio path") + "studio path")
assert(windows_sdk_version != "",
"You must set the windows_sdk_version if you set the path")
- assert(wdk_path != "",
- "You must set the wdk_path if you set the visual studio path")
- visual_studio_runtime_dirs = []
} }
diff --git chrome/app/framework.order chrome/app/framework.order diff --git chrome/app/framework.order chrome/app/framework.order
index 60f573a736ba5..90dd6d0b37314 100644 index 60f573a736ba5..90dd6d0b37314 100644
@ -98,7 +89,7 @@ index 60f573a736ba5..90dd6d0b37314 100644
+_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow
+ +
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index b3f457a9ce656..1af43bc3bb657 100644 index 84da6451a03ba..ff641f5bdc4c6 100644
--- chrome/chrome_paks.gni --- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni +++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")

View File

@ -0,0 +1,23 @@
diff --git gpu/BUILD.gn gpu/BUILD.gn
index 671a9e7643de0..498d60c1d35f6 100644
--- gpu/BUILD.gn
+++ gpu/BUILD.gn
@@ -675,7 +675,6 @@ test("gpu_unittests") {
":test_support",
"//base",
"//base/test:test_support",
- "//base/test:test_trace_processor",
"//base/third_party/dynamic_annotations",
"//build:chromeos_buildflags",
"//cc:test_support",
@@ -715,6 +714,10 @@ test("gpu_unittests") {
"//url",
]
+ if (enable_base_tracing) {
+ deps += [ "//base/test:test_trace_processor" ]
+ }
+
if (is_android) {
deps += [
"//ui/android:ui_java",

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index d8a54f29cdc9b..127f545f967ee 100644 index 03c4a6a04c123..92e0ba938198b 100644
--- tools/gritsettings/resource_ids.spec --- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec
@@ -1121,6 +1121,15 @@ @@ -1118,6 +1118,15 @@
# END "everything else" section. # END "everything else" section.
# Everything but chrome/, components/, content/, and ios/ # Everything but chrome/, components/, content/, and ios/

View File

@ -1,5 +1,5 @@
diff --git third_party/blink/renderer/platform/heap/thread_local.h third_party/blink/renderer/platform/heap/thread_local.h diff --git third_party/blink/renderer/platform/heap/thread_local.h third_party/blink/renderer/platform/heap/thread_local.h
index 6993877c6c3ad..bf4f1626fa332 100644 index e0519b0982e43..40637ce5952e3 100644
--- third_party/blink/renderer/platform/heap/thread_local.h --- third_party/blink/renderer/platform/heap/thread_local.h
+++ third_party/blink/renderer/platform/heap/thread_local.h +++ third_party/blink/renderer/platform/heap/thread_local.h
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@

View File

@ -1,5 +1,5 @@
diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn
index b434121d8f4ea..3c70588acfbec 100644 index 5e9f447e4d946..64450c1a1f48e 100644
--- device/bluetooth/BUILD.gn --- device/bluetooth/BUILD.gn
+++ device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn
@@ -46,10 +46,12 @@ source_set("deprecated_experimental_mojo") { @@ -46,10 +46,12 @@ source_set("deprecated_experimental_mojo") {

View File

@ -1,5 +1,5 @@
diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc
index 5520e15c232c8..2648037fcf37e 100644 index 63af3dd95eada..dc89a9c5c5e47 100644
--- printing/printing_context_linux.cc --- printing/printing_context_linux.cc
+++ printing/printing_context_linux.cc +++ printing/printing_context_linux.cc
@@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { @@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
@ -13,10 +13,10 @@ index 5520e15c232c8..2648037fcf37e 100644
if (!print_dialog_) if (!print_dialog_)
- print_dialog_ = ui::LinuxUi::instance()->CreatePrintDialog(this); - print_dialog_ = ui::LinuxUi::instance()->CreatePrintDialog(this);
+ print_dialog_ = ui::PrintingContextLinuxDelegate::instance()->CreatePrintDialog(this); + print_dialog_ = ui::PrintingContextLinuxDelegate::instance()->CreatePrintDialog(this);
print_dialog_->UseDefaultSettings();
#endif
@@ -82,8 +82,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { if (print_dialog_) {
print_dialog_->UseDefaultSettings();
@@ -85,8 +85,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -27,7 +27,7 @@ index 5520e15c232c8..2648037fcf37e 100644
#endif #endif
return gfx::Size(); return gfx::Size();
@@ -95,11 +95,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings( @@ -98,11 +98,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
DCHECK(!in_print_job_); DCHECK(!in_print_job_);
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -39,8 +39,8 @@ index 5520e15c232c8..2648037fcf37e 100644
- print_dialog_ = ui::LinuxUi::instance()->CreatePrintDialog(this); - print_dialog_ = ui::LinuxUi::instance()->CreatePrintDialog(this);
+ print_dialog_ = ui::PrintingContextLinuxDelegate::instance()->CreatePrintDialog(this); + print_dialog_ = ui::PrintingContextLinuxDelegate::instance()->CreatePrintDialog(this);
// PrintDialogGtk::UpdateSettings() calls InitWithSettings() so settings_ will if (print_dialog_) {
// remain non-null after this line. // PrintDialogGtk::UpdateSettings() calls InitWithSettings() so settings_ will
diff --git ui/linux/linux_ui.cc ui/linux/linux_ui.cc diff --git ui/linux/linux_ui.cc ui/linux/linux_ui.cc
index 29db798e8b171..f8b9546b90321 100644 index 29db798e8b171..f8b9546b90321 100644
--- ui/linux/linux_ui.cc --- ui/linux/linux_ui.cc
@ -76,7 +76,7 @@ index 29db798e8b171..f8b9546b90321 100644
} }
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
index b5fd57741d2f4..eaab5f1bd2b0b 100644 index 82d40cb5fa1b9..0a08bec8a6e61 100644
--- ui/linux/linux_ui.h --- ui/linux/linux_ui.h
+++ ui/linux/linux_ui.h +++ ui/linux/linux_ui.h
@@ -18,6 +18,10 @@ @@ -18,6 +18,10 @@

View File

@ -1,18 +0,0 @@
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
index e7bf81292b0f4..e700608f9b9d7 100644
--- ui/gl/init/gl_initializer_mac.cc
+++ ui/gl/init/gl_initializer_mac.cc
@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() {
// GPU-related stuff is very slow without this, probably because
// the sandbox prevents loading graphics drivers or some such.
std::vector<CGLPixelFormatAttribute> attribs;
- if (GLContext::SwitchableGPUsSupported()) {
- // Avoid switching to the discrete GPU just for this pixel
- // format selection.
- attribs.push_back(kCGLPFAAllowOfflineRenderers);
- }
+ // Avoid switching to the discrete GPU just for this pixel format selection.
+ attribs.push_back(kCGLPFAAllowOfflineRenderers);
attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
CGLPixelFormatObj format;

View File

@ -30,7 +30,7 @@ index 7f5be88878bc6..f72a323b0c8b6 100644
} }
if (has_msg) if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc diff --git base/task/current_thread.cc base/task/current_thread.cc
index 05daff869644c..ccd19eade21ed 100644 index b062ee6f827b7..675a604f4b859 100644
--- base/task/current_thread.cc --- base/task/current_thread.cc
+++ base/task/current_thread.cc +++ base/task/current_thread.cc
@@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver( @@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver(
@ -43,10 +43,10 @@ index 05daff869644c..ccd19eade21ed 100644
current_->RemoveDestructionObserver(destruction_observer); current_->RemoveDestructionObserver(destruction_observer);
} }
diff --git base/task/current_thread.h base/task/current_thread.h diff --git base/task/current_thread.h base/task/current_thread.h
index 6e5aea5de684f..22019f157eabd 100644 index c7e113456e011..041656ff606a8 100644
--- base/task/current_thread.h --- base/task/current_thread.h
+++ base/task/current_thread.h +++ base/task/current_thread.h
@@ -132,6 +132,12 @@ class BASE_EXPORT CurrentThread { @@ -133,6 +133,12 @@ class BASE_EXPORT CurrentThread {
// with a null callback to clear any potentially pending callbacks. // with a null callback to clear any potentially pending callbacks.
void RegisterOnNextIdleCallback(OnceClosure on_next_idle_callback); void RegisterOnNextIdleCallback(OnceClosure on_next_idle_callback);
@ -59,7 +59,7 @@ index 6e5aea5de684f..22019f157eabd 100644
// Enables nested task processing in scope of an upcoming native message loop. // Enables nested task processing in scope of an upcoming native message loop.
// Some unwanted message loops may occur when using common controls or printer // Some unwanted message loops may occur when using common controls or printer
// functions. Hence, nested task processing is disabled by default to avoid // functions. Hence, nested task processing is disabled by default to avoid
@@ -196,6 +202,13 @@ class BASE_EXPORT CurrentThread { @@ -197,6 +203,13 @@ class BASE_EXPORT CurrentThread {
friend class web::WebTaskEnvironment; friend class web::WebTaskEnvironment;
raw_ptr<sequence_manager::internal::SequenceManagerImpl> current_; raw_ptr<sequence_manager::internal::SequenceManagerImpl> current_;

View File

@ -0,0 +1,30 @@
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
index d0084f3359be2..7acb2178c38f8 100644
--- components/metrics/persistent_system_profile.cc
+++ components/metrics/persistent_system_profile.cc
@@ -370,6 +370,10 @@ bool PersistentSystemProfile::GetSystemProfile(
return true;
}
+void PersistentSystemProfile::DetachFromCurrentThread() {
+ DETACH_FROM_THREAD(thread_checker_);
+}
+
// static
void PersistentSystemProfile::MergeUpdateRecords(
const base::PersistentMemoryAllocator& memory_allocator,
diff --git components/metrics/persistent_system_profile.h components/metrics/persistent_system_profile.h
index 1c5a7491b4f0a..b990176df875f 100644
--- components/metrics/persistent_system_profile.h
+++ components/metrics/persistent_system_profile.h
@@ -61,6 +61,10 @@ class PersistentSystemProfile {
const base::PersistentMemoryAllocator& memory_allocator,
SystemProfileProto* system_profile);
+ // Detaches this object from the current thread in preparation for a move to
+ // a different thread.
+ void DetachFromCurrentThread();
+
private:
friend class PersistentSystemProfileTest;

View File

@ -10,10 +10,10 @@ index f936d951fe272..90a3165172dce 100644
+// This load will not send any cookies. For CEF usage. +// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) +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 diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 48d7ae0d56f20..f8546bd81957c 100644 index 2ccb6fa76ddc6..f08dd2f2469a6 100644
--- net/url_request/url_request_http_job.cc --- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc
@@ -1714,7 +1714,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { @@ -1709,7 +1709,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode // Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as // is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case. // blocked cookies still need to be logged in that case.

View File

@ -41,10 +41,10 @@ index afefe3cd83dee..6668463247644 100644
} // namespace content } // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 5c162ee2f6edd..c6f31297e33fe 100644 index 6dab72c3c7471..5578384004d36 100644
--- content/browser/renderer_host/render_widget_host_impl.cc --- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3144,6 +3144,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { @@ -3140,6 +3140,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
} }
@ -57,7 +57,7 @@ index 5c162ee2f6edd..c6f31297e33fe 100644
const WebInputEvent& event) { const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled( if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index 5b2482ee77ef3..54fa2ea322206 100644 index f4775ddc34202..e5de7f864ed23 100644
--- content/browser/renderer_host/render_widget_host_impl.h --- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h
@@ -791,6 +791,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -791,6 +791,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index 6fe1ebe84e584..2500dac50ffe3 100644 index 4b7fcf619a55d..139fd5b4a2bd0 100644
--- chrome/browser/download/download_prefs.cc --- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
@ -21,7 +21,7 @@ index 6fe1ebe84e584..2500dac50ffe3 100644
using content::BrowserContext; using content::BrowserContext;
using content::BrowserThread; using content::BrowserThread;
using content::DownloadManager; using content::DownloadManager;
@@ -355,6 +360,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( @@ -358,6 +363,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
// static // static
DownloadPrefs* DownloadPrefs::FromBrowserContext( DownloadPrefs* DownloadPrefs::FromBrowserContext(
content::BrowserContext* context) { content::BrowserContext* context) {
@ -45,26 +45,6 @@ index f2dca42faf347..458703a565501 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/task_manager/web_contents_tags.h" #include "chrome/browser/task_manager/web_contents_tags.h"
diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc
index a2adc3c992aba..8cd9aa18e2383 100644
--- chrome/browser/printing/print_view_manager_base.cc
+++ chrome/browser/printing/print_view_manager_base.cc
@@ -625,13 +625,14 @@ void PrintViewManagerBase::UpdatePrintSettings(
job_settings.Set(kSettingRasterizePdfDpi, value);
}
+ content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
auto callback_wrapper =
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
weak_ptr_factory_.GetWeakPtr(), std::move(callback));
std::unique_ptr<PrinterQuery> printer_query = queue_->PopPrinterQuery(cookie);
if (!printer_query) {
printer_query =
- queue_->CreatePrinterQuery(content::GlobalRenderFrameHostId());
+ queue_->CreatePrinterQuery(render_frame_host->GetGlobalId());
}
auto* printer_query_ptr = printer_query.get();
printer_query_ptr->SetSettings(
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
index 5d1658999d5bb..d1b7b7288c946 100644 index 5d1658999d5bb..d1b7b7288c946 100644
--- chrome/browser/resources/print_preview/ui/destination_dialog.html --- chrome/browser/resources/print_preview/ui/destination_dialog.html
@ -104,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 diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index e51bf24fcc74f..ed48fb4d6968d 100644 index fb8f4728eb559..a1a505a31e7af 100644
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -129,7 +109,7 @@ index e51bf24fcc74f..ed48fb4d6968d 100644
constexpr char kInvalidArgsForDidStartPreview[] = constexpr char kInvalidArgsForDidStartPreview[] =
"Invalid arguments for DidStartPreview"; "Invalid arguments for DidStartPreview";
constexpr char kInvalidPageNumberForDidPreviewPage[] = constexpr char kInvalidPageNumberForDidPreviewPage[] =
@@ -328,7 +336,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { @@ -326,7 +334,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
source->AddLocalizedStrings(kLocalizedStrings); source->AddLocalizedStrings(kLocalizedStrings);
#if !BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS)

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
index d01d616c3b1ea..580fa043bdc79 100644 index 7f77a94ddcdbc..149fe2bd90a13 100644
--- chrome/browser/printing/printer_query.cc --- chrome/browser/printing/printer_query.cc
+++ chrome/browser/printing/printer_query.cc +++ chrome/browser/printing/printer_query.cc
@@ -115,6 +115,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id) @@ -116,6 +116,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
rfh_id_(rfh_id), rfh_id_(rfh_id),
cookie_(PrintSettings::NewCookie()) { cookie_(PrintSettings::NewCookie()) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 39bd6ef7be6ec..a6ce95a1c8557 100644 index 172f0b47e2c77..a651cf056c52c 100644
--- content/browser/renderer_host/render_view_host_impl.cc --- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc
@@ -686,6 +686,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { @@ -686,6 +686,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {

View File

@ -1,36 +0,0 @@
diff --git components/rlz/rlz_tracker.cc components/rlz/rlz_tracker.cc
index b59d3ba6f1aa4..74e488cd4f3c6 100644
--- components/rlz/rlz_tracker.cc
+++ components/rlz/rlz_tracker.cc
@@ -219,7 +219,8 @@ class RLZTracker::WrapperURLLoaderFactory
// static
RLZTracker* RLZTracker::GetInstance() {
- return tracker_ ? tracker_ : base::Singleton<RLZTracker>::get();
+ static base::NoDestructor<RLZTracker> instance;
+ return tracker_ ? tracker_ : instance.get();
}
RLZTracker::RLZTracker()
diff --git components/rlz/rlz_tracker.h components/rlz/rlz_tracker.h
index 5e30a66838620..bd2166db1f53f 100644
--- components/rlz/rlz_tracker.h
+++ components/rlz/rlz_tracker.h
@@ -10,7 +10,7 @@
#include <string>
#include "base/memory/ref_counted.h"
-#include "base/memory/singleton.h"
+#include "base/no_destructor.h"
#include "base/sequence_checker.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"
@@ -128,7 +128,7 @@ class RLZTracker {
void PingNowImpl();
private:
- friend struct base::DefaultSingletonTraits<RLZTracker>;
+ friend class base::NoDestructor<RLZTracker>;
friend class base::RefCountedThreadSafe<RLZTracker>;
// Implementation called from SetRlzDelegate() static method.

View File

@ -26,10 +26,10 @@ index d2f5798ce6535..64d6d388c9a27 100644
if (cpu != 'x64'): if (cpu != 'x64'):
# x64 is default target CPU thus any other CPU requires a target set # x64 is default target CPU thus any other CPU requires a target set
diff --git build/vs_toolchain.py build/vs_toolchain.py diff --git build/vs_toolchain.py build/vs_toolchain.py
index a420dad636df4..f1ef2e914cd5e 100755 index a9cd6f03d9214..7ae775d6aca6d 100755
--- build/vs_toolchain.py --- build/vs_toolchain.py
+++ build/vs_toolchain.py +++ build/vs_toolchain.py
@@ -112,9 +112,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -114,9 +114,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs) runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH'] os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
elif sys.platform == 'win32' and not depot_tools_win_toolchain: elif sys.platform == 'win32' and not depot_tools_win_toolchain:
@ -46,7 +46,7 @@ index a420dad636df4..f1ef2e914cd5e 100755
# When using an installed toolchain these files aren't needed in the output # When using an installed toolchain these files aren't needed in the output
# directory in order to run binaries locally, but they are needed in order # directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output # to create isolates or the mini_installer. Copying them to the output
@@ -163,6 +170,10 @@ def _RegistryGetValue(key, value): @@ -165,6 +172,10 @@ def _RegistryGetValue(key, value):
def GetVisualStudioVersion(): def GetVisualStudioVersion():
"""Return best available version of Visual Studio. """Return best available version of Visual Studio.
""" """

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 diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 4cd6bcb8c4ace..6518bf9383621 100644 index 7098e7e553bcd..b1e4f4c9b9e0b 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc --- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -27,7 +27,7 @@ index 4cd6bcb8c4ace..6518bf9383621 100644
} }
absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() { absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
@@ -2238,6 +2241,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { @@ -2247,6 +2250,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
// This needs to happen only after |window_| has been initialized using // This needs to happen only after |window_| has been initialized using
// Init(), because it needs to have the layer. // Init(), because it needs to have the layer.
window_->SetEmbedFrameSinkId(frame_sink_id_); 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 diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
index 53383355d6646..d7a713017e16d 100644 index 6162047ffe892..0efb184682a00 100644
--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc --- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
+++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
@ -10,7 +10,7 @@ index 53383355d6646..d7a713017e16d 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/analysis/analysis_settings.h" #include "chrome/browser/enterprise/connectors/analysis/analysis_settings.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.h" #include "chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.h"
@@ -232,6 +233,9 @@ bool ContentAnalysisDelegate::IsEnabled( @@ -243,6 +244,9 @@ bool ContentAnalysisDelegate::IsEnabled(
GURL url, GURL url,
Data* data, Data* data,
enterprise_connectors::AnalysisConnector connector) { enterprise_connectors::AnalysisConnector connector) {
@ -21,7 +21,7 @@ index 53383355d6646..d7a713017e16d 100644
enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext(
profile); profile);
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index dd097856a0245..8f07b4b4bdfb2 100644 index db593e5f07ea8..5e72cd57ee0fa 100644
--- chrome/browser/net/profile_network_context_service.cc --- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -31,8 +31,8 @@ index dd097856a0245..8f07b4b4bdfb2 100644
+#include "cef/libcef/features/runtime.h" +#include "cef/libcef/features/runtime.h"
#include "chrome/browser/browser_features.h" #include "chrome/browser/browser_features.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/content_settings/cookie_settings_factory.h"
@@ -298,8 +299,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) @@ -300,8 +301,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile)
base::Unretained(this))); base::Unretained(this)));
cookie_settings_ = CookieSettingsFactory::GetForProfile(profile); cookie_settings_ = CookieSettingsFactory::GetForProfile(profile);
cookie_settings_observation_.Observe(cookie_settings_.get()); cookie_settings_observation_.Observe(cookie_settings_.get());
@ -45,18 +45,7 @@ index dd097856a0245..8f07b4b4bdfb2 100644
DisableQuicIfNotAllowed(); DisableQuicIfNotAllowed();
@@ -339,7 +342,9 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) @@ -810,7 +813,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base::Unretained(this)));
#if BUILDFLAG(ENABLE_EXTENSIONS)
- registry_observation_.Observe(extensions::ExtensionRegistry::Get(profile_));
+ if (auto extension_registry = extensions::ExtensionRegistry::Get(profile_)) {
+ registry_observation_.Observe(extension_registry);
+ }
#endif
}
@@ -832,7 +837,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
// Configure on-disk storage for non-OTR profiles. OTR profiles just use // Configure on-disk storage for non-OTR profiles. OTR profiles just use
// default behavior (in memory storage, default sizes). // default behavior (in memory storage, default sizes).
@ -77,7 +66,7 @@ index dd097856a0245..8f07b4b4bdfb2 100644
PrefService* local_state = g_browser_process->local_state(); PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size. // Configure the HTTP cache path and size.
base::FilePath base_cache_path; base::FilePath base_cache_path;
@@ -845,7 +862,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( @@ -823,7 +838,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base_cache_path.Append(chrome::kCacheDirname); base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size = network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize); local_state->GetInteger(prefs::kDiskCacheSize);
@ -88,7 +77,7 @@ index dd097856a0245..8f07b4b4bdfb2 100644
::network::mojom::NetworkContextFilePaths::New(); ::network::mojom::NetworkContextFilePaths::New();
diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc
index 0f92e4682eee9..ea6e6ed6f1e05 100644 index fd58815c03393..c3865639affb1 100644
--- chrome/browser/signin/identity_manager_factory.cc --- chrome/browser/signin/identity_manager_factory.cc
+++ chrome/browser/signin/identity_manager_factory.cc +++ chrome/browser/signin/identity_manager_factory.cc
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
@ -99,7 +88,7 @@ index 0f92e4682eee9..ea6e6ed6f1e05 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/image_fetcher/image_decoder_impl.h" #include "chrome/browser/image_fetcher/image_decoder_impl.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
@@ -82,6 +83,7 @@ IdentityManagerFactory::~IdentityManagerFactory() { @@ -89,6 +90,7 @@ IdentityManagerFactory::~IdentityManagerFactory() {
// static // static
signin::IdentityManager* IdentityManagerFactory::GetForProfile( signin::IdentityManager* IdentityManagerFactory::GetForProfile(
Profile* profile) { Profile* profile) {
@ -108,7 +97,7 @@ index 0f92e4682eee9..ea6e6ed6f1e05 100644
GetInstance()->GetServiceForBrowserContext(profile, true)); GetInstance()->GetServiceForBrowserContext(profile, true));
} }
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 44f52e0c14355..6b380a5bfe3c8 100644 index 6564239ce856a..1754df8ad05a9 100644
--- net/cookies/cookie_monster.cc --- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc
@@ -554,6 +554,25 @@ void CookieMonster::SetCookieableSchemes( @@ -554,6 +554,25 @@ void CookieMonster::SetCookieableSchemes(
@ -167,7 +156,7 @@ index 61fd008fc067e..73909be088278 100644
// reset to null. // reset to null.
const CookieAccessDelegate* cookie_access_delegate() const { const CookieAccessDelegate* cookie_access_delegate() const {
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index 5b4fe64a4374a..780c9726a03d3 100644 index ba7f48e90026c..a509cc4565e9f 100644
--- services/network/cookie_manager.cc --- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc +++ services/network/cookie_manager.cc
@@ -283,14 +283,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -283,14 +283,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) {
@ -189,10 +178,10 @@ index 5b4fe64a4374a..780c9726a03d3 100644
void CookieManager::SetForceKeepSessionState() { void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc diff --git services/network/network_context.cc services/network/network_context.cc
index 569b32218cb3c..cf041cc909878 100644 index 7301ba6c8992e..c34a2919fa9d0 100644
--- services/network/network_context.cc --- services/network/network_context.cc
+++ services/network/network_context.cc +++ services/network/network_context.cc
@@ -2257,16 +2257,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( @@ -2297,16 +2297,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator()); network_service_->network_quality_estimator());
} }
@ -221,10 +210,10 @@ index 569b32218cb3c..cf041cc909878 100644
trust_token_store_ = std::make_unique<PendingTrustTokenStore>(); trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 9433e0e6bbd2c..8f15dca8748a2 100644 index f32ad0616a72f..c6cc5fcacf34b 100644
--- services/network/public/mojom/network_context.mojom --- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom
@@ -349,6 +349,9 @@ struct NetworkContextParams { @@ -346,6 +346,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false. // cookies. Otherwise it should be false.
bool persist_session_cookies = false; bool persist_session_cookies = false;

View File

@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index c0a0fa84be58e..59543775a9c5b 100644 index e5185febf2cc3..fc296d35427f0 100644
--- content/browser/storage_partition_impl.cc --- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc
@@ -494,10 +494,6 @@ class LoginHandlerDelegate { @@ -496,10 +496,6 @@ class LoginHandlerDelegate {
} }
WebContents* web_contents = web_contents_getter_.Run(); WebContents* web_contents = web_contents_getter_.Run();
@ -13,7 +13,7 @@ index c0a0fa84be58e..59543775a9c5b 100644
// WeakPtr is not strictly necessary here due to OnRequestCancelled. // WeakPtr is not strictly necessary here due to OnRequestCancelled.
creating_login_delegate_ = true; creating_login_delegate_ = true;
@@ -549,12 +545,6 @@ void OnAuthRequiredContinuation( @@ -551,12 +547,6 @@ void OnAuthRequiredContinuation(
mojo::PendingRemote<network::mojom::AuthChallengeResponder> mojo::PendingRemote<network::mojom::AuthChallengeResponder>
auth_challenge_responder, auth_challenge_responder,
base::RepeatingCallback<WebContents*(void)> web_contents_getter) { base::RepeatingCallback<WebContents*(void)> web_contents_getter) {
@ -26,7 +26,7 @@ index c0a0fa84be58e..59543775a9c5b 100644
new LoginHandlerDelegate( new LoginHandlerDelegate(
std::move(auth_challenge_responder), std::move(web_contents_getter), std::move(auth_challenge_responder), std::move(web_contents_getter),
auth_info, is_request_for_primary_main_frame, process_id, request_id, url, auth_info, is_request_for_primary_main_frame, process_id, request_id, url,
@@ -2985,8 +2975,12 @@ void StoragePartitionImpl::GetQuotaSettings( @@ -3050,8 +3040,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return; return;
} }
@ -40,7 +40,7 @@ index c0a0fa84be58e..59543775a9c5b 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback)); storage::GetDefaultDeviceInfoHelper(), std::move(callback));
} }
@@ -2996,9 +2990,12 @@ void StoragePartitionImpl::InitNetworkContext() { @@ -3061,9 +3055,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params = cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New(); cert_verifier::mojom::CertVerifierCreationParams::New();

View File

@ -1,8 +1,8 @@
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
index 3bfd99c004c55..e95bb2a6d78c2 100644 index 0e1d0b858e9d9..79cc66c6c2e8e 100644
--- content/browser/blob_storage/chrome_blob_storage_context.cc --- content/browser/blob_storage/chrome_blob_storage_context.cc
+++ content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -122,7 +122,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( @@ -124,7 +124,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
// If we're not incognito mode, schedule all of our file tasks to enable // If we're not incognito mode, schedule all of our file tasks to enable
// disk on the storage context. // disk on the storage context.

View File

@ -1,8 +1,8 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index ee17e77330c49..3a4bbed8d4db4 100644 index 7146ce14ee1a2..acaedc4761331 100644
--- base/trace_event/builtin_categories.h --- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h
@@ -64,6 +64,8 @@ @@ -63,6 +63,8 @@
X("cc") \ X("cc") \
X("cc.debug") \ X("cc.debug") \
X("cdp.perf") \ X("cdp.perf") \

View File

@ -1,9 +1,9 @@
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index f1f8f33165a4a..8b07817c654e8 100644 index 50eeaa9acca98..eb4c7aa70de9c 100644
--- ui/base/models/menu_model.h --- ui/base/models/menu_model.h
+++ ui/base/models/menu_model.h +++ ui/base/models/menu_model.h
@@ -15,8 +15,11 @@ @@ -17,8 +17,11 @@
#include "ui/base/models/menu_separator_types.h" #include "ui/color/color_id.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
+#include "third_party/skia/include/core/SkColor.h" +#include "third_party/skia/include/core/SkColor.h"
@ -14,7 +14,7 @@ index f1f8f33165a4a..8b07817c654e8 100644
} }
namespace ui { namespace ui {
@@ -147,6 +150,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel @@ -149,6 +152,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel
// |event_flags| is a bit mask of ui::EventFlags. // |event_flags| is a bit mask of ui::EventFlags.
virtual void ActivatedAt(size_t index, int event_flags); virtual void ActivatedAt(size_t index, int event_flags);
@ -106,10 +106,10 @@ index 3c78525361ebf..c922dfe5019a3 100644
} // namespace gfx } // namespace gfx
diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h
index a1d08dcdf927a..d2e97e608b357 100644 index 4512e4e37cb76..ca39d737e9723 100644
--- ui/views/animation/ink_drop_host.h --- ui/views/animation/ink_drop_host.h
+++ ui/views/animation/ink_drop_host.h +++ ui/views/animation/ink_drop_host.h
@@ -181,6 +181,8 @@ class VIEWS_EXPORT InkDropHost { @@ -186,6 +186,8 @@ class VIEWS_EXPORT InkDropHost {
View* host_view() { return host_view_; } View* host_view() { return host_view_; }
const View* host_view() const { return host_view_; } const View* host_view() const { return host_view_; }
@ -119,10 +119,10 @@ index a1d08dcdf927a..d2e97e608b357 100644
friend class test::InkDropHostTestApi; friend class test::InkDropHostTestApi;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 55f76e5035abb..4b1cd927c591d 100644 index ca061545ed8f2..711207914f1fa 100644
--- ui/views/controls/button/label_button.cc --- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc
@@ -534,6 +534,12 @@ void LabelButton::OnThemeChanged() { @@ -552,6 +552,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint(); SchedulePaint();
} }
@ -136,10 +136,10 @@ index 55f76e5035abb..4b1cd927c591d 100644
Button::StateChanged(old_state); Button::StateChanged(old_state);
ResetLabelEnabledColor(); ResetLabelEnabledColor();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index 80e21893c23fb..29b05f765c016 100644 index e641dc163c5fc..785ccd20e4dd4 100644
--- ui/views/controls/button/label_button.h --- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h
@@ -144,6 +144,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { @@ -150,6 +150,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
ui::NativeTheme::State GetForegroundThemeState( ui::NativeTheme::State GetForegroundThemeState(
ui::NativeTheme::ExtraParams* params) const override; ui::NativeTheme::ExtraParams* params) const override;
@ -150,7 +150,7 @@ index 80e21893c23fb..29b05f765c016 100644
ImageView* image() const { return image_; } ImageView* image() const { return image_; }
Label* label() const { return label_; } Label* label() const { return label_; }
diff --git ui/views/controls/label.cc ui/views/controls/label.cc diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index cc9794448399b..22e2abfd34b0f 100644 index 37c22391d5c94..d96f63ed47ec2 100644
--- ui/views/controls/label.cc --- ui/views/controls/label.cc
+++ ui/views/controls/label.cc +++ ui/views/controls/label.cc
@@ -51,12 +51,29 @@ enum LabelPropertyKey { @@ -51,12 +51,29 @@ enum LabelPropertyKey {
@ -183,7 +183,7 @@ index cc9794448399b..22e2abfd34b0f 100644
} // namespace } // namespace
namespace views { namespace views {
@@ -454,6 +471,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { @@ -458,6 +475,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged);
} }
@ -199,7 +199,7 @@ index cc9794448399b..22e2abfd34b0f 100644
std::u16string Label::GetTooltipText() const { std::u16string Label::GetTooltipText() const {
return tooltip_text_; return tooltip_text_;
} }
@@ -759,6 +785,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const { @@ -763,6 +789,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SelectRange(stored_selection_range_); render_text->SelectRange(stored_selection_range_);
} }
@ -217,10 +217,10 @@ index cc9794448399b..22e2abfd34b0f 100644
} }
diff --git ui/views/controls/label.h ui/views/controls/label.h diff --git ui/views/controls/label.h ui/views/controls/label.h
index cfcc785aec6e2..1eedb3474e4af 100644 index 03c33a87c8ee2..3cd41c96ab504 100644
--- ui/views/controls/label.h --- ui/views/controls/label.h
+++ ui/views/controls/label.h +++ ui/views/controls/label.h
@@ -241,6 +241,10 @@ class VIEWS_EXPORT Label : public View, @@ -240,6 +240,10 @@ class VIEWS_EXPORT Label : public View,
gfx::ElideBehavior GetElideBehavior() const; gfx::ElideBehavior GetElideBehavior() const;
void SetElideBehavior(gfx::ElideBehavior elide_behavior); void SetElideBehavior(gfx::ElideBehavior elide_behavior);
@ -231,7 +231,7 @@ index cfcc785aec6e2..1eedb3474e4af 100644
// Gets/Sets the tooltip text. Default behavior for a label (single-line) is // Gets/Sets the tooltip text. Default behavior for a label (single-line) is
// to show the full text if it is wider than its bounds. Calling this // to show the full text if it is wider than its bounds. Calling this
// overrides the default behavior and lets you set a custom tooltip. To // overrides the default behavior and lets you set a custom tooltip. To
@@ -501,6 +505,7 @@ class VIEWS_EXPORT Label : public View, @@ -500,6 +504,7 @@ class VIEWS_EXPORT Label : public View,
int max_width_ = 0; int max_width_ = 0;
// This is used in single-line mode. // This is used in single-line mode.
int max_width_single_line_ = 0; int max_width_single_line_ = 0;
@ -240,7 +240,7 @@ index cfcc785aec6e2..1eedb3474e4af 100644
std::unique_ptr<SelectionController> selection_controller_; std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 2309794bb1692..ad6730b449bf9 100644 index 9752106bd171b..3a9b02408373d 100644
--- ui/views/controls/menu/menu_controller.cc --- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc
@@ -471,7 +471,8 @@ void MenuController::Run(Widget* parent, @@ -471,7 +471,8 @@ void MenuController::Run(Widget* parent,
@ -266,10 +266,10 @@ index 2309794bb1692..ad6730b449bf9 100644
params.native_view_for_gestures = native_view_for_gestures_; params.native_view_for_gestures = native_view_for_gestures_;
params.owned_window_anchor = anchor; params.owned_window_anchor = anchor;
+ params.parent_widget = parent_widget_; + params.parent_widget = parent_widget_;
if (item->GetParentMenuItem()) { if (item->GetParentMenuItem()) {
params.context = state_.item->GetWidget(); params.context = item->GetWidget();
@@ -2896,8 +2899,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( // (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -2900,8 +2903,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item; MenuItemView* item = pending_state_.item;
@ -281,10 +281,10 @@ index 2309794bb1692..ad6730b449bf9 100644
+ base::i18n::IsRTL()); + base::i18n::IsRTL());
return; return;
+ } + }
MenuItemView* to_select = nullptr;
if (!item->GetSubmenu()->GetMenuItems().empty()) // Show the sub-menu.
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -2916,8 +2924,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { @@ -2921,8 +2929,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() { void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item; MenuItemView* item = state_.item;
DCHECK(item); DCHECK(item);
@ -297,7 +297,7 @@ index 2309794bb1692..ad6730b449bf9 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem()) else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
index ddc2dc5a381bb..c27f38c5e785e 100644 index 2dd7c64ce4328..c456df19ddb53 100644
--- ui/views/controls/menu/menu_controller.h --- ui/views/controls/menu/menu_controller.h
+++ ui/views/controls/menu/menu_controller.h +++ ui/views/controls/menu/menu_controller.h
@@ -113,7 +113,9 @@ class VIEWS_EXPORT MenuController @@ -113,7 +113,9 @@ class VIEWS_EXPORT MenuController
@ -311,7 +311,7 @@ index ddc2dc5a381bb..c27f38c5e785e 100644
bool for_drop() const { return for_drop_; } bool for_drop() const { return for_drop_; }
@@ -730,6 +732,8 @@ class VIEWS_EXPORT MenuController @@ -724,6 +726,8 @@ class VIEWS_EXPORT MenuController
// RunType::SEND_GESTURE_EVENTS_TO_OWNER is set. // RunType::SEND_GESTURE_EVENTS_TO_OWNER is set.
gfx::NativeView native_view_for_gestures_ = nullptr; gfx::NativeView native_view_for_gestures_ = nullptr;
@ -360,7 +360,7 @@ index b8fa1c116ebcd..015f15ed72385 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu); virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
index 821826daa9e9a..626b8b540fd00 100644 index d246468d9510b..baf6a250bca8d 100644
--- ui/views/controls/menu/menu_host.cc --- ui/views/controls/menu/menu_host.cc
+++ 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) { @@ -143,6 +143,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
@ -396,10 +396,10 @@ index 67cdb883886f8..4ca7d632ad7f9 100644
explicit MenuHost(SubmenuView* submenu); explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index d49c73d71593e..84bbf9fd78fde 100644 index 946028ff36e25..7d63a6ba799d5 100644
--- ui/views/controls/menu/menu_item_view.cc --- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc
@@ -1097,6 +1097,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, @@ -1109,6 +1109,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@ -415,7 +415,7 @@ index d49c73d71593e..84bbf9fd78fde 100644
} else if (paint_as_selected) { } else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds(); gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) { if (type_ == Type::kActionableSubMenu) {
@@ -1163,6 +1172,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { @@ -1175,6 +1184,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
} }
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@ -426,11 +426,11 @@ index d49c73d71593e..84bbf9fd78fde 100644
+ return text_color; + return text_color;
+ } + }
+ +
style::TextContext context = // Use a custom color if provided by the controller. If the item is selected,
GetMenuController() && GetMenuController()->use_ash_system_ui_layout() // use the default color.
? style::CONTEXT_TOUCH_MENU 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 diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index daf9fff97149b..39ba5daae6eb1 100644 index e826d42492872..2ade4b2f44df5 100644
--- ui/views/controls/menu/menu_model_adapter.cc --- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
@ -441,7 +441,7 @@ index daf9fff97149b..39ba5daae6eb1 100644
#include <list> #include <list>
#include <memory> #include <memory>
#include <utility> #include <utility>
@@ -220,6 +221,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const { @@ -221,6 +222,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
return model->IsItemCheckedAt(index); return model->IsItemCheckedAt(index);
} }
@ -651,10 +651,10 @@ index 50291eb07440a..9716791a463aa 100644
void Cancel() override; void Cancel() override;
base::TimeTicks GetClosingEventTime() const override; base::TimeTicks GetClosingEventTime() const override;
diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm
index 5f8fdc6564efd..9dbe6f06764b0 100644 index 46a50f5a808c3..689c7d3afb21c 100644
--- ui/views/controls/menu/menu_runner_impl_cocoa.mm --- ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ ui/views/controls/menu/menu_runner_impl_cocoa.mm +++ ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -194,6 +194,7 @@ void MenuRunnerImplCocoa::RunMenuAt( @@ -193,6 +193,7 @@ void MenuRunnerImplCocoa::RunMenuAt(
MenuAnchorPosition anchor, MenuAnchorPosition anchor,
int32_t run_types, int32_t run_types,
gfx::NativeView native_view_for_gestures, gfx::NativeView native_view_for_gestures,
@ -676,10 +676,10 @@ index cf696fbcf0714..5c48fd7410b88 100644
// Hides and cancels the menu. // Hides and cancels the menu.
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index e9102acc407c8..46a0cfb8bf436 100644 index 629877961fe6b..d41bfca45103e 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc --- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -263,6 +263,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) @@ -260,6 +260,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ = background_view_->AddChildView( scroll_down_button_ = background_view_->AddChildView(
std::make_unique<MenuScrollButton>(content_view, false)); std::make_unique<MenuScrollButton>(content_view, false));
@ -716,7 +716,7 @@ index 983f9390aa1f6..d6db1ea93e0ef 100644
#if !BUILDFLAG(IS_CHROMEOS_LACROS) #if !BUILDFLAG(IS_CHROMEOS_LACROS)
if (root_location != root_current_location && if (root_location != root_current_location &&
diff --git ui/views/view.h ui/views/view.h diff --git ui/views/view.h ui/views/view.h
index 93a815e296c1c..f2031bb782795 100644 index d43db49340391..24b68b0d68eed 100644
--- ui/views/view.h --- ui/views/view.h
+++ ui/views/view.h +++ ui/views/view.h
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@ -727,7 +727,7 @@ index 93a815e296c1c..f2031bb782795 100644
#include "build/build_config.h" #include "build/build_config.h"
#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
@@ -285,7 +286,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, @@ -286,7 +287,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget, public ui::EventTarget,
public ui::EventHandler, public ui::EventHandler,
public ui::PropertyHandler, public ui::PropertyHandler,

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 diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 0c3953a9e8c68..c3ec0b1b6f79f 100644 index d770e7b922232..efb97d9a53574 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc --- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -656,6 +656,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { @@ -657,6 +657,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_; return scale_override_for_capture_;
} }
@ -152,10 +152,10 @@ index c4cb1c13fc35c..a9371d66f3f9c 100644
// Set the view's active state (i.e., tint state of controls). // Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0; virtual void SetActive(bool active) = 0;
diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc
index cbf300db6ec3a..0e41c846397c7 100644 index f681a199951f4..365fa8b4c2a46 100644
--- ui/ozone/platform/x11/x11_window.cc --- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc
@@ -1796,7 +1796,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { @@ -1801,7 +1801,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0; req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds); bounds_in_pixels_ = SanitizeBounds(bounds);
@ -243,10 +243,10 @@ index 01d4ffe408a84..fbe41fefbb2bd 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this}; base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
}; };
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index 1b890d3baef41..c47296b0971a9 100644 index e24a4268cdfa4..31e97cc4f61c2 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -273,8 +273,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -274,8 +274,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
if (properties.parent_widget) { if (properties.parent_widget) {
window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget( window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget(
properties.parent_widget); properties.parent_widget);
@ -258,7 +258,7 @@ index 1b890d3baef41..c47296b0971a9 100644
// Calculate initial bounds. // Calculate initial bounds.
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 0be1688818063..b627453be9f8b 100644 index d52fc15106eb3..070800332285c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -180,16 +180,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { @@ -180,16 +180,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@ -325,7 +325,7 @@ index 0be1688818063..b627453be9f8b 100644
SendEventToSink(event); SendEventToSink(event);
return event->handled(); return event->handled();
} }
@@ -1215,8 +1237,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { @@ -1220,8 +1242,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
// positions in variable-DPI situations. See https://crbug.com/1224715 for // positions in variable-DPI situations. See https://crbug.com/1224715 for
// details. // details.
aura::Window* root = nullptr; aura::Window* root = nullptr;
@ -344,10 +344,10 @@ index 0be1688818063..b627453be9f8b 100644
} }
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index b23ba1bf3a49f..f85ff1bef75e4 100644 index 2b935ac09209c..ef7d7a3675215 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -319,6 +319,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -320,6 +320,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed. // True if the window should have the frame removed.
bool remove_standard_frame_; bool remove_standard_frame_;
@ -359,10 +359,10 @@ index b23ba1bf3a49f..f85ff1bef75e4 100644
// the implementation of ::ShowCursor() is based on a counter, so making this // the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once // member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 1e80a2a1d3271..73c5297cba951 100644 index 3bf08b3dbabd9..81e36e24de16e 100644
--- ui/views/widget/widget.cc --- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc +++ ui/views/widget/widget.cc
@@ -366,7 +366,8 @@ void Widget::Init(InitParams params) { @@ -367,7 +367,8 @@ void Widget::Init(InitParams params) {
} }
params.child |= (params.type == InitParams::TYPE_CONTROL); params.child |= (params.type == InitParams::TYPE_CONTROL);
@ -372,7 +372,7 @@ index 1e80a2a1d3271..73c5297cba951 100644
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) { params.type != views::Widget::InitParams::TYPE_WINDOW) {
@@ -466,13 +467,21 @@ void Widget::Init(InitParams params) { @@ -467,13 +468,21 @@ void Widget::Init(InitParams params) {
if (show_state == ui::SHOW_STATE_MAXIMIZED) { if (show_state == ui::SHOW_STATE_MAXIMIZED) {
Maximize(); Maximize();
@ -395,7 +395,7 @@ index 1e80a2a1d3271..73c5297cba951 100644
} }
if (base::FeatureList::IsEnabled(features::kWidgetLayering)) { if (base::FeatureList::IsEnabled(features::kWidgetLayering)) {
@@ -1592,10 +1601,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { @@ -1597,10 +1606,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
} }
gfx::Size Widget::GetMinimumSize() const { gfx::Size Widget::GetMinimumSize() const {
@ -413,7 +413,7 @@ index 1e80a2a1d3271..73c5297cba951 100644
} }
diff --git ui/views/widget/widget.h ui/views/widget/widget.h diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index c179c718d0255..967a87c07d026 100644 index e8b02fc9df426..e4ecdd8764244 100644
--- ui/views/widget/widget.h --- ui/views/widget/widget.h
+++ ui/views/widget/widget.h +++ ui/views/widget/widget.h
@@ -351,6 +351,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -351,6 +351,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@ -455,10 +455,10 @@ index 3b9b00b7d79ae..e759e3c1a9f34 100644
if (native_widget_delegate->IsDialogBox()) { if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME; *style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index a73f04ed21dcb..d51a187990319 100644 index 5de1045439dca..94c6a8b2e914d 100644
--- ui/views/win/hwnd_message_handler.cc --- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc
@@ -942,8 +942,12 @@ bool HWNDMessageHandler::IsActive() const { @@ -939,8 +939,12 @@ bool HWNDMessageHandler::IsActive() const {
// In headless mode return expected activation state instead of the // In headless mode return expected activation state instead of the
// actual one. This ensures that onfocus/onblur notifications work // actual one. This ensures that onfocus/onblur notifications work
// as expected and no unexpected throttling occurs. // as expected and no unexpected throttling occurs.
@ -472,7 +472,7 @@ index a73f04ed21dcb..d51a187990319 100644
} }
bool HWNDMessageHandler::IsMinimized() const { bool HWNDMessageHandler::IsMinimized() const {
@@ -3300,10 +3304,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, @@ -3302,10 +3306,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) { } else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg); ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable. // Reroute the mouse wheel to the window under the pointer if applicable.

View File

@ -80,7 +80,7 @@ index 8af69cac78b74..9f74e511c263d 100644
private: private:
const HWND hwnd_; const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 21a1138ca8df2..283eb9f091583 100644 index 27c944acb2e84..bc491de193ded 100644
--- components/viz/service/BUILD.gn --- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn
@@ -220,6 +220,8 @@ viz_component("service") { @@ -220,6 +220,8 @@ viz_component("service") {
@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644
+ Draw(gfx.mojom.Rect damage_rect) => (); + Draw(gfx.mojom.Rect damage_rect) => ();
}; };
diff --git ui/compositor/compositor.h ui/compositor/compositor.h diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index e7be43d3f842f..541dc0fde093b 100644 index 2c587c7d2f7e9..51a4e6fc3f027 100644
--- ui/compositor/compositor.h --- ui/compositor/compositor.h
+++ ui/compositor/compositor.h +++ ui/compositor/compositor.h
@@ -33,7 +33,9 @@ @@ -33,7 +33,9 @@
@ -261,7 +261,7 @@ index e7be43d3f842f..541dc0fde093b 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer // Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer // must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the // is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -520,6 +533,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, @@ -519,6 +532,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_; std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 39e8934e0d54b..bbc9d78392973 100644 index 79e0289b713ce..abc76cb041465 100644
--- content/browser/web_contents/web_contents_impl.cc --- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc
@@ -3175,6 +3175,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3189,6 +3189,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy, params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create()); base::UnguessableToken::Create());
@ -15,7 +15,7 @@ index 39e8934e0d54b..bbc9d78392973 100644
std::unique_ptr<WebContentsViewDelegate> delegate = std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this); GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3185,6 +3191,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3199,6 +3205,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate), view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_); &render_view_host_delegate_view_);
} }
@ -23,7 +23,7 @@ index 39e8934e0d54b..bbc9d78392973 100644
CHECK(render_view_host_delegate_view_); CHECK(render_view_host_delegate_view_);
CHECK(view_.get()); CHECK(view_.get());
@@ -3365,6 +3372,9 @@ void WebContentsImpl::RenderWidgetCreated( @@ -3379,6 +3386,9 @@ void WebContentsImpl::RenderWidgetCreated(
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated", OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
"render_widget_host", render_widget_host); "render_widget_host", render_widget_host);
created_widgets_.insert(render_widget_host); created_widgets_.insert(render_widget_host);
@ -33,7 +33,7 @@ index 39e8934e0d54b..bbc9d78392973 100644
} }
void WebContentsImpl::RenderWidgetDeleted( void WebContentsImpl::RenderWidgetDeleted(
@@ -4096,6 +4106,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -4111,6 +4121,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options); create_params.picture_in_picture_options = *(params.pip_options);
} }
@ -49,7 +49,7 @@ index 39e8934e0d54b..bbc9d78392973 100644
// Check whether there is an available prerendered page for this navigation if // Check whether there is an available prerendered page for this navigation if
// this is not for guest. If it exists, take WebContents pre-created for // this is not for guest. If it exists, take WebContents pre-created for
// hosting the prerendered page instead of creating new WebContents. // hosting the prerendered page instead of creating new WebContents.
@@ -7999,6 +8018,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, @@ -8035,6 +8054,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// frames). // frames).
SetFocusedFrameTree(&node->frame_tree()); SetFocusedFrameTree(&node->frame_tree());
} }
@ -60,10 +60,10 @@ index 39e8934e0d54b..bbc9d78392973 100644
void WebContentsImpl::DidCallFocus() { void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 5644b0efa9a3e..da63511c87213 100644 index f020af02d53a4..e263e4a456905 100644
--- content/public/browser/web_contents.h --- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h +++ content/public/browser/web_contents.h
@@ -95,10 +95,12 @@ class BrowserContext; @@ -96,10 +96,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate; class BrowserPluginGuestDelegate;
class RenderFrameHost; class RenderFrameHost;
class RenderViewHost; class RenderViewHost;
@ -76,7 +76,7 @@ index 5644b0efa9a3e..da63511c87213 100644
class WebUI; class WebUI;
struct DropData; struct DropData;
struct MHTMLGenerationParams; struct MHTMLGenerationParams;
@@ -241,6 +243,10 @@ class WebContents : public PageNavigator, @@ -242,6 +244,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone; network::mojom::WebSandboxFlags::kNone;
@ -88,10 +88,10 @@ index 5644b0efa9a3e..da63511c87213 100644
// the value that'll be returned by GetLastActiveTime(). If this is left // the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents // 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 diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index b7325f818a264..d37cb4da81eb6 100644 index 5da6f93293bc5..349ae25c0af08 100644
--- content/public/browser/web_contents_delegate.h --- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h
@@ -58,9 +58,11 @@ class EyeDropperListener; @@ -59,9 +59,11 @@ class EyeDropperListener;
class FileSelectListener; class FileSelectListener;
class JavaScriptDialogManager; class JavaScriptDialogManager;
class RenderFrameHost; class RenderFrameHost;
@ -103,7 +103,7 @@ index b7325f818a264..d37cb4da81eb6 100644
struct ContextMenuParams; struct ContextMenuParams;
struct DropData; struct DropData;
struct MediaPlayerWatchTime; struct MediaPlayerWatchTime;
@@ -342,6 +344,14 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -343,6 +345,14 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config, const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace); SessionStorageNamespace* session_storage_namespace);
@ -119,10 +119,10 @@ index b7325f818a264..d37cb4da81eb6 100644
// typically happens when popups are created. // typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents, virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index f4c8ee3fe8b16..2d2f90d9f1269 100644 index 977cd925f574c..43d6c1e953e94 100644
--- content/public/browser/web_contents_observer.h --- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h
@@ -219,6 +219,9 @@ class CONTENT_EXPORT WebContentsObserver { @@ -220,6 +220,9 @@ class CONTENT_EXPORT WebContentsObserver {
virtual void OnCaptureHandleConfigUpdate( virtual void OnCaptureHandleConfigUpdate(
const blink::mojom::CaptureHandleConfig& config) {} const blink::mojom::CaptureHandleConfig& config) {}
@ -132,7 +132,7 @@ index f4c8ee3fe8b16..2d2f90d9f1269 100644
// This method is invoked when the `blink::WebView` of the current // This method is invoked when the `blink::WebView` of the current
// RenderViewHost is ready, e.g. because we recreated it after a crash. // RenderViewHost is ready, e.g. because we recreated it after a crash.
virtual void RenderViewReady() {} virtual void RenderViewReady() {}
@@ -798,6 +801,10 @@ class CONTENT_EXPORT WebContentsObserver { @@ -812,6 +815,10 @@ class CONTENT_EXPORT WebContentsObserver {
// WebContents has gained/lost focus. // WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}

View File

@ -1,9 +1,9 @@
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index e2fb979da659c..b0686d990445e 100644 index 17e2a2876789c..b708401ec2c0f 100644
--- third_party/blink/public/platform/platform.h --- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h
@@ -791,6 +791,11 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -793,6 +793,11 @@ class BLINK_PLATFORM_EXPORT Platform {
uint64_t private_memory_footprint_bytes) {} }
#endif #endif
+ // DevTools ------------------------------------------------------------ + // DevTools ------------------------------------------------------------

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index c8655d9270b81..d11450d22123a 100644 index 2c3930e849719..12c81c7c0e7e6 100644
--- third_party/blink/public/web/web_view.h --- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h
@@ -340,6 +340,7 @@ class BLINK_EXPORT WebView { @@ -342,6 +342,7 @@ class BLINK_EXPORT WebView {
// Sets whether select popup menus should be rendered by the browser. // Sets whether select popup menus should be rendered by the browser.
static void SetUseExternalPopupMenus(bool); static void SetUseExternalPopupMenus(bool);
@ -11,7 +11,7 @@ index c8655d9270b81..d11450d22123a 100644
// Cancels and hides the current popup (datetime, select...) if any. // Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0; 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 diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 823d6d2ab3772..80310bb1ab1e3 100644 index bb5b2ecb90889..6a1a7c47e8c86 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc --- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ 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) { @@ -250,8 +250,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@ -30,7 +30,7 @@ index 823d6d2ab3772..80310bb1ab1e3 100644
} }
namespace { namespace {
@@ -564,6 +569,7 @@ WebViewImpl::WebViewImpl( @@ -567,6 +572,7 @@ WebViewImpl::WebViewImpl(
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)), chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
@ -39,10 +39,10 @@ index 823d6d2ab3772..80310bb1ab1e3 100644
fullscreen_controller_(std::make_unique<FullscreenController>(this)), fullscreen_controller_(std::make_unique<FullscreenController>(this)),
page_base_background_color_( 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 diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index dcd53ce7503b0..a30c89bf46884 100644 index 421ca0b15eea5..4802d65c6dc4f 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h --- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -134,7 +134,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -135,7 +135,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances(); static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if // Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default). // they should be rendered by WebKit (which is the default).
@ -52,7 +52,7 @@ index dcd53ce7503b0..a30c89bf46884 100644
// Returns whether frames under this WebView are backed by a compositor. // Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; } bool does_composite() const { return does_composite_; }
@@ -846,6 +847,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -848,6 +849,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_ = 0.f; float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false; bool fake_page_scale_animation_use_anchor_ = false;
@ -62,7 +62,7 @@ index dcd53ce7503b0..a30c89bf46884 100644
gfx::Transform device_emulation_transform_; gfx::Transform device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index c1e0b9eff83cb..333ad8c8e2990 100644 index 89a9e47e85841..fe8754953c060 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc --- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -916,7 +916,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { @@ -916,7 +916,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
index be3a3fe0be6cd..8c1dc6b58850c 100644 index 0aae647fea27f..295319c17b46f 100644
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -19,10 +19,12 @@ @@ -19,10 +19,12 @@
@ -15,7 +15,7 @@ index be3a3fe0be6cd..8c1dc6b58850c 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h" #include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
#include "chrome/browser/google/google_brand.h" #include "chrome/browser/google/google_brand.h"
@@ -398,7 +400,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { @@ -397,7 +399,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
response->emplace(kOsVersionTag, os_version); response->emplace(kOsVersionTag, os_version);
#endif #endif
@ -28,7 +28,7 @@ index be3a3fe0be6cd..8c1dc6b58850c 100644
PopulateExtensionInfoLogs(response.get()); PopulateExtensionInfoLogs(response.get());
PopulatePowerApiLogs(response.get()); PopulatePowerApiLogs(response.get());
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
@@ -472,8 +478,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( @@ -471,8 +477,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
if (!profile) if (!profile)
return; return;
@ -41,7 +41,7 @@ index be3a3fe0be6cd..8c1dc6b58850c 100644
std::string extensions_list; std::string extensions_list;
for (const scoped_refptr<const extensions::Extension>& extension : for (const scoped_refptr<const extensions::Extension>& extension :
extension_registry->enabled_extensions()) { extension_registry->enabled_extensions()) {
@@ -577,6 +587,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( @@ -576,6 +586,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
void ChromeInternalLogSource::PopulateUsbKeyboardDetected( void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
SystemLogsResponse* response) { SystemLogsResponse* response) {

View File

@ -1,8 +1,8 @@
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
index fe0394187eae7..0c7927246a9f9 100644 index d663390faa8e2..018cd11d9487f 100644
--- sandbox/policy/win/sandbox_win.cc --- sandbox/policy/win/sandbox_win.cc
+++ sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc
@@ -1006,6 +1006,13 @@ ResultCode SandboxWin::StartSandboxedProcess( @@ -998,6 +998,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
const base::HandlesToInheritVector& handles_to_inherit, const base::HandlesToInheritVector& handles_to_inherit,
SandboxDelegate* delegate, SandboxDelegate* delegate,
base::Process* process) { base::Process* process) {

View File

@ -830,7 +830,7 @@ void SetupIframeRequest(CookieTestSetup* setup,
IsStandardType(main_handler)) { IsStandardType(main_handler)) {
setup->AddConsoleMessage( setup->AddConsoleMessage(
"An iframe which has both allow-scripts and allow-same-origin for " "An iframe which has both allow-scripts and allow-same-origin for "
"its sandbox attribute can remove its sandboxing."); "its sandbox attribute can escape its sandboxing.");
} }
} else { } else {
// Expect JavaScript execution to fail. // Expect JavaScript execution to fail.

View File

@ -265,7 +265,6 @@ def GetRecommendedDefaultArgs():
# These require use_partition_alloc_as_malloc=true, so disable them. # These require use_partition_alloc_as_malloc=true, so disable them.
result['enable_backup_ref_ptr_support'] = False result['enable_backup_ref_ptr_support'] = False
result['enable_mte_checked_ptr_support'] = False
return result return result
@ -506,7 +505,6 @@ def GetConfigArgsSandbox(platform, args, is_debug, cpu):
# These require use_partition_alloc_as_malloc=true, so disable them. # These require use_partition_alloc_as_malloc=true, so disable them.
'enable_backup_ref_ptr_support': False, 'enable_backup_ref_ptr_support': False,
'enable_mte_checked_ptr_support': False,
# Avoid /LTCG linker warnings and generate smaller lib files. # Avoid /LTCG linker warnings and generate smaller lib files.
'is_official_build': False, 'is_official_build': False,