Skip to content

Commit

Permalink
Update to Chromium version 113.0.5672.0 (#1121455)
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenblatt committed Apr 5, 2023
1 parent c83b3cd commit 4b3c313
Show file tree
Hide file tree
Showing 76 changed files with 617 additions and 645 deletions.
2 changes: 1 addition & 1 deletion CHROMIUM_BUILD_COMPATIBILITY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding

{
'chromium_checkout': 'refs/tags/112.0.5615.0'
'chromium_checkout': 'refs/tags/113.0.5672.0'
}
4 changes: 2 additions & 2 deletions libcef/browser/alloy/alloy_browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#endif

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
#include "components/os_crypt/os_crypt.h"
#include "components/os_crypt/sync/os_crypt.h"
#endif

#if BUILDFLAG(IS_LINUX)
Expand All @@ -83,7 +83,7 @@
#include "chrome/browser/ui/views/theme_profile_key.h"
#include "chrome/common/chrome_paths.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 "ui/base/cursor/cursor_factory.h"
#include "ui/base/ime/input_method.h"
Expand Down
7 changes: 5 additions & 2 deletions libcef/browser/alloy/alloy_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
#include "components/pdf/browser/pdf_web_contents_helper.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/version_info/version_info.h"
#include "content/browser/plugin_service_impl.h"
Expand Down Expand Up @@ -923,8 +924,10 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
Profile* profile = Profile::FromBrowserContext(browser_context);

chrome::mojom::DynamicParams dynamic_params = {
profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)};
result.push_back(
std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params)));
Expand Down
17 changes: 11 additions & 6 deletions libcef/browser/alloy/chrome_browser_process_alloy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_switches.h"
#include "net/log/net_log_capture_mode.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"

Expand Down Expand Up @@ -143,6 +144,11 @@ void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
NOTREACHED();
}

device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
NOTREACHED();
return nullptr;
}

metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
NOTREACHED();
Expand Down Expand Up @@ -222,6 +228,11 @@ ChromeBrowserProcessAlloy::notification_platform_bridge() {
return nullptr;
}

void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
NOTREACHED();
}

policy::ChromeBrowserPolicyConnector*
ChromeBrowserProcessAlloy::browser_policy_connector() {
if (!browser_policy_connector_) {
Expand Down Expand Up @@ -416,12 +427,6 @@ ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
return nullptr;
}

breadcrumbs::BreadcrumbPersistentStorageManager*
ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() {
NOTREACHED();
return nullptr;
}

HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
NOTREACHED();
return nullptr;
Expand Down
5 changes: 3 additions & 2 deletions libcef/browser/alloy/chrome_browser_process_alloy.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
// BrowserProcess implementation.
void EndSession() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
device::GeolocationManager* geolocation_manager() override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
metrics::MetricsService* metrics_service() override;
Expand All @@ -65,6 +66,8 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
extensions::EventRouterForwarder* extension_event_router_forwarder() override;
NotificationUIManager* notification_ui_manager() override;
NotificationPlatformBridge* notification_platform_bridge() override;
void SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
policy::PolicyService* policy_service() override;
IconManager* icon_manager() override;
Expand Down Expand Up @@ -107,8 +110,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
BuildState* GetBuildState() override;
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
HidPolicyAllowedDevices* hid_policy_allowed_devices() override;
breadcrumbs::BreadcrumbPersistentStorageManager*
GetBreadcrumbPersistentStorageManager() override;
HidSystemTrayIcon* hid_system_tray_icon() override;

private:
Expand Down
34 changes: 17 additions & 17 deletions libcef/browser/extensions/api/tabs/tabs_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {}

ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
std::unique_ptr<tabs::Create::Params> params(
tabs::Create::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
absl::optional<tabs::Create::Params> params =
tabs::Create::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

CefExtensionFunctionDetails::OpenTabParams options;
options.window_id = params->create_properties.window_id;
Expand Down Expand Up @@ -108,9 +108,9 @@ content::WebContents* BaseAPIFunction::GetWebContents(int tab_id) {
}

ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
std::unique_ptr<tabs::Update::Params> params(
tabs::Update::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
absl::optional<tabs::Update::Params> params =
tabs::Update::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

tab_id_ = params->tab_id ? *params->tab_id : -1;
content::WebContents* web_contents = GetWebContents(tab_id_);
Expand Down Expand Up @@ -195,8 +195,8 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
int tab_id,
std::string* error) {
GURL url;
auto url_expected =
ExtensionTabUtil::PrepareURLForNavigation(url_string, extension());
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
url_string, extension(), browser_context());
if (url_expected.has_value()) {
url = *url_expected;
} else {
Expand Down Expand Up @@ -278,7 +278,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
return set_init_result(VALIDATION_FAILURE);
}
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);
}

Expand Down Expand Up @@ -419,8 +419,8 @@ bool TabsRemoveCSSFunction::ShouldRemoveCSS() const {
}

ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
std::unique_ptr<tabs::SetZoom::Params> params(
tabs::SetZoom::Params::Create(args()));
absl::optional<tabs::SetZoom::Params> params =
tabs::SetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

int tab_id = params->tab_id ? *params->tab_id : -1;
Expand Down Expand Up @@ -451,8 +451,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
}

ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
std::unique_ptr<tabs::GetZoom::Params> params(
tabs::GetZoom::Params::Create(args()));
absl::optional<tabs::GetZoom::Params> params =
tabs::GetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

int tab_id = params->tab_id ? *params->tab_id : -1;
Expand All @@ -471,8 +471,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings;

std::unique_ptr<tabs::SetZoomSettings::Params> params(
tabs::SetZoomSettings::Params::Create(args()));
absl::optional<tabs::SetZoomSettings::Params> params =
tabs::SetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

