chore: bump chromium to 113.0.5636.0 (main) (#37130)
* chore: bump chromium in DEPS to 112.0.5576.0 * 4211172: Use the Mac ImageTransportSurface on iOS.4211172
* 4191759: Reuse PrintBackend process from query for printing4191759
* 4189718: Revert "[code health] Remove NotificationService use by SpellcheckService"4189718
* 4216074: web_contents_delegate: remove content::4216074
* 4192284: ios: Add feature flag for PartitionAlloc.4192284
* chore: bump chromium in DEPS to 112.0.5578.0 * 4211172: Use the Mac ImageTransportSurface on iOS.4211172
* 4067682: Define ThirdPartyCookiesUserBypass runtime feature and plumb it through to URLRequest.cookie_setting_overrides.4067682
* chore: fixup patch indices * 4218354: Disable the use of preserve_most on arm64 Windows4218354
* chore: fixup patch indices * chore: bump chromium in DEPS to 112.0.5579.0 * chore: update patches * chore: bump chromium in DEPS to 112.0.5581.0 * chore: update patches * refactor: use modern base values in tracing Ref:4210912
* refactor: remove GetFontLookupTableCacheDir Ref:4191820
* refactor: base value type DICTIONARY replaced with DICT Ref:4198081
* chore: add stub impls for WCO routing Refs:4182690
* refactor: rename latency metrics Refs:4048262
* refactor: add sanitized context to clipboard write Ref:4178264
* refactor: s/Rect/WindowFeatures Ref:4167001
* refacotr: switch mojom::NetworkHintsHandler to use SchemeHostPair instead of URL Ref:4185417
* chore: remove dead DecodeToken code * refactor: refactoring geolocation manager Ref:4161603
* chore: iwyu net/cert/cert_verify_result.h * build: use xcode 14 * chore: bump chromium in DEPS to 112.0.5583.0 * chore: update patches * chore: fixup mas patches * refactor: base::span explicit conversion checks Ref:4219636
* chore: bump chromium in DEPS to 112.0.5591.0 * chore: bump chromium in DEPS to 112.0.5593.0 * chore: bump chromium in DEPS to 112.0.5594.3 * chore: bump chromium in DEPS to 112.0.5597.0 * chore: update chromium patches * 4242507: Move most of GetChromeKeySystems() into components/cdm Ref:4242507
It seems as though the bug this patch was trying to resolve is now fixed. * chore: update v8 patches * 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManagerHost. Ref:4240798
* 4247938: Bump min required GTK version to 3.20 Ref:4247938
* 4173660: Remove unused argument in BeforeUnloadCompleted Ref:4173660
* 4226656: Add response url to SimpleURLLoader::OnRedirectCallback Ref:4226656
* fixup!: 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManager Host. Ref:4240798
* chore: bump chromium in DEPS to 112.0.5599.0 * chore: update patches * 4251237: [StorageKey Cleanup] (2) Rename CreateFirstParty constructors Ref:4251237
* 4256866: [Extensions] Replace GetHooksForAPI with a RegisterHooksDelegate Ref:4256866
* chore: bump chromium in DEPS to 112.0.5601.0 * chore: update patches * chore: bump chromium in DEPS to 112.0.5603.0 * chore: bump chromium in DEPS to 112.0.5605.0 * chore: bump chromium in DEPS to 112.0.5607.0 * update patches * fix mas patch * chore: bump chromium in DEPS to 112.0.5609.0 * chore: update patches * build: update appveyor image 4072083: New toolchain for Windows 11 10.0.22621.755 SDK |4072083
* chore: bump chromium in DEPS to 112.0.5611.0 * fix patches * chore: update patches * 4261434: Remove browser_watcher (1/3): Move ExitCodeWatcher to chrome/app4261434
* 4258446: Move network::mojom::ClearDataFilter to its own mojom file4258446
* 4128591: Enable large pdbs by default4128591
* move dbgcore/dbghelp to extensions_to_skip * chore: bump chromium in DEPS to 113.0.5624.0 * chore: bump chromium in DEPS to 113.0.5626.0 * chore: bump chromium in DEPS to 113.0.5628.2 * chore: bump chromium in DEPS to 113.0.5630.0 * chore: bump chromium in DEPS to 113.0.5632.0 * chore: bump chromium in DEPS to 113.0.5634.0 * chore: bump chromium in DEPS to 113.0.5636.0 * 4255184: Permit popups from fullscreen-within-tab openers4255184
* 4297715: [mac] Introduce BluetoothLowEnergyAdapterApple to reuse CoreBluetooth4297715
* 4301154: Remove GLContextCGL and cleanup relevant code4301154
* 4278389: CDP: fix Page.addScriptToEvaluateOnNewDocument in iframes4278389
* 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManagerHost.4240798
* 4291989: Refactor logic determining untrusted mojo invitation flag.4291989
* 4110189: Add Select option to content touch selection menu.4110189
* 4309923: [Extensions] Add a unit test for API permissions having features4309923
* 4282657: Revert "[headless] Route stdio to parent console on Windows."4282657
* 4306685: [v8] Improve V8 flag configuration to avoid errors4306685
* 4295455: Add fallback Linux UI for when GTK 3.20 isn't available4295455
* 4289774: Remove feature for shared sandbox policies4289774
* 4292705: Rename WebSwapCGLLayer to ANGLESwapCGLLayer outside WebKit.4292705
* chore: fixup patch indices * fixup! 4297715: [mac] Introduce BluetoothLowEnergyAdapterApple to reuse CoreBluetooth * 4289789: Remove base::JSONReader::ReadDeprecated4289789
* 4281521: Remove `base::Value::FindKey()`4281521
* 4276761: Update NAK constructor and GetIsCrossSite4276761
* 4288119: Let GetUpload work with UploadInfo pointers4288119
* 4285322: content: Move WebExposedIsolationLevel to its own public header4285322
* 4251818: [Extensions] Make ExtensionSet moveable.4251818
* 4299554: [json-schema-compiler] Refactor to Params::Create (14/74)4299554
* chore: update printing patch indices * chore: update chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch Xref:4295455
Our patch changes the signature of `LinuxUiTheme::GetWindowFrameProvider()`. Upstream 4295455 added a new subclass (FallbackLinuxUi) so sync its version of GetWindowFrameProvider() to match our changes. * chore: disable node test parallel/test-intl Disabling the test because upstream is still working on this feature. Xref:4237675
Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=1414292 When upstream churn is done we should re-enable this test and update it as necessary. * win7dep: Remove ResolveCoreWinRTStringDelayload Xref:4277708
Upstream has removed this since Win7 support is deprecated. This updates our `language_util_win.cc` file using the same approach that 4277708 uses for `base/win/win_util.cc`. * fix: remove use of ResolveCoreWinRTDelayload() Xref:4297979
A followup to prev commit, which removed ResolveCoreWinRTStringDelayload(). This PR follows the 4297979 approach of simply removing the calls, e.g.4297979/4/chrome/browser/device_reauth/win/authenticator_win.cc
* fix: add d3dcompiler_47 to the zip manifest Xref:4285717
Xref (24-x-y):0fb1def32b
* This clang roll breaks Linux arm 32-bit Xref (24-x-y):1229114494
Xref (chromium): https://crbug.com/1410101 * fix: WebUSB on ARM64 macs (#37441) * chore: update patches * chore: fix macOS CI build. Xref:4278307
That whole dir was previously being removed to save space since we don't use it. We still don't use anything in the file, but gn needs it to exist. * fixup! chore: fix macOS CI build. chore: mkdir --parents does not exist on BSD; use mkdir -p * chore: update chromium/mas_disable_remote_accessibility.patch Xref:4273450
Upstream added a new block of code using NSAccessibilityRemoteUIElement, so stub it out with `#if !IS_MAS_BUILD()` same as we do everwhere else. * chore: address code review nit :) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
8ee58e18fd
commit
feaf18e371
154 changed files with 1049 additions and 1106 deletions
|
@ -23,7 +23,7 @@
|
|||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/dark_mode_support.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "components/browser_watcher/exit_code_watcher_win.h"
|
||||
#include "chrome/app/exit_code_watcher_win.h"
|
||||
#include "components/crash/core/app/crash_switches.h"
|
||||
#include "components/crash/core/app/run_as_crashpad_handler_win.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
|
@ -183,7 +183,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
|
||||
if (process_type == crash_reporter::switches::kCrashpadHandler) {
|
||||
// Check if we should monitor the exit code of this process
|
||||
std::unique_ptr<browser_watcher::ExitCodeWatcher> exit_code_watcher;
|
||||
std::unique_ptr<ExitCodeWatcher> exit_code_watcher;
|
||||
|
||||
// Retrieve the client process from the command line
|
||||
crashpad::InitialClientData initial_client_data;
|
||||
|
@ -196,8 +196,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
|||
::GetCurrentProcess(), &duplicate_handle,
|
||||
PROCESS_QUERY_INFORMATION, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
base::Process parent_process(duplicate_handle);
|
||||
exit_code_watcher =
|
||||
std::make_unique<browser_watcher::ExitCodeWatcher>();
|
||||
exit_code_watcher = std::make_unique<ExitCodeWatcher>();
|
||||
if (exit_code_watcher->Initialize(std::move(parent_process))) {
|
||||
exit_code_watcher->StartWatching();
|
||||
}
|
||||
|
|
|
@ -44,8 +44,7 @@ struct Converter<base::trace_event::TraceConfig> {
|
|||
|
||||
base::Value::Dict memory_dump_config;
|
||||
if (ConvertFromV8(isolate, val, &memory_dump_config)) {
|
||||
*out = base::trace_event::TraceConfig(
|
||||
base::Value(std::move(memory_dump_config)));
|
||||
*out = base::trace_event::TraceConfig(std::move(memory_dump_config));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -221,14 +221,15 @@ v8::Local<v8::Value> GetUploadedReports(v8::Isolate* isolate) {
|
|||
electron::ScopedAllowBlockingForElectron allow_blocking;
|
||||
list->LoadSync();
|
||||
}
|
||||
std::vector<UploadList::UploadInfo> uploads;
|
||||
|
||||
constexpr size_t kMaxUploadReportsToList = std::numeric_limits<size_t>::max();
|
||||
list->GetUploads(kMaxUploadReportsToList, &uploads);
|
||||
const std::vector<const UploadList::UploadInfo*> uploads =
|
||||
list->GetUploads(kMaxUploadReportsToList);
|
||||
std::vector<v8::Local<v8::Object>> result;
|
||||
for (const auto& upload : uploads) {
|
||||
for (auto* const upload : uploads) {
|
||||
result.push_back(gin::DataObjectBuilder(isolate)
|
||||
.Set("date", upload.upload_time)
|
||||
.Set("id", upload.upload_id)
|
||||
.Set("date", upload->upload_time)
|
||||
.Set("id", upload->upload_id)
|
||||
.Build());
|
||||
}
|
||||
v8::Local<v8::Value> v8_result = gin::ConvertToV8(isolate, result);
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "net/http/http_util.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/mojom/clear_data_filter.mojom.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
#include "shell/browser/api/electron_api_cookies.h"
|
||||
#include "shell/browser/api/electron_api_data_pipe_holder.h"
|
||||
|
@ -181,7 +182,8 @@ struct Converter<ClearStorageDataOptions> {
|
|||
if (!ConvertFromV8(isolate, val, &options))
|
||||
return false;
|
||||
if (GURL storage_origin; options.Get("origin", &storage_origin))
|
||||
out->storage_key = blink::StorageKey(url::Origin::Create(storage_origin));
|
||||
out->storage_key = blink::StorageKey::CreateFirstParty(
|
||||
url::Origin::Create(storage_origin));
|
||||
std::vector<std::string> types;
|
||||
if (options.Get("storages", &types))
|
||||
out->storage_types = GetStorageMask(types);
|
||||
|
@ -874,9 +876,10 @@ v8::Local<v8::Value> Session::GetExtension(const std::string& extension_id) {
|
|||
|
||||
v8::Local<v8::Value> Session::GetAllExtensions() {
|
||||
auto* registry = extensions::ExtensionRegistry::Get(browser_context());
|
||||
auto installed_extensions = registry->GenerateInstalledExtensionsSet();
|
||||
const extensions::ExtensionSet extensions =
|
||||
registry->GenerateInstalledExtensionsSet();
|
||||
std::vector<const extensions::Extension*> extensions_vector;
|
||||
for (const auto& extension : *installed_extensions) {
|
||||
for (const auto& extension : extensions) {
|
||||
if (extension->location() !=
|
||||
extensions::mojom::ManifestLocation::kComponent)
|
||||
extensions_vector.emplace_back(extension.get());
|
||||
|
@ -944,8 +947,8 @@ static void StartPreconnectOnUI(ElectronBrowserContext* browser_context,
|
|||
url::Origin origin = url::Origin::Create(url);
|
||||
std::vector<predictors::PreconnectRequest> requests = {
|
||||
{url::Origin::Create(url), num_sockets_to_preconnect,
|
||||
net::NetworkAnonymizationKey(net::SchemefulSite(origin),
|
||||
net::SchemefulSite(origin))}};
|
||||
net::NetworkAnonymizationKey::CreateSameSite(
|
||||
net::SchemefulSite(origin))}};
|
||||
browser_context->GetPreconnectManager()->Start(url, requests);
|
||||
}
|
||||
|
||||
|
|
|
@ -741,6 +741,7 @@ void SimpleURLLoaderWrapper::OnResponseStarted(
|
|||
}
|
||||
|
||||
void SimpleURLLoaderWrapper::OnRedirect(
|
||||
const GURL& url_before_redirect,
|
||||
const net::RedirectInfo& redirect_info,
|
||||
const network::mojom::URLResponseHead& response_head,
|
||||
std::vector<std::string>* removed_headers) {
|
||||
|
|
|
@ -110,7 +110,8 @@ class SimpleURLLoaderWrapper
|
|||
// SimpleURLLoader callbacks
|
||||
void OnResponseStarted(const GURL& final_url,
|
||||
const network::mojom::URLResponseHead& response_head);
|
||||
void OnRedirect(const net::RedirectInfo& redirect_info,
|
||||
void OnRedirect(const GURL& url_before_redirect,
|
||||
const net::RedirectInfo& redirect_info,
|
||||
const network::mojom::URLResponseHead& response_head,
|
||||
std::vector<std::string>* removed_headers);
|
||||
void OnUploadProgress(uint64_t position, uint64_t total);
|
||||
|
|
|
@ -1517,8 +1517,7 @@ void WebContents::OnAudioStateChanged(bool audible) {
|
|||
EmitWithoutEvent("audio-state-changed", event);
|
||||
}
|
||||
|
||||
void WebContents::BeforeUnloadFired(bool proceed,
|
||||
const base::TimeTicks& proceed_time) {
|
||||
void WebContents::BeforeUnloadFired(bool proceed) {
|
||||
// Do nothing, we override this method just to avoid compilation error since
|
||||
// there are two virtual functions named BeforeUnloadFired.
|
||||
}
|
||||
|
@ -2931,7 +2930,7 @@ void WebContents::Print(gin::Arguments* args) {
|
|||
|
||||
// We've already done necessary parameter sanitization at the
|
||||
// JS level, so we can simply pass this through.
|
||||
base::Value media_size(base::Value::Type::DICTIONARY);
|
||||
base::Value media_size(base::Value::Type::DICT);
|
||||
if (options.Get("mediaSize", &media_size))
|
||||
settings.Set(printing::kSettingMediaSize, std::move(media_size));
|
||||
|
||||
|
@ -3872,8 +3871,8 @@ void WebContents::DevToolsIndexPath(
|
|||
if (devtools_indexing_jobs_.count(request_id) != 0)
|
||||
return;
|
||||
std::vector<std::string> excluded_folders;
|
||||
std::unique_ptr<base::Value> parsed_excluded_folders =
|
||||
base::JSONReader::ReadDeprecated(excluded_folders_message);
|
||||
absl::optional<base::Value> parsed_excluded_folders =
|
||||
base::JSONReader::Read(excluded_folders_message);
|
||||
if (parsed_excluded_folders && parsed_excluded_folders->is_list()) {
|
||||
for (const base::Value& folder_path : parsed_excluded_folders->GetList()) {
|
||||
if (folder_path.is_string())
|
||||
|
|
|
@ -584,8 +584,7 @@ class WebContents : public ExclusiveAccessContext,
|
|||
const gfx::Size& pref_size) override;
|
||||
|
||||
// content::WebContentsObserver:
|
||||
void BeforeUnloadFired(bool proceed,
|
||||
const base::TimeTicks& proceed_time) override;
|
||||
void BeforeUnloadFired(bool proceed) override;
|
||||
void OnBackgroundColorChanged() override;
|
||||
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||
|
|
|
@ -1514,13 +1514,6 @@ std::string ElectronBrowserClient::GetApplicationLocale() {
|
|||
return *g_application_locale;
|
||||
}
|
||||
|
||||
base::FilePath ElectronBrowserClient::GetFontLookupTableCacheDir() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
||||
DCHECK(!user_data_dir.empty());
|
||||
return user_data_dir.Append(FILE_PATH_LITERAL("FontLookupTableCache"));
|
||||
}
|
||||
|
||||
bool ElectronBrowserClient::ShouldEnableStrictSiteIsolation() {
|
||||
// Enable site isolation. It is off by default in Chromium <= 69.
|
||||
return true;
|
||||
|
|
|
@ -71,7 +71,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
|
||||
// content::ContentBrowserClient:
|
||||
std::string GetApplicationLocale() override;
|
||||
base::FilePath GetFontLookupTableCacheDir() override;
|
||||
bool ShouldEnableStrictSiteIsolation() override;
|
||||
void BindHostReceiverForRenderer(
|
||||
content::RenderProcessHost* render_process_host,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "services/device/public/cpp/geolocation/geolocation_manager_impl_mac.h"
|
||||
#include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h"
|
||||
#import "shell/browser/mac/electron_application.h"
|
||||
#include "shell/browser/mac/electron_application_delegate.h"
|
||||
#include "shell/common/electron_paths.h"
|
||||
|
@ -31,7 +31,8 @@ void ElectronBrowserMainParts::PreCreateMainMessageLoop() {
|
|||
setObject:@"NO"
|
||||
forKey:@"NSTreatUnknownArgumentsAsOpen"];
|
||||
|
||||
geolocation_manager_ = device::GeolocationManagerImpl::Create();
|
||||
geolocation_manager_ =
|
||||
device::SystemGeolocationSourceMac::CreateGeolocationManagerOnMac();
|
||||
}
|
||||
|
||||
void ElectronBrowserMainParts::FreeAppDelegate() {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "shell/browser/extensions/api/resources_private/resources_private_api.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
@ -79,7 +78,7 @@ ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() =
|
|||
default;
|
||||
|
||||
ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
|
||||
std::unique_ptr<get_strings::Params> params(
|
||||
absl::optional<get_strings::Params> params(
|
||||
get_strings::Params::Create(args()));
|
||||
base::Value::Dict dict;
|
||||
|
||||
|
|
|
@ -183,9 +183,9 @@ bool TabsExecuteScriptFunction::ShouldRemoveCSS() const {
|
|||
}
|
||||
|
||||
ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
|
||||
std::unique_ptr<tabs::Reload::Params> params(
|
||||
tabs::Reload::Params::Create(args()));
|
||||
EXTENSION_FUNCTION_VALIDATE(params.get());
|
||||
absl::optional<tabs::Reload::Params> params =
|
||||
tabs::Reload::Params::Create(args());
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
|
||||
bool bypass_cache = false;
|
||||
if (params->reload_properties && params->reload_properties->bypass_cache) {
|
||||
|
@ -206,8 +206,8 @@ ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
|
|||
}
|
||||
|
||||
ExtensionFunction::ResponseAction TabsGetFunction::Run() {
|
||||
std::unique_ptr<tabs::Get::Params> params(tabs::Get::Params::Create(args()));
|
||||
EXTENSION_FUNCTION_VALIDATE(params.get());
|
||||
absl::optional<tabs::Get::Params> params = tabs::Get::Params::Create(args());
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
int tab_id = params->tab_id;
|
||||
|
||||
auto* contents = electron::api::WebContents::FromID(tab_id);
|
||||
|
@ -228,8 +228,8 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
|
|||
}
|
||||
|
||||
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;
|
||||
|
@ -256,8 +256,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
|
|||
}
|
||||
|
||||
ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
|
||||
std::unique_ptr<tabs::GetZoom::Params> params(
|
||||
tabs::GetZoom::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;
|
||||
|
@ -272,8 +272,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::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;
|
||||
|
@ -296,8 +296,8 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
|
|||
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
|
||||
using 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;
|
||||
|
@ -423,9 +423,9 @@ bool PrepareURLForNavigation(const std::string& url_string,
|
|||
TabsUpdateFunction::TabsUpdateFunction() : web_contents_(nullptr) {}
|
||||
|
||||
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);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
auto* contents = electron::api::WebContents::FromID(tab_id);
|
||||
|
|
|
@ -44,7 +44,7 @@ void ElectronExtensionHostDelegate::CreateTab(
|
|||
std::unique_ptr<content::WebContents> web_contents,
|
||||
const std::string& extension_id,
|
||||
WindowOpenDisposition disposition,
|
||||
const gfx::Rect& initial_rect,
|
||||
const blink::mojom::WindowFeatures& window_features,
|
||||
bool user_gesture) {
|
||||
// TODO(jamescook): Should app_shell support opening popup windows?
|
||||
NOTREACHED();
|
||||
|
|
|
@ -30,7 +30,7 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate {
|
|||
void CreateTab(std::unique_ptr<content::WebContents> web_contents,
|
||||
const std::string& extension_id,
|
||||
WindowOpenDisposition disposition,
|
||||
const gfx::Rect& initial_rect,
|
||||
const blink::mojom::WindowFeatures& window_features,
|
||||
bool user_gesture) override;
|
||||
void ProcessMediaAccessRequest(content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
|
|
|
@ -70,7 +70,7 @@ bool HidChooserContext::CanStorePersistentEntry(
|
|||
// static
|
||||
base::Value HidChooserContext::DeviceInfoToValue(
|
||||
const device::mojom::HidDeviceInfo& device) {
|
||||
base::Value value(base::Value::Type::DICTIONARY);
|
||||
base::Value value(base::Value::Type::DICT);
|
||||
value.SetStringKey(
|
||||
kHidDeviceNameKey,
|
||||
base::UTF16ToUTF8(HidChooserContext::DisplayNameFromDeviceInfo(device)));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "net/cert/cert_verify_result.h"
|
||||
#include "shell/browser/net/cert_verifier_client.h"
|
||||
|
||||
namespace electron {
|
||||
|
|
|
@ -25,7 +25,7 @@ NetworkHintsHandlerImpl::NetworkHintsHandlerImpl(
|
|||
|
||||
NetworkHintsHandlerImpl::~NetworkHintsHandlerImpl() = default;
|
||||
|
||||
void NetworkHintsHandlerImpl::Preconnect(const GURL& url,
|
||||
void NetworkHintsHandlerImpl::Preconnect(const url::SchemeHostPort& url,
|
||||
bool allow_credentials) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
|
@ -34,7 +34,7 @@ void NetworkHintsHandlerImpl::Preconnect(const GURL& url,
|
|||
}
|
||||
auto* session = electron::api::Session::FromBrowserContext(browser_context_);
|
||||
if (session) {
|
||||
session->Emit("preconnect", url, allow_credentials);
|
||||
session->Emit("preconnect", url.GetURL(), allow_credentials);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ class NetworkHintsHandlerImpl
|
|||
receiver);
|
||||
|
||||
// network_hints::mojom::NetworkHintsHandler:
|
||||
void Preconnect(const GURL& url, bool allow_credentials) override;
|
||||
void Preconnect(const url::SchemeHostPort& url,
|
||||
bool allow_credentials) override;
|
||||
|
||||
private:
|
||||
explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
|
||||
|
|
|
@ -1049,13 +1049,14 @@ void OffScreenRenderWidgetHostView::NotifyHostAndDelegateOnWasShown(
|
|||
NOTREACHED();
|
||||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::RequestPresentationTimeFromHostOrDelegate(
|
||||
blink::mojom::RecordContentToVisibleTimeRequestPtr) {
|
||||
void OffScreenRenderWidgetHostView::
|
||||
RequestSuccessfulPresentationTimeFromHostOrDelegate(
|
||||
blink::mojom::RecordContentToVisibleTimeRequestPtr) {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::
|
||||
CancelPresentationTimeRequestForHostAndDelegate() {
|
||||
CancelSuccessfulPresentationTimeRequestForHostAndDelegate() {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
|
|
|
@ -144,9 +144,9 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
const content::DisplayFeature* display_feature) override;
|
||||
void NotifyHostAndDelegateOnWasShown(
|
||||
blink::mojom::RecordContentToVisibleTimeRequestPtr) final;
|
||||
void RequestPresentationTimeFromHostOrDelegate(
|
||||
void RequestSuccessfulPresentationTimeFromHostOrDelegate(
|
||||
blink::mojom::RecordContentToVisibleTimeRequestPtr) final;
|
||||
void CancelPresentationTimeRequestForHostAndDelegate() final;
|
||||
void CancelSuccessfulPresentationTimeRequestForHostAndDelegate() final;
|
||||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||
std::unique_ptr<content::SyntheticGestureTarget>
|
||||
CreateSyntheticGestureTarget() override;
|
||||
|
|
|
@ -220,4 +220,7 @@ OffScreenRenderWidgetHostView* OffScreenWebContentsView::GetView() const {
|
|||
|
||||
void OffScreenWebContentsView::FullscreenStateChanged(bool is_fullscreen) {}
|
||||
|
||||
void OffScreenWebContentsView::UpdateWindowControlsOverlay(
|
||||
const gfx::Rect& bounding_rect) {}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -64,6 +64,7 @@ class OffScreenWebContentsView : public content::WebContentsView,
|
|||
void SetOverscrollControllerEnabled(bool enabled) override;
|
||||
void OnCapturerCountChanged() override;
|
||||
void FullscreenStateChanged(bool is_fullscreen) override;
|
||||
void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override;
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
bool CloseTabAfterEventTrackingIfNeeded() override;
|
||||
|
|
|
@ -46,17 +46,6 @@ std::string EncodeToken(const base::UnguessableToken& token) {
|
|||
return buffer;
|
||||
}
|
||||
|
||||
base::UnguessableToken DecodeToken(base::StringPiece input) {
|
||||
std::string buffer;
|
||||
if (!base::Base64Decode(input, &buffer) ||
|
||||
buffer.length() != sizeof(uint64_t) * 2) {
|
||||
return base::UnguessableToken();
|
||||
}
|
||||
|
||||
const uint64_t* data = reinterpret_cast<const uint64_t*>(buffer.data());
|
||||
return base::UnguessableToken::Deserialize(data[0], data[1]);
|
||||
}
|
||||
|
||||
base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) {
|
||||
base::Value::Dict value;
|
||||
if (port.display_name && !port.display_name->empty())
|
||||
|
|
|
@ -97,7 +97,7 @@ const size_t kMaxMessageChunkSize = IPC::Channel::kMaximumMessageSize / 4;
|
|||
InspectableWebContents::List g_web_contents_instances_;
|
||||
|
||||
base::Value RectToDictionary(const gfx::Rect& bounds) {
|
||||
base::Value dict(base::Value::Type::DICTIONARY);
|
||||
base::Value dict(base::Value::Type::DICT);
|
||||
dict.SetKey("x", base::Value(bounds.x()));
|
||||
dict.SetKey("y", base::Value(bounds.y()));
|
||||
dict.SetKey("width", base::Value(bounds.width()));
|
||||
|
@ -105,17 +105,17 @@ base::Value RectToDictionary(const gfx::Rect& bounds) {
|
|||
return dict;
|
||||
}
|
||||
|
||||
gfx::Rect DictionaryToRect(const base::Value* dict) {
|
||||
const base::Value* found = dict->FindKey("x");
|
||||
gfx::Rect DictionaryToRect(const base::Value::Dict& dict) {
|
||||
const base::Value* found = dict.Find("x");
|
||||
int x = found ? found->GetInt() : 0;
|
||||
|
||||
found = dict->FindKey("y");
|
||||
found = dict.Find("y");
|
||||
int y = found ? found->GetInt() : 0;
|
||||
|
||||
found = dict->FindKey("width");
|
||||
found = dict.Find("width");
|
||||
int width = found ? found->GetInt() : 800;
|
||||
|
||||
found = dict->FindKey("height");
|
||||
found = dict.Find("height");
|
||||
int height = found ? found->GetInt() : 600;
|
||||
|
||||
return gfx::Rect(x, y, width, height);
|
||||
|
@ -353,7 +353,7 @@ InspectableWebContents::InspectableWebContents(
|
|||
const base::Value* bounds_dict =
|
||||
&pref_service_->GetValue(kDevToolsBoundsPref);
|
||||
if (bounds_dict->is_dict()) {
|
||||
devtools_bounds_ = DictionaryToRect(bounds_dict);
|
||||
devtools_bounds_ = DictionaryToRect(bounds_dict->GetDict());
|
||||
// Sometimes the devtools window is out of screen or has too small size.
|
||||
if (devtools_bounds_.height() < 100 || devtools_bounds_.width() < 100) {
|
||||
devtools_bounds_.set_height(600);
|
||||
|
@ -894,7 +894,7 @@ void InspectableWebContents::ClearPreferences() {
|
|||
}
|
||||
|
||||
void InspectableWebContents::GetSyncInformation(DispatchCallback callback) {
|
||||
base::Value result(base::Value::Type::DICTIONARY);
|
||||
base::Value result(base::Value::Type::DICT);
|
||||
result.SetBoolKey("isSyncActive", false);
|
||||
std::move(callback).Run(&result);
|
||||
}
|
||||
|
|
|
@ -153,9 +153,9 @@ void ElectronUsbDelegate::AdjustProtectedInterfaceClasses(
|
|||
content::RenderFrameHost* frame,
|
||||
std::vector<uint8_t>& classes) {
|
||||
// Isolated Apps have unrestricted access to any USB interface class.
|
||||
if (frame && frame->GetWebExposedIsolationLevel() >=
|
||||
content::RenderFrameHost::WebExposedIsolationLevel::
|
||||
kMaybeIsolatedApplication) {
|
||||
if (frame &&
|
||||
frame->GetWebExposedIsolationLevel() >=
|
||||
content::WebExposedIsolationLevel::kMaybeIsolatedApplication) {
|
||||
// TODO(https://crbug.com/1236706): Should the list of interface classes the
|
||||
// app expects to claim be encoded in the Web App Manifest?
|
||||
classes.clear();
|
||||
|
|
|
@ -82,7 +82,7 @@ UsbChooserContext::UsbChooserContext(ElectronBrowserContext* context)
|
|||
// static
|
||||
base::Value UsbChooserContext::DeviceInfoToValue(
|
||||
const device::mojom::UsbDeviceInfo& device_info) {
|
||||
base::Value device_value(base::Value::Type::DICTIONARY);
|
||||
base::Value device_value(base::Value::Type::DICT);
|
||||
device_value.SetStringKey(kDeviceNameKey, device_info.product_name
|
||||
? *device_info.product_name
|
||||
: base::StringPiece16());
|
||||
|
|
|
@ -389,7 +389,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
|||
}
|
||||
|
||||
void WebContentsPreferences::SaveLastPreferences() {
|
||||
last_web_preferences_ = base::Value(base::Value::Type::DICTIONARY);
|
||||
last_web_preferences_ = base::Value(base::Value::Type::DICT);
|
||||
last_web_preferences_.SetKey(options::kNodeIntegration,
|
||||
base::Value(node_integration_));
|
||||
last_web_preferences_.SetKey(options::kNodeIntegrationInSubFrames,
|
||||
|
|
|
@ -134,7 +134,7 @@ void Clipboard::Write(const gin_helper::Dictionary& data,
|
|||
}
|
||||
|
||||
if (data.Get("html", &html))
|
||||
writer.WriteHTML(html, std::string());
|
||||
writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized);
|
||||
|
||||
if (data.Get("image", &image))
|
||||
writer.WriteImage(image.AsBitmap());
|
||||
|
@ -195,7 +195,7 @@ std::u16string Clipboard::ReadHTML(gin_helper::Arguments* args) {
|
|||
void Clipboard::WriteHTML(const std::u16string& html,
|
||||
gin_helper::Arguments* args) {
|
||||
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
|
||||
writer.WriteHTML(html, std::string());
|
||||
writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized);
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> Clipboard::ReadBookmark(gin_helper::Arguments* args) {
|
||||
|
|
|
@ -18,10 +18,6 @@ namespace electron {
|
|||
|
||||
bool GetPreferredLanguagesUsingGlobalization(
|
||||
std::vector<std::wstring>* languages) {
|
||||
if (!base::win::ResolveCoreWinRTDelayload() ||
|
||||
!base::win::ScopedHString::ResolveCoreWinRTStringDelayload())
|
||||
return false;
|
||||
|
||||
base::win::ScopedHString guid = base::win::ScopedHString::Create(
|
||||
RuntimeClass_Windows_System_UserProfile_GlobalizationPreferences);
|
||||
Microsoft::WRL::ComPtr<
|
||||
|
|
|
@ -643,7 +643,7 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>,
|
|||
std::move(completion_callback));
|
||||
|
||||
render_frame->GetWebFrame()->RequestExecuteScript(
|
||||
blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1),
|
||||
blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1u),
|
||||
has_user_gesture ? blink::mojom::UserActivationOption::kActivate
|
||||
: blink::mojom::UserActivationOption::kDoNotActivate,
|
||||
blink::mojom::EvaluationTiming::kSynchronous,
|
||||
|
|
|
@ -45,10 +45,10 @@ void ElectronExtensionsDispatcherDelegate::InitializeBindingsSystem(
|
|||
extensions::Dispatcher* dispatcher,
|
||||
extensions::NativeExtensionBindingsSystem* bindings_system) {
|
||||
extensions::APIBindingsSystem* bindings = bindings_system->api_system();
|
||||
bindings->GetHooksForAPI("extension")
|
||||
->SetDelegate(std::make_unique<extensions::ExtensionHooksDelegate>(
|
||||
bindings_system->messaging_service()));
|
||||
bindings->GetHooksForAPI("tabs")->SetDelegate(
|
||||
std::make_unique<extensions::TabsHooksDelegate>(
|
||||
bindings_system->messaging_service()));
|
||||
bindings->RegisterHooksDelegate(
|
||||
"extension", std::make_unique<extensions::ExtensionHooksDelegate>(
|
||||
bindings_system->messaging_service()));
|
||||
bindings->RegisterHooksDelegate(
|
||||
"tabs", std::make_unique<extensions::TabsHooksDelegate>(
|
||||
bindings_system->messaging_service()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue