chore: bump chromium to 117.0.5852.0 (main) (#38891)

* chore: bump chromium in DEPS to 117.0.5846.0

* chore: update patches

* 4628901: Bump the macOS deployment target to 10.15

4628901

* 4593350: [Private Network Access] Trigger Permission Prompt

4593350

* 4631011: Remove unlaunched "InstallReplacementAndroidApp" Platform App APIs

4631011

* chore: disable API deprecation warnings in NSKeyedArchiver

* chore: update libcxx filenames

* chore: bump chromium in DEPS to 117.0.5848.2

* chore: update feat_add_set_theme_source_to_allow_apps_to.patch

Xref: 4629743

No manual changes; patch succeeded with fuzz

* chore: update process_singleton.patch

Xref: 4605398

Trivial manual patch adjustments to account for code shear.

* chore: remove electron::BrowserContext::GetMediaDeviceIDSalt()

Xref: 4608130

upstream tldr:
- content::BrowserContext::GetMediaDeviceIDSalt()
- content::ContentBrowserClient::ArePersistentMediaDeviceIDsAllowed()
+ content::ContentBrowserClient::GetMediaDeviceIDSalt()

This commit leaves ElectronBrowserContext::GetMediaDeviceIDSalt() in
place (now non-virtual, non-override). It is now called by the new
function ElectronBrowserClient::GetMediaDeviceIDSalt().

As a followup, we might want to consider using the new upstream
media_device_salt::MediaDeviceSaltService and removing our
electron::MediaDeviceIDSalt code. CC @MarshallOfSound for 2nd
opinion since he has done the most work on MediaDeviceIDSalt and
may have more context.

* chore: fix iwyu breakage

Xref: 4629624

electron_browser_main_parts.cc uses ui::ColorProviderManager but didn't
include it. Things worked anyway because we got it indirectly from
content/public/browser/web_contents.h until 4629624.

* chore: remove call to base::mac::IsAtLeastOS10_14

upstream has bumped minimum version to 10.15 so this call is moot?

* chore: remove obsolete API_AVAILABLE calls in IAP

upstream has bumped minimum version to 10.15 so this call is moot?

* chore: remove obsolete API_AVAILABLE calls in electron_application_delegate

upstream has bumped minimum version to 10.15 so this call is moot?

* chore: remove broken-before-macOS-10.15 patch in mas_avoid_usage_of_private_macos_apis.patch

Upstream has bumped minimum to macOS 10.15

* chore: remove @available(macOS 10.14) check

Upstream minimum requirement for macOS is now 10.15

* chore: update patches

* chore: bump chromium in DEPS to 117.0.5850.0

* chore: update patches

* chore: bump chromium in DEPS to 117.0.5852.0

* chore: update patches

* Move two params from NetworkContextParams to NetworkContextFilePaths.

4615930

* WebUSB: Add exclusionFilters to USBRequestDeviceOptions

4614682

* Convert /chrome/browser/ui to use ARC

4615920

* fixup! Bump the macOS deployment target to 10.15

* fixup! Bump the macOS deployment target to 10.15

* chore: update libcxx files

* win: Remove 10Glass from Windows10Glass function and var names

4641314

* chore: revert 392e5f43 from chromium

* Add an ExecutionContext to ScriptState

4609446

* fixup! Add an ExecutionContext to ScriptState

* chore: fix header

* Revert "chore: revert 392e5f43 from chromium"

This reverts commit b7f782943e4ce83cae8cd35780d8d3618cf0772c.

* fix: return correct min/max sizes in WinFrameView

* fixup! Revert chore: revert 392e5f43 from chromium

* fixup! Add an ExecutionContext to ScriptState

* Revert "fixup! Revert chore: revert 392e5f43 from chromium"

This reverts commit 7e2c7281abfc4f309255339fdba073d90a9ae3eb.

* Revert "fix: return correct min/max sizes in WinFrameView"

This reverts commit 3f418b1ab5155686730e087ae6cabe4a21b4bb61.

* Revert "Revert "chore: revert 392e5f43 from chromium""

This reverts commit 56296d8b7c434147e032e3c3b08c0e371b6c27ba.

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-07-01 16:22:55 -04:00 committed by GitHub
parent 499d893040
commit ccd4531bfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 1054 additions and 652 deletions

View file

@ -29,14 +29,8 @@ namespace {
#if BUILDFLAG(IS_MAC)
bool RegisteringMediaKeyForUntrustedClient(const ui::Accelerator& accelerator) {
if (base::mac::IsAtLeastOS10_14()) {
if (Command::IsMediaKey(accelerator)) {
if (!electron::api::SystemPreferences::IsTrustedAccessibilityClient(
false))
return true;
}
}
return false;
return Command::IsMediaKey(accelerator) &&
!electron::api::SystemPreferences::IsTrustedAccessibilityClient(false);
}
bool MapHasMediaKeys(

View file

@ -109,8 +109,6 @@ struct Converter<in_app_purchase::Product> {
dict.Set("productIdentifier", val.productIdentifier);
dict.Set("localizedDescription", val.localizedDescription);
dict.Set("localizedTitle", val.localizedTitle);
dict.Set("contentVersion", val.contentVersion);
dict.Set("contentLengths", val.contentLengths);
// Pricing Information
dict.Set("price", val.price);

View file

@ -10,23 +10,20 @@ namespace electron::api {
void NativeTheme::UpdateMacOSAppearanceForOverrideValue(
ui::NativeTheme::ThemeSource override) {
if (@available(macOS 10.14, *)) {
NSAppearance* new_appearance;
switch (override) {
case ui::NativeTheme::ThemeSource::kForcedDark:
new_appearance =
[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
break;
case ui::NativeTheme::ThemeSource::kForcedLight:
new_appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
break;
case ui::NativeTheme::ThemeSource::kSystem:
default:
new_appearance = nil;
break;
}
[[NSApplication sharedApplication] setAppearance:new_appearance];
NSAppearance* new_appearance;
switch (override) {
case ui::NativeTheme::ThemeSource::kForcedDark:
new_appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
break;
case ui::NativeTheme::ThemeSource::kForcedLight:
new_appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
break;
case ui::NativeTheme::ThemeSource::kSystem:
default:
new_appearance = nil;
break;
}
[[NSApplication sharedApplication] setAppearance:new_appearance];
}
} // namespace electron::api

View file

@ -51,11 +51,7 @@ struct Converter<NSAppearance*> {
*out = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
return true;
} else if (name == "dark") {
if (@available(macOS 10.14, *)) {
*out = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
} else {
*out = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
}
*out = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
return true;
}
@ -63,17 +59,13 @@ struct Converter<NSAppearance*> {
}
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, NSAppearance* val) {
if (val == nil) {
if (val == nil)
return v8::Null(isolate);
}
if ([val.name isEqualToString:NSAppearanceNameAqua]) {
return gin::ConvertToV8(isolate, "light");
}
if (@available(macOS 10.14, *)) {
if ([val.name isEqualToString:NSAppearanceNameDarkAqua]) {
return gin::ConvertToV8(isolate, "dark");
}
} else if ([val.name isEqualToString:NSAppearanceNameDarkAqua]) {
return gin::ConvertToV8(isolate, "dark");
}
return gin::ConvertToV8(isolate, "unknown");
@ -382,10 +374,7 @@ void SystemPreferences::SetUserDefault(const std::string& name,
}
std::string SystemPreferences::GetAccentColor() {
NSColor* sysColor = nil;
if (@available(macOS 10.14, *))
sysColor = [NSColor controlAccentColor];
NSColor* sysColor = sysColor = [NSColor controlAccentColor];
return ToRGBAHex(skia::NSSystemColorToSkColor(sysColor),
false /* include_hash */);
}
@ -421,14 +410,10 @@ std::string SystemPreferences::GetSystemColor(gin_helper::ErrorThrower thrower,
bool SystemPreferences::CanPromptTouchID() {
base::scoped_nsobject<LAContext> context([[LAContext alloc] init]);
LAPolicy auth_policy = LAPolicyDeviceOwnerAuthenticationWithBiometrics;
if (@available(macOS 10.15, *))
auth_policy = LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch;
LAPolicy auth_policy = LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch;
if (![context canEvaluatePolicy:auth_policy error:nil])
return false;
if (@available(macOS 10.13.2, *))
return [context biometryType] == LABiometryTypeTouchID;
return true;
return [context biometryType] == LABiometryTypeTouchID;
}
v8::Local<v8::Promise> SystemPreferences::PromptTouchID(
@ -501,8 +486,7 @@ std::string SystemPreferences::GetColor(gin_helper::ErrorThrower thrower,
} else if (color == "disabled-control-text") {
sysColor = [NSColor disabledControlTextColor];
} else if (color == "find-highlight") {
if (@available(macOS 10.14, *))
sysColor = [NSColor findHighlightColor];
sysColor = [NSColor findHighlightColor];
} else if (color == "grid") {
sysColor = [NSColor gridColor];
} else if (color == "header-text") {
@ -524,8 +508,7 @@ std::string SystemPreferences::GetColor(gin_helper::ErrorThrower thrower,
} else if (color == "secondary-label") {
sysColor = [NSColor secondaryLabelColor];
} else if (color == "selected-content-background") {
if (@available(macOS 10.14, *))
sysColor = [NSColor selectedContentBackgroundColor];
sysColor = [NSColor selectedContentBackgroundColor];
} else if (color == "selected-control") {
sysColor = [NSColor selectedControlColor];
} else if (color == "selected-control-text") {
@ -537,8 +520,7 @@ std::string SystemPreferences::GetColor(gin_helper::ErrorThrower thrower,
} else if (color == "selected-text") {
sysColor = [NSColor selectedTextColor];
} else if (color == "separator") {
if (@available(macOS 10.14, *))
sysColor = [NSColor separatorColor];
sysColor = [NSColor separatorColor];
} else if (color == "shadow") {
sysColor = [NSColor shadowColor];
} else if (color == "tertiary-label") {
@ -550,14 +532,11 @@ std::string SystemPreferences::GetColor(gin_helper::ErrorThrower thrower,
} else if (color == "under-page-background") {
sysColor = [NSColor underPageBackgroundColor];
} else if (color == "unemphasized-selected-content-background") {
if (@available(macOS 10.14, *))
sysColor = [NSColor unemphasizedSelectedContentBackgroundColor];
sysColor = [NSColor unemphasizedSelectedContentBackgroundColor];
} else if (color == "unemphasized-selected-text-background") {
if (@available(macOS 10.14, *))
sysColor = [NSColor unemphasizedSelectedTextBackgroundColor];
sysColor = [NSColor unemphasizedSelectedTextBackgroundColor];
} else if (color == "unemphasized-selected-text") {
if (@available(macOS 10.14, *))
sysColor = [NSColor unemphasizedSelectedTextColor];
sysColor = [NSColor unemphasizedSelectedTextColor];
} else if (color == "window-background") {
sysColor = [NSColor windowBackgroundColor];
} else if (color == "window-frame-text") {
@ -596,18 +575,13 @@ v8::Local<v8::Promise> SystemPreferences::AskForMediaAccess(
v8::Local<v8::Promise> handle = promise.GetHandle();
if (auto type = ParseMediaType(media_type)) {
if (@available(macOS 10.14, *)) {
__block gin_helper::Promise<bool> p = std::move(promise);
[AVCaptureDevice requestAccessForMediaType:type
completionHandler:^(BOOL granted) {
dispatch_async(dispatch_get_main_queue(), ^{
p.Resolve(!!granted);
});
}];
} else {
// access always allowed pre-10.14 Mojave
promise.Resolve(true);
}
__block gin_helper::Promise<bool> p = std::move(promise);
[AVCaptureDevice requestAccessForMediaType:type
completionHandler:^(BOOL granted) {
dispatch_async(dispatch_get_main_queue(), ^{
p.Resolve(!!granted);
});
}];
} else {
promise.RejectWithErrorMessage("Invalid media type");
}
@ -626,30 +600,22 @@ bool SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled() {
v8::Local<v8::Value> SystemPreferences::GetEffectiveAppearance(
v8::Isolate* isolate) {
if (@available(macOS 10.14, *)) {
return gin::ConvertToV8(
isolate, [NSApplication sharedApplication].effectiveAppearance);
}
return v8::Null(isolate);
return gin::ConvertToV8(
isolate, [NSApplication sharedApplication].effectiveAppearance);
}
v8::Local<v8::Value> SystemPreferences::GetAppLevelAppearance(
v8::Isolate* isolate) {
if (@available(macOS 10.14, *)) {
return gin::ConvertToV8(isolate,
[NSApplication sharedApplication].appearance);
}
return v8::Null(isolate);
return gin::ConvertToV8(isolate,
[NSApplication sharedApplication].appearance);
}
void SystemPreferences::SetAppLevelAppearance(gin::Arguments* args) {
if (@available(macOS 10.14, *)) {
NSAppearance* appearance;
if (args->GetNext(&appearance)) {
[[NSApplication sharedApplication] setAppearance:appearance];
} else {
args->ThrowError();
}
NSAppearance* appearance;
if (args->GetNext(&appearance)) {
[[NSApplication sharedApplication] setAppearance:appearance];
} else {
args->ThrowError();
}
}

View file

@ -90,6 +90,12 @@ class SimpleURLLoaderWrapper
const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
mojo::PendingRemote<network::mojom::ClientCertificateResponder>
client_cert_responder) override {}
void OnPrivateNetworkAccessPermissionRequired(
const GURL& url,
const net::IPAddress& ip_address,
const std::string& private_network_device_id,
const std::string& private_network_device_name,
OnPrivateNetworkAccessPermissionRequiredCallback callback) override {}
void OnClearSiteData(
const GURL& url,
const std::string& header_value,