int tab_id = params->tab_id ? *params->tab_id : -1;
Expand Down Expand Up @@ -522,8 +522,8 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
}

ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
std::unique_ptr<tabs::GetZoomSettings::Params> params(
tabs::GetZoomSettings::Params::Create(args()));
absl::optional<tabs::GetZoomSettings::Params> params =
tabs::GetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);

int tab_id = params->tab_id ? *params->tab_id : -1;
Expand Down
2 changes: 1 addition & 1 deletion libcef/browser/extensions/extension_function_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ std::unique_ptr<api::tabs::Tab> CefExtensionFunctionDetails::OpenTab(
GURL url;
if (params.url.has_value()) {
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
*params.url, function()->extension());
*params.url, function()->extension(), function()->browser_context());
if (url_expected.has_value()) {
url = *url_expected;
} else {
Expand Down
6 changes: 5 additions & 1 deletion libcef/browser/main_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,13 @@ int CefMainRunner::ContentMainInitialize(const CefMainArgs& args,

bool CefMainRunner::ContentMainRun(bool* initialized,
base::OnceClosure context_initialized) {
main_delegate_->BeforeMainThreadRun();
main_delegate_->BeforeMainThreadRun(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::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#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_wheel_event.h"
#import "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
Expand Down Expand Up @@ -439,8 +438,7 @@ void GetNSBoundsInDisplay(const gfx::Rect& dip_bounds,
NSPoint view_pt = {static_cast<CGFloat>(view.x()),
bounds.size.height - static_cast<CGFloat>(view.y())};
NSPoint window_pt = [nsview convertPoint:view_pt toView:nil];
NSPoint screen_pt =
ui::ConvertPointFromWindowToScreen([nsview window], window_pt);
NSPoint screen_pt = [[nsview window] convertPointToScreen:window_pt];
return gfx::Point(screen_pt.x, screen_pt.y);
}
return gfx::Point();
Expand Down
12 changes: 7 additions & 5 deletions libcef/browser/prefs/browser_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/safe_search_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/locale_settings.h"
#include "components/certificate_transparency/pref_names.h"
Expand All @@ -48,6 +47,7 @@
#include "components/language/core/browser/language_prefs.h"
#include "components/language/core/browser/pref_names.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/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
Expand All @@ -57,6 +57,7 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.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/sync_preferences/pref_service_syncable.h"
#include "components/sync_preferences/pref_service_syncable_factory.h"
Expand All @@ -69,7 +70,7 @@
#include "ui/base/ui_base_switches.h"

#if BUILDFLAG(IS_WIN)
#include "components/os_crypt/os_crypt.h"
#include "components/os_crypt/sync/os_crypt.h"
#endif

#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
Expand Down Expand Up @@ -281,9 +282,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,

// Print preferences.
// Based on ProfileImpl::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false);
registry->RegisterIntegerPref(prefs::kForceYouTubeRestrict,
safe_search_util::YOUTUBE_RESTRICT_OFF);
registry->RegisterBooleanPref(policy::policy_prefs::kForceGoogleSafeSearch,
false);
registry->RegisterIntegerPref(policy::policy_prefs::kForceYouTubeRestrict,
safe_search_api::YOUTUBE_RESTRICT_OFF);
registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled,
Expand Down
3 changes: 2 additions & 1 deletion libcef/common/alloy/alloy_main_runner_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ void AlloyMainRunnerDelegate::BeforeMainThreadInitialize(
g_browser_process = new ChromeBrowserProcessAlloy();
}

void AlloyMainRunnerDelegate::BeforeMainThreadRun() {
void AlloyMainRunnerDelegate::BeforeMainThreadRun(
bool multi_threaded_message_loop) {
static_cast<ChromeBrowserProcessAlloy*>(g_browser_process)->Initialize();
}

Expand Down
2 changes: 1 addition & 1 deletion libcef/common/alloy/alloy_main_runner_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AlloyMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun() override;
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void AfterUIThreadInitialize() override;
void AfterUIThreadShutdown() override;
void BeforeMainThreadShutdown() override;
Expand Down
11 changes: 11 additions & 0 deletions libcef/common/chrome/chrome_main_runner_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "chrome/common/profiler/main_thread_stack_sampling_profiler.h"
#include "components/keep_alive_registry/keep_alive_types.h"
#include "components/keep_alive_registry/scoped_keep_alive.h"
#include "components/metrics/persistent_system_profile.h"

ChromeMainRunnerDelegate::ChromeMainRunnerDelegate(
CefMainRunnerHandler* runner,
Expand Down Expand Up @@ -42,6 +43,16 @@ void ChromeMainRunnerDelegate::BeforeMainThreadInitialize(
#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(
base::RunLoop* run_loop) {
// The ScopedKeepAlive instance triggers shutdown logic when released on the
Expand Down
1 change: 1 addition & 0 deletions libcef/common/chrome/chrome_main_runner_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ChromeMainRunnerDelegate : public CefMainRunnerDelegate {
// CefMainRunnerDelegate overrides.
content::ContentMainDelegate* GetContentMainDelegate() override;
void BeforeMainThreadInitialize(const CefMainArgs& args) override;
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
void BeforeMainMessageLoopRun(base::RunLoop* run_loop) override;
bool HandleMainMessageLoopQuit() override;
void BeforeUIThreadInitialize() override;
Expand Down
2 changes: 1 addition & 1 deletion libcef/common/main_runner_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CefMainRunnerDelegate {
virtual content::ContentMainDelegate* GetContentMainDelegate() = 0;

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 bool HandleMainMessageLoopQuit() { return false; }
virtual void BeforeUIThreadInitialize() {}
Expand Down
Loading

0 comments on commit 4b3c313

Please sign in to comment.