зеркало из https://github.com/electron/electron.git
chore: bump chromium to e836cbe709f3cd703f233de8eb6cc6ec99b72c9d (#27475)
Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
Родитель
44460e84c0
Коммит
e46446e7e4
2
BUILD.gn
2
BUILD.gn
|
@ -648,7 +648,7 @@ source_set("electron_lib") {
|
|||
}
|
||||
if (enable_pdf_viewer) {
|
||||
deps += [
|
||||
"//chrome/browser/resources/pdf:pdf_resources",
|
||||
"//chrome/browser/resources/pdf:resources",
|
||||
"//components/pdf/browser",
|
||||
"//components/pdf/renderer",
|
||||
"//pdf:pdf_ppapi",
|
||||
|
|
2
DEPS
2
DEPS
|
@ -14,7 +14,7 @@ gclient_gn_args = [
|
|||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'97adba472d4bf3f97675b5d9eade34526ebf730c',
|
||||
'1f252b391a40e2681b0d9aff6497b7401863d1fc',
|
||||
'node_version':
|
||||
'v14.15.4',
|
||||
'nan_version':
|
||||
|
|
|
@ -98,12 +98,11 @@ template("electron_extra_paks") {
|
|||
deps += [ "//content/browser/devtools:devtools_resources" ]
|
||||
if (enable_pdf_viewer) {
|
||||
sources += [ "$root_gen_dir/chrome/pdf_resources.pak" ]
|
||||
deps += [ "//chrome/browser/resources/pdf:pdf_resources" ]
|
||||
deps += [ "//chrome/browser/resources/pdf:resources" ]
|
||||
}
|
||||
if (enable_print_preview) {
|
||||
sources += [ "$root_gen_dir/chrome/print_preview_resources.pak" ]
|
||||
deps +=
|
||||
[ "//chrome/browser/resources/print_preview:print_preview_resources" ]
|
||||
deps += [ "//chrome/browser/resources/print_preview:resources" ]
|
||||
}
|
||||
if (enable_electron_extensions) {
|
||||
sources += [
|
||||
|
|
|
@ -121,19 +121,11 @@ WebContents.prototype.postMessage = function (...args) {
|
|||
};
|
||||
|
||||
WebContents.prototype.send = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(false /* internal */, channel, args);
|
||||
return this.mainFrame.send(channel, ...args);
|
||||
};
|
||||
|
||||
WebContents.prototype._sendInternal = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(true /* internal */, channel, args);
|
||||
return this.mainFrame._sendInternal(channel, ...args);
|
||||
};
|
||||
|
||||
function getWebFrame (contents: Electron.WebContents, frame: number | [number, number]) {
|
||||
|
|
|
@ -57,7 +57,7 @@ index 53cb9d2dc8f1962a70dc12b648d27c32be8aca4b..84af06fc56e4aa72d4d48801d7c037ad
|
|||
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
|
||||
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
|
||||
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
|
||||
index 31390a3f63a1e88d50c22fa8c0d3b53610ebda68..792ae8feaa53229e3f6f9130269b268f43ded8d6 100644
|
||||
index c6bec489b51ca2e71b7f81e64a8e59b534e2e91a..512a9003164e65bd4ab896ef75b173dab3a8d1db 100644
|
||||
--- a/include/openssl/cipher.h
|
||||
+++ b/include/openssl/cipher.h
|
||||
@@ -430,6 +430,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
|
@ -66,5 +66,5 @@ index 31390a3f63a1e88d50c22fa8c0d3b53610ebda68..792ae8feaa53229e3f6f9130269b268f
|
|||
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
||||
+OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||
|
||||
// EVP_aes_256_cfb128 is only available in decrepit.
|
||||
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||
// EVP_aes_128_cfb is an alias for |EVP_aes_128_cfb128| and is only available in
|
||||
// decrepit.
|
||||
|
|
|
@ -70,19 +70,15 @@ revert_remove_contentrendererclient_shouldfork.patch
|
|||
ignore_rc_check.patch
|
||||
remove_usage_of_incognito_apis_in_the_spellchecker.patch
|
||||
chore_use_electron_resources_not_chrome_for_spellchecker.patch
|
||||
add_trustedauthclient_to_urlloaderfactory.patch
|
||||
feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch
|
||||
accessible_pane_view.patch
|
||||
fix_use_the_new_mediaplaypause_key_listener_for_internal_chrome.patch
|
||||
hack_plugin_response_interceptor_to_point_to_electron.patch
|
||||
fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
|
||||
feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
|
||||
feat_enable_offscreen_rendering_with_viz_compositor.patch
|
||||
delay_lock_the_protocol_scheme_registry.patch
|
||||
gpu_notify_when_dxdiag_request_fails.patch
|
||||
feat_allow_embedders_to_add_observers_on_created_hunspell.patch
|
||||
feat_add_onclose_to_messageport.patch
|
||||
web_contents.patch
|
||||
ui_gtk_public_header.patch
|
||||
allow_in_process_windows_to_have_different_web_prefs.patch
|
||||
refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
|
||||
|
@ -107,3 +103,6 @@ use_public_apis_to_determine_if_a_font_is_a_system_font_in_mas_build.patch
|
|||
fix_setparentacessibile_crash_win.patch
|
||||
fix_export_zlib_symbols.patch
|
||||
don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
|
||||
web_contents.patch
|
||||
add_trustedauthclient_to_urlloaderfactory.patch
|
||||
fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
|
||||
|
|
|
@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
|||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index b6b4e0b27ae971f45ab6d50b2eaede6c4d5b7a8d..b785e23bb7e9bb61cb4434ab0bd2b8df9d83caaf 100644
|
||||
index 7d2ebf0d8a14fd89e32e35631428f43aed259c16..8efabb6b7825f6fab019d7f83e185a953bb589f1 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -119,6 +119,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -126,6 +126,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
|
@ -23,10 +23,10 @@ index b6b4e0b27ae971f45ab6d50b2eaede6c4d5b7a8d..b785e23bb7e9bb61cb4434ab0bd2b8df
|
|||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 28236758298526d3ae367035ae7165d842d67a2b..2548f5fcb9872486b69de478ce9f5bb1fe14763c 100644
|
||||
index a52fcdfcb01d8f9bf5739ba4c4bf47e610f19107..74f4881d51e671e178f8d4ff32a49b0010e9efb2 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4673,6 +4673,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4666,6 +4666,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,10 @@ index 28236758298526d3ae367035ae7165d842d67a2b..2548f5fcb9872486b69de478ce9f5bb1
|
|||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index dac05dd0ddc22d9d4ab2628bf3423210a6e9cee8..76aa37a7f9062cd85084bb074fb1b8866e3efba0 100644
|
||||
index 9d100f04d9f094320eb99fbaba58c3da1b860ab7..80226249efe0f6192a27e2d55f2f7f57912453b0 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -617,6 +617,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -598,6 +598,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
|
@ -53,10 +53,10 @@ index dac05dd0ddc22d9d4ab2628bf3423210a6e9cee8..76aa37a7f9062cd85084bb074fb1b886
|
|||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index d20c4427399a15a3626c7debfa691950f39ba740..f84d889c7c605d2ce55a20418c37a4337017043f 100644
|
||||
index 507da809f6d3448dffab4816c0675ece6cb35ba6..2711f5de447714bc1110f9abb559332bb0c4bddf 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -568,6 +568,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -567,6 +567,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
|
@ -79,10 +79,10 @@ index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b92
|
|||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 5c171f837c93fa3df33f5230e999a76fbf8d17c8..97f55d0c95f462384fd112a2a16a5170432677d9 100644
|
||||
index 9a526ac4808171693146870909e058f41fe56a50..a15e379ee951504fd77b27af61b318d266274b3d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -294,6 +294,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
|
@ -92,10 +92,10 @@ index 5c171f837c93fa3df33f5230e999a76fbf8d17c8..97f55d0c95f462384fd112a2a16a5170
|
|||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 63076a78c9dc145a573cad55cc0d880636fdd972..5f7c14a425d2892affa0c872567be922f05ac096 100644
|
||||
index 0e71a094d9b67a6d1f5fb298d7057495e3a37803..cb7bfe7d79d6024b390c77285c2d47150a391c63 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -415,6 +415,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -342,6 +342,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -110,10 +110,10 @@ index 63076a78c9dc145a573cad55cc0d880636fdd972..5f7c14a425d2892affa0c872567be922
|
|||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 00780a63657423935bce8a6b35cc1d629b256d14..806e8a381e6089d0ade1492ecd7608f13a71c230 100644
|
||||
index 28d83f87c1582c8df6209f5d0a9aef130f0a4bea..3822c88091dfc803c4c57256e04bbc3946f8a869 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -76,6 +76,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
|
@ -123,10 +123,10 @@ index 00780a63657423935bce8a6b35cc1d629b256d14..806e8a381e6089d0ade1492ecd7608f1
|
|||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index fe5aeef63b5dba29adc0b960f96199308ef7b941..9504ffe0db55e429db6c360900f62cbbfce24704 100644
|
||||
index 3e442a5ddf1dd775febd433e2adb4795a3e5edec..22b5d7fbc3f09ea677444adbd8cae2ecd205b037 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -337,6 +337,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
Date: Tue, 12 Nov 2019 11:50:16 -0800
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Wed, 27 Jan 2021 15:20:01 -0800
|
||||
Subject: add TrustedAuthClient to URLLoaderFactory
|
||||
|
||||
This allows intercepting authentication requests for the 'net' module.
|
||||
|
@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
|
|||
available, which there isn't in the case of the 'net' module.
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index ac70e294f915f326095675d222f44519e2683ed0..c46465e5596eab620e10faff172f37d71833869f 100644
|
||||
index fd0f46bfd8d5b7c803042635460cd3b87d2521dc..64a7d8b08f19865cd5d824a9a48ef27abe60a02a 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -228,6 +228,25 @@ struct CTPolicy {
|
||||
@@ -228,6 +228,26 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
|
@ -29,6 +29,7 @@ index ac70e294f915f326095675d222f44519e2683ed0..c46465e5596eab620e10faff172f37d7
|
|||
+ URLResponseHead? head,
|
||||
+ pending_remote<AuthChallengeResponder> auth_challenge_responder);
|
||||
+};
|
||||
+
|
||||
+interface TrustedURLLoaderAuthClient {
|
||||
+ // When a new URLLoader is created, this will be called to pass a
|
||||
+ // corresponding |auth_client|.
|
||||
|
@ -39,28 +40,28 @@ index ac70e294f915f326095675d222f44519e2683ed0..c46465e5596eab620e10faff172f37d7
|
|||
interface CertVerifierClient {
|
||||
Verify(
|
||||
int32 default_error,
|
||||
@@ -660,6 +679,8 @@ struct URLLoaderFactoryParams {
|
||||
@@ -660,6 +680,8 @@ struct URLLoaderFactoryParams {
|
||||
// impact because of the extra process hops, so use should be minimized.
|
||||
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
|
||||
|
||||
+ pending_remote<TrustedURLLoaderAuthClient>? auth_client;
|
||||
+
|
||||
// |factory_bound_access_patterns| are used for CORS checks in addition to
|
||||
// the per-context allow patterns that is managed via NetworkContext
|
||||
// interface. This still respects the per-context block lists.
|
||||
// Information used restrict access to identity information (like SameSite
|
||||
// cookies) and to shard network resources, like the cache. If set, takes
|
||||
// precedence over ResourceRequest::TrustedParams::IsolationInfo field
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801ab4ed3d8 100644
|
||||
index 00339d4537993b97bd2a3d62e3aa95057cd41a03..165aba6599c17d74a4ffc3553f018854f7807ab0 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -461,6 +461,7 @@ URLLoader::URLLoader(
|
||||
@@ -459,6 +459,7 @@ URLLoader::URLLoader(
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
|
||||
mojom::OriginPolicyManager* origin_policy_manager,
|
||||
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
|
||||
const cors::OriginAccessList* origin_access_list,
|
||||
@@ -525,6 +526,11 @@ URLLoader::URLLoader(
|
||||
const cors::OriginAccessList& origin_access_list,
|
||||
@@ -523,6 +524,11 @@ URLLoader::URLLoader(
|
||||
header_client_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
|
||||
}
|
||||
|
@ -72,7 +73,7 @@ index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801
|
|||
if (want_raw_headers_) {
|
||||
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
|
||||
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
|
||||
@@ -1170,7 +1176,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -1169,7 +1175,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
// |this| may have been deleted.
|
||||
return;
|
||||
}
|
||||
|
@ -81,7 +82,7 @@ index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801
|
|||
OnAuthCredentials(base::nullopt);
|
||||
return;
|
||||
}
|
||||
@@ -1186,11 +1192,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -1185,11 +1191,19 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
if (url_request->response_headers())
|
||||
head->headers = url_request->response_headers();
|
||||
head->auth_challenge_info = auth_info;
|
||||
|
@ -90,7 +91,6 @@ index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801
|
|||
- request_id_, url_request_->url(), first_auth_attempt_, auth_info,
|
||||
- std::move(head),
|
||||
- auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
|
||||
+
|
||||
+ if (auth_client_) {
|
||||
+ auth_client_->OnAuthRequired(
|
||||
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
|
||||
|
@ -108,7 +108,7 @@ index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801
|
|||
auth_challenge_responder_receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 193733544750f8cdb07d76be80170f752947cec6..e2fcaeea674b3012d428911637748bb819aaf3e8 100644
|
||||
index 7d0dc6685a0f1f7e5e3bcde2b5beb416f2d46030..d339b2a954067c5e2adcac6e64a6507f070e550b 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -129,6 +129,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
|
@ -128,7 +128,7 @@ index 193733544750f8cdb07d76be80170f752947cec6..e2fcaeea674b3012d428911637748bb8
|
|||
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
|
||||
|
||||
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
|
||||
index adf7d7e9df186f032cb85d2aeba301c551442c78..07b3c4a219ecefa142efa10ba0b7efda16d755d6 100644
|
||||
index 3b9b240615e56ef11a32ac87df2d189aae5c3bfa..bd2f131da2432eb63f0cb6610e10ede219f179c4 100644
|
||||
--- a/services/network/url_loader_factory.cc
|
||||
+++ b/services/network/url_loader_factory.cc
|
||||
@@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory(
|
||||
|
|
|
@ -42,7 +42,7 @@ index 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa33
|
|||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index ac2cb47de75eb3c3a695ff784c651ba3864ee6a0..e238c4e94fe6501bf7f89654d3b3eeef86eafb63 100644
|
||||
index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339db615cea 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -24,6 +24,11 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
|
@ -86,7 +86,7 @@ index ac2cb47de75eb3c3a695ff784c651ba3864ee6a0..e238c4e94fe6501bf7f89654d3b3eeef
|
|||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 64444803e75f95ad1a9b526521c5eee90ba5f925..f8b33c329988f269964783fb290721fc5208ae3d 100644
|
||||
index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa2f3f4b70 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -9,6 +9,7 @@
|
||||
|
@ -128,7 +128,7 @@ index 64444803e75f95ad1a9b526521c5eee90ba5f925..f8b33c329988f269964783fb290721fc
|
|||
// only controls whether or not the "document.cookie" field is properly
|
||||
// connected to the backing store, for instance if you wanted to be able to
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index c071879cdc2e8c39f9eb9e95aa9f08d6d560fc58..9b4143fe461b35df5763e89991c00befd12a18d2 100644
|
||||
index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd467a64ca3b 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
|
@ -229,7 +229,7 @@ index c071879cdc2e8c39f9eb9e95aa9f08d6d560fc58..9b4143fe461b35df5763e89991c00bef
|
|||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index 519b354f7a0e02e8bfeb9c33904f78898fce37c4..483712685b01a75ad26e9f45a08f2ae32b00d10f 100644
|
||||
index 1100a97287a02c3a1286513af6a36153ee6f76cb..7e5e12118f0c5c6725fb478a0198a46e500c0157 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
|
|
|
@ -49,10 +49,10 @@ index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd96
|
|||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index b0dda2fb6fd584cf6da2b11aeb1d6e1f310e0e22..33ebc10e9e98580107b0d419a0e2f55676bcb21e 100644
|
||||
index ae17afa2ef54f16875107bb462ceac3e741e285f..214bf6868a56e77030583dccf190dac14bcdc190 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -621,10 +621,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -670,10 +670,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
|
@ -63,7 +63,7 @@ index b0dda2fb6fd584cf6da2b11aeb1d6e1f310e0e22..33ebc10e9e98580107b0d419a0e2f556
|
|||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -662,6 +658,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -715,6 +711,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ This exposes a method for obtaining a reference to an isolated world, which is
|
|||
otherwise not available in the Blink API.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index e397b71732828ffdce2a1a2d006e5f6b0ef531c1..a56deb181dce34de6f9bec459f9745ec92245916 100644
|
||||
index 01599517cc798843e50a7fe1c8d994c37b1cabf6..caa7048d51eeb43a4cfbbc75020e46e20b304898 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -367,6 +367,8 @@ class WebLocalFrame : public WebFrame {
|
||||
|
@ -20,10 +20,10 @@ index e397b71732828ffdce2a1a2d006e5f6b0ef531c1..a56deb181dce34de6f9bec459f9745ec
|
|||
// Executes script in the context of the current page and returns the value
|
||||
// that the script evaluated to with callback. Script execution can be
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 6928b23759b3038ca30988c03531712272b9d4af..64a5c9de299b7aea1e07662078a99acbece397ae 100644
|
||||
index f9e9ffead24fab0e5bf73f9a808aa07f30b4370a..e95e8d4e252b30a4f4a5ae16ca78737c48d9cca1 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -1034,6 +1034,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
@@ -1033,6 +1033,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ index 6928b23759b3038ca30988c03531712272b9d4af..64a5c9de299b7aea1e07662078a99acb
|
|||
return BindingSecurity::ShouldAllowAccessToFrame(
|
||||
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index 5cc6f7a58ec3e89f0cd2aaddb8daa08facbacf5b..917865a2fe3564a50c9bd91bf9e2a99cef0fb424 100644
|
||||
index 786f9dd51861cffd8869f2262104ec79c2066db4..7833167f3deda00f1ccd67b5904f51f6d9162a03 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -162,6 +162,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
|
|||
Build BoringSSL with some extra functions that nodejs needs.
|
||||
|
||||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
|
||||
index 17cf9cda9e54fef267e362344f7faacd22893cce..7916e87c19fd21ae9675573af04ac2aa8133daf1 100644
|
||||
index ad77b1b087829ca94940696a9b520c9ce189e7cd..13abac589d07895c51d0848c5a38693d4a32133d 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -46,6 +46,19 @@ config("no_asm_config") {
|
||||
|
|
|
@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
|||
rebuild the entire tree.
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 1cff821865f06fec2efa37bf68781af94a4127e7..aa81930d894468825f41490ed172c339dbfdb4c6 100644
|
||||
index 407ca1a239c1be1012f915721110597e81e75b29..acbde830ca61f9ead221f2ded656a2bd45091d23 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
@ -27,7 +27,7 @@ index 1cff821865f06fec2efa37bf68781af94a4127e7..aa81930d894468825f41490ed172c339
|
|||
# Set to enable the official build level of optimization. This has nothing
|
||||
# to do with branding, but enables an additional level of optimization above
|
||||
# release (!is_debug). This might be better expressed as a tri-state
|
||||
@@ -344,6 +347,7 @@ default_compiler_configs = [
|
||||
@@ -345,6 +348,7 @@ default_compiler_configs = [
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
"//build/config/coverage:default_coverage",
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
|
|
|
@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
|||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 4214b353a94657b70280faec44c93889e7d7c400..b23fa9524e2632ee5784ecfce7d769ee17f723b2 100644
|
||||
index b983f4399ceddacd050524eda2bc2936f94ae0e7..fb7b8fe6f89ffd61fa610f9085e5a9b0bbf9c379 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -5286,6 +5286,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -5327,6 +5327,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
|
@ -21,10 +21,10 @@ index 4214b353a94657b70280faec44c93889e7d7c400..b23fa9524e2632ee5784ecfce7d769ee
|
|||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 496c364797997997f2886abc95db2e6f49d848c6..3981c2caabd0362530c27e0dee572a56aaac0caf 100644
|
||||
index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1dce305148 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3560,6 +3560,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3541,6 +3541,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
|
@ -39,7 +39,7 @@ index 496c364797997997f2886abc95db2e6f49d848c6..3981c2caabd0362530c27e0dee572a56
|
|||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_id, session_storage_namespace);
|
||||
|
||||
@@ -3601,12 +3609,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3582,12 +3590,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
AddDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
|
@ -49,14 +49,14 @@ index 496c364797997997f2886abc95db2e6f49d848c6..3981c2caabd0362530c27e0dee572a56
|
|||
- params.target_url, new_contents_impl);
|
||||
- }
|
||||
-
|
||||
observers_.ForEachObserver([&](WebContentsObserver* observer) {
|
||||
observer->DidOpenRequestedURL(new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(),
|
||||
observers_.NotifyObservers(&WebContentsObserver::DidOpenRequestedURL,
|
||||
new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(), params.disposition,
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index 182c6bf04e9937080efcedfc617fb9e072f10500..6fb3a1ee4a31e9a228e8ab04b1ce21c8af50ae74 100644
|
||||
index 3530150bfcb34ceb1f7ae5f17808d0a07cb3d866..330906dd0518b1fb46872e3f62ecd4bfe459294c 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -330,6 +330,10 @@ struct CreateNewWindowParams {
|
||||
@@ -324,6 +324,10 @@ struct CreateNewWindowParams {
|
||||
// The impression associated with the navigation in the new window, if
|
||||
// one is specified.
|
||||
Impression? impression;
|
||||
|
@ -68,10 +68,10 @@ index 182c6bf04e9937080efcedfc617fb9e072f10500..6fb3a1ee4a31e9a228e8ab04b1ce21c8
|
|||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 4438e0417b3cc11fad98ce792eaaf12710539fae..e9e45bacdcc5ad09ac933ccaaa663e0d05a0ad33 100644
|
||||
index adc83e8b9ba01d830362c3236a22fe09684ceaf8..e3088a155d552c87f009cec282f32730d9cb3655 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -544,6 +544,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -554,6 +554,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -81,7 +81,7 @@ index 4438e0417b3cc11fad98ce792eaaf12710539fae..e9e45bacdcc5ad09ac933ccaaa663e0d
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index df6e463d1518b453aae79dffdda559a93eba1f9d..133aef45c3187fac0e47e1538df3252de1fdfb8c 100644
|
||||
index b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b49a56e93 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -154,6 +154,7 @@ class NetworkService;
|
||||
|
@ -92,7 +92,7 @@ index df6e463d1518b453aae79dffdda559a93eba1f9d..133aef45c3187fac0e47e1538df3252d
|
|||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -881,6 +882,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -903,6 +904,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -102,7 +102,7 @@ index df6e463d1518b453aae79dffdda559a93eba1f9d..133aef45c3187fac0e47e1538df3252d
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 23ef0fe1e0275778bccd1bbae8ec46fa3dc24a7c..41bae2ebe3c6db1fc81a90763f304e90b8a1005c 100644
|
||||
index 11ff10f2f8a1479f045be6295d7fe7476eb3a28a..bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -27,6 +27,17 @@ namespace content {
|
||||
|
@ -124,7 +124,7 @@ index 23ef0fe1e0275778bccd1bbae8ec46fa3dc24a7c..41bae2ebe3c6db1fc81a90763f304e90
|
|||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 21d30d1b60ba870a35be87f8d1823ef5e3902a01..73b85693d59f25160df21c3b535869b3d03c3a76 100644
|
||||
index 39349ef0c0223f632bddd3b82fd6055344af9fb4..6aba9de130ed9abd81ecc7cae370ed5b5f2fa188 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -17,6 +17,7 @@
|
||||
|
@ -150,29 +150,30 @@ index 21d30d1b60ba870a35be87f8d1823ef5e3902a01..73b85693d59f25160df21c3b535869b3
|
|||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 3128b21c95c7b4535787142b6250b77f2c58b269..087b9891b2f79b54cd22cf8dc3591fa6dde79579 100644
|
||||
index 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c14eb85dc 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/platform/impression_conversions.h"
|
||||
#include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
+#include "third_party/blink/public/platform/web_url_request_util.h"
|
||||
#include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h"
|
||||
#include "third_party/blink/public/web/web_frame_widget.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
@@ -385,6 +386,9 @@ WebView* RenderViewImpl::CreateView(
|
||||
if (impression) {
|
||||
params->impression = ConvertWebImpressionToImpression(*impression);
|
||||
@@ -381,6 +382,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
params->impression = blink::ConvertWebImpressionToImpression(*impression);
|
||||
}
|
||||
|
||||
+ params->raw_features = features.raw_features.Utf8(
|
||||
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
|
||||
+ params->body = GetRequestBodyForWebURLRequest(request);
|
||||
|
||||
+
|
||||
// We preserve this information before sending the message since |params| is
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index 52bfdcfe1b1530133582dcd6bdef4ea80c8d8b45..adf92fa28b0a638cb311c48bc142448022513375 100644
|
||||
index 6450bbe41aeb2fd3a43c6731390efcffc753064d..842408de6bff1c3e4be7bbfbc0e1affa6a7af8a3 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -442,6 +442,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
|
@ -185,7 +186,7 @@ index 52bfdcfe1b1530133582dcd6bdef4ea80c8d8b45..adf92fa28b0a638cb311c48bc1424480
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
|
||||
index 15262ff3e3a7be037d5eedda3279c8897628e4d8..4e285a97787d9f487b5424b2dfc2b0fff2df53a2 100644
|
||||
index 08b5a0fd69b2ba2364e90fa66342880e4f284671..8ea32fadf0962ce87de5f107e5c0996684d5d2b7 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
|
@ -220,10 +221,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
|
|||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index a20d3082ed631ff7c7066ce2f20ed687469b17ce..84b8fb235826c9a5de4dbbd79aa3b6af0ed786cf 100644
|
||||
index 17e2e87e0ceef4c1cfba34ba8f3ee222ac8b4ca1..0d7dc9553c24d67b0ff25fa86260689cfeff5bbe 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2001,6 +2001,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2019,6 +2019,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
}
|
||||
|
||||
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);
|
||||
|
|
|
@ -35,7 +35,7 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..fe1977c5e6ce0f5b30e8be529b9efa51
|
|||
|
||||
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
|
||||
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
||||
index a52c550f1aeadcdb36948078ed5fec24838c3da8..4aaddf84c0b3574218df5bdea77a72967271d5a8 100644
|
||||
index 46322975b9eed687569df3f89f6503513caffbcd..f196c0cf671a4969015219478c58c3a175b70832 100644
|
||||
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
||||
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
|
||||
@@ -123,8 +123,7 @@ class DriveWebContentsManager : public content::WebContentsObserver,
|
||||
|
@ -140,10 +140,10 @@ index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f8
|
|||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 1dc23535c42aec292e94a09e9fd2d1c7f37e82cd..01cea80d1fe0effeaf200fb6988df7f89787441a 100644
|
||||
index da9ba4c8de7c30842ad397c4307220ddcbd05c1f..6937a1a08a3a784399bf233c70ebca13322f7147 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1802,12 +1802,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -159,10 +159,10 @@ index 1dc23535c42aec292e94a09e9fd2d1c7f37e82cd..01cea80d1fe0effeaf200fb6988df7f8
|
|||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 7287ec00c3f57a8e10c4329f181bcdccaed7177d..81b7395aec797c201465164437441cbca6e99e0d 100644
|
||||
index 47fee21d0f5a7f68e9debd613e50cdbe03bf7656..1511ed77d9ee90ba27a4731f978f5073b7af0a38 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -784,8 +784,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -788,8 +788,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
|
|||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index d20ce60c04007a83e412defbf525a756788bd0cc..a733423a617638147602c49874e0fa60c7983460 100644
|
||||
index 39ef587971d4c171fb5878efb7a94c3523b4b80c..14f3ebdc6fe53f8e4a9b3d6ec8d7a8875a20c392 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3521,8 +3521,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3493,8 +3493,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
@ -278,7 +278,7 @@ index d20ce60c04007a83e412defbf525a756788bd0cc..a733423a617638147602c49874e0fa60
|
|||
opener, source_site_instance, is_new_browsing_instance,
|
||||
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 41bae2ebe3c6db1fc81a90763f304e90b8a1005c..b1b2a4e20d58c7eeb5bbaca3d908ce13c06140b7 100644
|
||||
index bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca..12f8b5b86311eef6c9025bb170111a9334bab455 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -139,8 +139,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
|
@ -292,7 +292,7 @@ index 41bae2ebe3c6db1fc81a90763f304e90b8a1005c..b1b2a4e20d58c7eeb5bbaca3d908ce13
|
|||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 73b85693d59f25160df21c3b535869b3d03c3a76..7f70aca41af3d12bccac751f8a8639bc16598891 100644
|
||||
index 6aba9de130ed9abd81ecc7cae370ed5b5f2fa188..d19b7ba1cbb686f72ce6989052e5f91d54a086e6 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -316,8 +316,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
|
@ -334,10 +334,10 @@ index 97273c32a05acf325fd0de22c4f79c1746aa23bc..4b357acd069387963347d35d82371b95
|
|||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 998d6d0c481fd49ff3a8a852e05347179f80b276..6ce9f2e9e8031d9abf03da7e656f221ce0912790 100644
|
||||
index 8f4c53f3f3cae0efb507b9c8951e5e50883d5dc7..9239b5da0adb3a55c37b41a4b06d2a8ca0b88659 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -380,8 +380,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -381,8 +381,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -348,7 +348,7 @@ index 998d6d0c481fd49ff3a8a852e05347179f80b276..6ce9f2e9e8031d9abf03da7e656f221c
|
|||
}
|
||||
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index a7f0b19a8ab9bac6f1315ebd715d8e1b134edfe1..cbe2912d4ab2d9015396bbddf7836e106d0bff8b 100644
|
||||
index d9e22ce31927da93f38f6a5a153222f91580f2c2..e6c8be2ad8175cd4a5b00e69f5072ff359ad862a 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -155,8 +155,7 @@ class MimeHandlerViewGuest
|
||||
|
@ -362,7 +362,7 @@ index a7f0b19a8ab9bac6f1315ebd715d8e1b134edfe1..cbe2912d4ab2d9015396bbddf7836e10
|
|||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
|
||||
index a83c2dd71ef35358e55234200cc1a67f04ac84a9..de02460d4d390950330b07c97f9791388474ee2c 100644
|
||||
index 3219179bf421a5d6056837c1c2b492a9ce008516..8b39bf68cfe789dee1398a200671ceac006a7de0 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.cc
|
||||
+++ b/fuchsia/engine/browser/frame_impl.cc
|
||||
@@ -372,8 +372,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
|
@ -390,10 +390,10 @@ index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782
|
|||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
index af6718c5d217b18c2afe42ef2d66ec8a0f6671f5..42ec80412a5be0fb034c145974aa6caba66b446c 100644
|
||||
index e9c7b85e6b62960e7618a5b727e3ae43dd62e8c9..909d2c126efc4efee31e7014666d921d038fbaef 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -170,8 +170,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
@@ -197,8 +197,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
|
|
@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
|
|||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 5c26343c8eb94b4274f53bd823f730792d13e4b7..e8e70431c4fff82fdf84fb5f8db8ce11b7a17a29 100644
|
||||
index 68eacfbade049e2f82cb09dcb2b6944c5a200997..849bb1d3f2deb7ab89a774f61125aadf1b6fc769 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -6206,6 +6206,7 @@ static_library("browser") {
|
||||
@@ -6216,6 +6216,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
|
|
|
@ -45,6 +45,22 @@ index e1c49f5cd9bd249398a14905a6fb41d54238e1ec..ad1c76e77e029d759547f6aded492ae6
|
|||
}
|
||||
|
||||
} // namespace
|
||||
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
index 87e716364fbd154b139cf6818b0113fef9b319e0..7d3e95cad07354ec71ae9643b2af5820e8807c9a 100644
|
||||
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
@@ -286,6 +286,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
|
||||
case ui::VKEY_MEDIA_STOP:
|
||||
system_media_controls_->SetIsStopEnabled(should_enable);
|
||||
break;
|
||||
+ case ui::VKEY_VOLUME_DOWN:
|
||||
+ case ui::VKEY_VOLUME_UP:
|
||||
+ case ui::VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
|
||||
index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc7951d372 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.cc
|
||||
|
@ -60,10 +76,10 @@ index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc
|
|||
|
||||
} // namespace ui
|
||||
diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
|
||||
index 6052fd13ff3d63cf8a4b019b058efb61aad39c3b..42eac7a7b656096c1d2039e340037ac8a70678c9 100644
|
||||
index 60f7ad6ffb28fa6554e02a7e031408f4d1124d86..0e8325e993178443d926249c427957bb16991861 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener_mac.mm
|
||||
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
|
||||
@@ -33,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
|
||||
@@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
|
||||
case NX_KEYTYPE_NEXT:
|
||||
case NX_KEYTYPE_FAST:
|
||||
return VKEY_MEDIA_NEXT_TRACK;
|
||||
|
@ -76,7 +92,7 @@ index 6052fd13ff3d63cf8a4b019b058efb61aad39c3b..42eac7a7b656096c1d2039e340037ac8
|
|||
}
|
||||
return VKEY_UNKNOWN;
|
||||
}
|
||||
@@ -193,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
|
||||
@@ -191,7 +197,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
|
||||
int key_code = (data1 & 0xFFFF0000) >> 16;
|
||||
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
|
||||
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&
|
||||
|
@ -88,31 +104,3 @@ index 6052fd13ff3d63cf8a4b019b058efb61aad39c3b..42eac7a7b656096c1d2039e340037ac8
|
|||
return event;
|
||||
}
|
||||
|
||||
diff --git a/ui/base/accelerators/system_media_controls_media_keys_listener.cc b/ui/base/accelerators/system_media_controls_media_keys_listener.cc
|
||||
index 9d6084ceaccfd071549e63e3015f55ef292312ec..846210b04d6e2e193413c643296938ec550f6d25 100644
|
||||
--- a/ui/base/accelerators/system_media_controls_media_keys_listener.cc
|
||||
+++ b/ui/base/accelerators/system_media_controls_media_keys_listener.cc
|
||||
@@ -65,6 +65,11 @@ bool SystemMediaControlsMediaKeysListener::StartWatchingMediaKey(
|
||||
case VKEY_MEDIA_STOP:
|
||||
service_->SetIsStopEnabled(true);
|
||||
break;
|
||||
+ case VKEY_VOLUME_DOWN:
|
||||
+ case VKEY_VOLUME_UP:
|
||||
+ case VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -97,6 +102,11 @@ void SystemMediaControlsMediaKeysListener::StopWatchingMediaKey(
|
||||
case VKEY_MEDIA_STOP:
|
||||
service_->SetIsStopEnabled(false);
|
||||
break;
|
||||
+ case VKEY_VOLUME_DOWN:
|
||||
+ case VKEY_VOLUME_UP:
|
||||
+ case VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
|
|||
in electron::api::WebContents::ResetManagedWebContents.
|
||||
|
||||
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
||||
index 80b679406ee9f24b9ef3669b0274bb467dd0a02d..bed72ab5ba6b116c081054c2424831bbc7cc9bbd 100644
|
||||
index 5c3c8e53064c1f812ce16798737493de2d83e130..3b7e379c749244ce9d9af466ec45ffe66366d63c 100644
|
||||
--- a/content/browser/browser_main_loop.cc
|
||||
+++ b/content/browser/browser_main_loop.cc
|
||||
@@ -1409,7 +1409,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
@@ -1405,7 +1405,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
NOTREACHED();
|
||||
#else
|
||||
base::RunLoop run_loop;
|
||||
|
|
|
@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
|
|||
failing checks and allow the rest of the target to have them enabled.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
index d189ac6c2506e5b95aaa12a3b270f91c5a18ae19..ccbd634031671229196f7c68eb4a241366af2379 100644
|
||||
index 12f5a1a1282b8790f21185c926f438fa4fc7499e..e10b228fb8145f0daa91948c98ba0e8ab8a8f049 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
@@ -1306,8 +1306,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -1313,8 +1313,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ index d189ac6c2506e5b95aaa12a3b270f91c5a18ae19..ccbd634031671229196f7c68eb4a2413
|
|||
|
||||
if (rfh->GetParent()) {
|
||||
// All manual subframes would be did_create_new_entry and handled above, so
|
||||
@@ -1598,7 +1600,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
|
||||
@@ -1604,7 +1606,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
|
||||
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
|
|||
re-submitting the patch.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 811017f5d4554c90b8e9f4b83135561cffc93ddd..d8c4a7b3189e02518bda2b2aa17d07351d354e26 100644
|
||||
index 829cf04246cc1dbb6a3a3ca826a652d09e990d71..cfa37c3311a888d50e0918fcf80e0b0e36db7b24 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -700,7 +700,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -648,7 +648,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
|
|||
can be found at https://github.com/electron/electron/issues/1821
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 4c9654191ddce3db5f9391cdbd07b1be8a77a2af..dc2cdf7467912d36261583c91c8f46fbe041c5e0 100644
|
||||
index c347d1610d4c3d6a6ee3c7cb17d49d54482de818..53a7c6d03146994f9af9a503646e65b5c884ab23 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -304,6 +304,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
@ -49,7 +49,7 @@ index 4c9654191ddce3db5f9391cdbd07b1be8a77a2af..dc2cdf7467912d36261583c91c8f46fb
|
|||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index 3d498de563ed739f55136f83b110b31bd66a1b5c..5d7810c9e31d9948212826377d6f039ad5761ba6 100644
|
||||
index 042392a659fd6934e84d66cc985d25863e365e34..5e88e780c3da4805eae7870291188e636423042e 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -202,6 +202,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
|
|
|
@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
|||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index 3988b82b28eedcad0e776f109853b32672423684..803342c0eccf3ddd5e307cf1bc0c97c4b121d6aa 100644
|
||||
index c07966b670c8f16b8d50a94e191ccd46a3cf9227..53bcab4feccb8ba09c21b8338495d983bb602c6f 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1770,6 +1770,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1771,6 +1771,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
|
||||
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
|
@ -60,7 +60,7 @@ index 2e32385af86c6156c4197393248d70c470cdd4b5..350f56238e1c01cc6073555933f57df8
|
|||
bool force_antialiasing = false;
|
||||
bool force_blending_with_shaders = false;
|
||||
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
|
||||
index 88045687f03cbefa8c2adaee65f6ada75d3f3e52..53cb6859dd951dd79f9d463c2bb2177268f1a251 100644
|
||||
index 4dbfd138a467462bae4ff062d9a8062b76ecaa4c..cc7c95bb0f4e6ec6b3579ced90a0f1035f27bef6 100644
|
||||
--- a/components/viz/host/renderer_settings_creation.cc
|
||||
+++ b/components/viz/host/renderer_settings_creation.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
|
@ -81,7 +81,7 @@ index 88045687f03cbefa8c2adaee65f6ada75d3f3e52..53cb6859dd951dd79f9d463c2bb21772
|
|||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
#if defined(OS_APPLE)
|
||||
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
|
||||
index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b6c788a02 100644
|
||||
index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb647689f07 100644
|
||||
--- a/components/viz/service/display/gl_renderer.cc
|
||||
+++ b/components/viz/service/display/gl_renderer.cc
|
||||
@@ -88,6 +88,9 @@
|
||||
|
@ -116,7 +116,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
}
|
||||
|
||||
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
|
||||
@@ -2136,15 +2141,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
@@ -2135,15 +2140,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -136,7 +136,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
|
||||
color_transform->Transform(&col, 1);
|
||||
color_f.fR = col.x();
|
||||
@@ -2366,7 +2372,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2365,7 +2371,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
: NON_PREMULTIPLIED_ALPHA,
|
||||
false, false, tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -146,7 +146,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2465,7 +2472,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2464,7 +2471,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -156,7 +156,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2575,7 +2583,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
@@ -2574,7 +2582,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
// The source color space should never be RGB.
|
||||
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
|
||||
|
||||
|
@ -166,7 +166,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
|
||||
#if defined(OS_WIN)
|
||||
// Force sRGB output on Windows for overlay candidate video quads to match
|
||||
@@ -2755,7 +2764,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
@@ -2754,7 +2763,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
|
||||
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -176,7 +176,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
|
||||
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
|
||||
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
|
||||
@@ -2826,8 +2836,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
@@ -2825,8 +2835,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
|
||||
|
||||
// Bind the program to the GL state.
|
||||
|
@ -187,7 +187,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
|
||||
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
@@ -3654,7 +3664,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
@@ -3653,7 +3663,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
const gfx::ColorSpace& src_color_space,
|
||||
const gfx::ColorSpace& dst_color_space,
|
||||
bool adjust_src_white_level) {
|
||||
|
@ -198,7 +198,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
gfx::ColorSpace adjusted_src_color_space = src_color_space;
|
||||
if (adjust_src_white_level) {
|
||||
// If the input color space is HDR, and it did not specify a white level,
|
||||
@@ -4034,9 +4046,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
@@ -4033,9 +4045,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
|
||||
gfx::SizeF((*overlay_texture)->texture.size()));
|
||||
|
||||
@@ -4256,8 +4268,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
@@ -4255,8 +4267,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
|
||||
PrepareGeometry(SHARED_BINDING);
|
||||
|
||||
|
@ -222,7 +222,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
|||
|
||||
gfx::Transform render_matrix;
|
||||
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
|
||||
@@ -4447,3 +4459,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
|
||||
@@ -4446,3 +4458,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
|
||||
GLRenderer::OverlayTexture::~OverlayTexture() = default;
|
||||
|
||||
} // namespace viz
|
||||
|
@ -241,10 +241,10 @@ index d5d68aa5a40b577d7d7b545cdc67f60e18acdf86..8ab5b75d7eee5f3e17b997abcd84f504
|
|||
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
|
||||
sandbox::policy::switches::kGpuSandboxFailuresFatal,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 3da3babcc13efc598faf17a4349dae73b908c380..9fd391a313f8fedeffc948201a5caf373ba3b12d 100644
|
||||
index 896630a5f595aa39265ceea68feb355454965ba0..3c7088341ace52d0efc5084b216beeee302ae922 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -220,6 +220,7 @@
|
||||
@@ -218,6 +218,7 @@
|
||||
#include "ui/accessibility/accessibility_switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "ui/display/display_switches.h"
|
||||
|
@ -252,7 +252,7 @@ index 3da3babcc13efc598faf17a4349dae73b908c380..9fd391a313f8fedeffc948201a5caf37
|
|||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3175,6 +3176,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3217,6 +3218,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
// Propagate the following switches to the renderer command line (along
|
||||
// with any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
|||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 30e1f5005e09cb1e23a7e86f35e6736bb5fa60f1..a832270eedd4a92d9cfb2beb07b2978c90250b94 100644
|
||||
index cd45e6c19505e553a4632dd478d33f3ee2cce0de..2090da2ac1a23a9847d0c3c14a7a2cc2c0ff2a55 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -478,7 +478,11 @@
|
||||
@@ -476,7 +476,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
|||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 3118dfdb4bc73664b0dc362b7f0506e750ece93d..603db59e5ef4f4dd07350fdeee883eb896966ecd 100644
|
||||
index 1b9b2c1ad23bd562b8c1895ceac220248dd70d01..d155e69df2abb9cec5f2153c7cb3c7b45cf46bbc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -722,6 +722,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -726,6 +726,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
|
@ -20,24 +20,24 @@ index 3118dfdb4bc73664b0dc362b7f0506e750ece93d..603db59e5ef4f4dd07350fdeee883eb8
|
|||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 3dd95dcf37cbc3b73b79b098524bf05666e1b9de..57cb297221c01994580e3a0f3546fbad3d5ba6f5 100644
|
||||
index a60325e9245af18665e34f56becc65f09fddee68..f179736afc6e675d8207bda025b4fbe1295c1bec 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -186,6 +186,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// RenderWidgetHostImpl.
|
||||
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
||||
@@ -835,6 +835,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
base::Optional<blink::VisualProperties> LastComputedVisualProperties() const;
|
||||
|
||||
+ // Electron: Prevents the widget from getting hidden.
|
||||
+ bool disable_hidden_ = false;
|
||||
+
|
||||
void set_new_content_rendering_delay_for_testing(
|
||||
const base::TimeDelta& delay) {
|
||||
new_content_rendering_delay_ = delay;
|
||||
protected:
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 70e2acf7cff6d5a08550c648330dc8a4b2a960a5..18ba6606b41c5394d70caa67685679decfcea5b5 100644
|
||||
index 3fa31e92b1f49f302cb91b10fd8d7489b7f7cda3..f35127f154754225015d6d8a56f4082f78bf8d3a 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -607,7 +607,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
DCHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
|
@ -45,4 +45,4 @@ index 70e2acf7cff6d5a08550c648330dc8a4b2a960a5..18ba6606b41c5394d70caa67685679de
|
|||
+ if (!host()->is_hidden() && !host()->disable_hidden_) {
|
||||
host()->WasHidden();
|
||||
aura::WindowTreeHost* host = window_->GetHost();
|
||||
if (delegated_frame_host_) {
|
||||
aura::Window* parent = window_->parent();
|
||||
|
|
|
@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
|
|||
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
|
||||
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 6d3138edd55c0522b7321e7ab8f2c8642142134d..e7df33b6e0a88377cc1b9ea1adc6385dd6646b5d 100644
|
||||
index e9fb8a1aff0702984e7cfc96086a7d8d07908cbb..6cde6699f0872e877667a6ed92f655fa447f2e49 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2685,7 +2685,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
|
||||
@@ -2686,7 +2686,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
|
||||
}
|
||||
|
||||
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
|
||||
|
|
|
@ -19,7 +19,7 @@ index a409755330351e7e1684c31f7c7cc6882a2dc7af..3349f38e1df8ff7e5c70f1c177b11914
|
|||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index dc2cdf7467912d36261583c91c8f46fbe041c5e0..a23108d0a38af3388b35bd5a0ae3cc3d5e565d93 100644
|
||||
index 53a7c6d03146994f9af9a503646e65b5c884ab23..7b0272b69132639f5074b82942c8de9729149dd5 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -919,8 +919,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
|
|
|
@ -21,10 +21,10 @@ index da2aeb2f2da84fe47d5cc7d721f8d3dade0c0972..4ddad9065782fad5927bc0481ad77201
|
|||
#endif
|
||||
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index af8c64e7daecb26a0915d811f4ed90192a869ff2..933c22c227f68eea97da01f23c4a3076f62d5530 100644
|
||||
index 71b0ec4a05dad38dfc21b12610797e94e3a4c500..269c21819a0c90949b091290c20bf719fdbdd66b 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -464,6 +464,10 @@ v8::PageAllocator* V8Platform::GetPageAllocator() {
|
||||
@@ -460,6 +460,10 @@ v8::PageAllocator* V8Platform::GetPageAllocator() {
|
||||
return g_page_allocator.Pointer();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
|
|||
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 36aa76157b9e8fee6835eb32e7ae8ff4aec7330f..3e78f4ba2f4d4135e24e7a51d8fb3eac93d22968 100644
|
||||
index 94992396b2cd4a017788bfdab6f944647b08bb8f..c575cd6d77f211b74f4a86d97ac6190a060e48fc 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1128,6 +1128,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1129,6 +1129,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
|
@ -51,10 +51,10 @@ index 36aa76157b9e8fee6835eb32e7ae8ff4aec7330f..3e78f4ba2f4d4135e24e7a51d8fb3eac
|
|||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 0c1b8bde497921c26347064023c3cf310a70b2a6..06615953d20408654e5e09298e52b1cf3bb0f379 100644
|
||||
index c1cd4a20995af72fd386702d7baeb7d804d0844f..6377ce9636f3e86579a4877e609b80fc5aab931b 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -250,6 +250,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -251,6 +251,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
|
@ -63,10 +63,10 @@ index 0c1b8bde497921c26347064023c3cf310a70b2a6..06615953d20408654e5e09298e52b1cf
|
|||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 1a2e862862e1f6db0b18441509553082d5b049d9..ac70e294f915f326095675d222f44519e2683ed0 100644
|
||||
index 620ed2a4752ded3cbe6a2ce66fce25433d64d8f6..fd0f46bfd8d5b7c803042635460cd3b87d2521dc 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1095,6 +1095,9 @@ interface NetworkContext {
|
||||
@@ -1097,6 +1097,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
@ -77,10 +77,10 @@ index 1a2e862862e1f6db0b18441509553082d5b049d9..ac70e294f915f326095675d222f44519
|
|||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index 799165ed898f55e9a00589fa8917e0ae9093672a..67c517fd1bc03826352d524f2953d229ea2d7177 100644
|
||||
index 3b1c2b43688f1789efeac418063e572e7a3d0626..97fa1e18fc1038e5fcd90dbf4ae4e5f76a7deda4 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -112,6 +112,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -113,6 +113,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
|
|
@ -26,7 +26,7 @@ index 6f9221b95d5609d6bc3395bd3a3c81670877fdd0..bd4cd7cf50ea7f8816b35b3150bea8c4
|
|||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index d254838cfb21ec2135691b84fd0432cbdbb92e24..f6a6e48ddd93ed1026cf216a59fa4a4d3d0b56d6 100644
|
||||
index 20943ab98c28b2689d3e4f548dba95ad0e40b2da..a9364d386d42315e1fca52e4eb316569d3c7a9e0 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -402,6 +402,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView
|
|||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 255c259a9b35d40a54fb18dc4b907e928277d102..ab640d81a6dc01e735bca52dab5465165d801013 100644
|
||||
index df522c390d930536a646d6a410ab98b8be0fa58d..a4a7bdfa597fa20695b515cc5b4fe8aff5bf252b 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -593,6 +593,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -597,6 +597,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,10 @@ index 255c259a9b35d40a54fb18dc4b907e928277d102..ab640d81a6dc01e735bca52dab546516
|
|||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index 650544041510cb45742e73ed9e392cce753c3808..6402cf9ce1ca7aa0c888f2bcedf8d8ef1b9f8f20 100644
|
||||
index df589265f13c811d6ade9cbc487a6e8ed6e67574..040de7d598e4a1c40a46a273f4144f4c220a7fcf 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -131,6 +131,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -133,6 +133,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
SiteInstanceImpl* GetSiteInstance() override;
|
||||
bool IsRenderViewLive() override;
|
||||
|
||||
|
@ -48,10 +48,10 @@ index 4c082605daf6841205f51789c1df329cc10ce57e..f450523c978c7603af4358fb928c6be7
|
|||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
|
||||
index c860de180ec0586f30019de936c62f16a7acc7cc..f7e0dd8335d4424bd09426ce6563477f7e8eba8c 100644
|
||||
index 56374d40d7fdb606dc00d76fbbe5b4d24cc247a9..9c966d711235dd8f041134108e33f03f7551e49a 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -235,6 +235,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
@@ -234,6 +234,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
static WindowOpenDisposition NavigationPolicyToDisposition(
|
||||
blink::WebNavigationPolicy policy);
|
||||
|
||||
|
@ -73,7 +73,7 @@ index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee889
|
|||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index fb648cda4e1aaa578cf271a60027e43b5d3a39d2..b567763c75832b742403356bb5deeaecbc5b6fe1 100644
|
||||
index e8212d4566666683d67590ef0fe11e452d71b6fc..b19500d4af881c795e84baff16e9973e0c259d2b 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -343,6 +343,7 @@ class WebView {
|
||||
|
@ -85,10 +85,10 @@ index fb648cda4e1aaa578cf271a60027e43b5d3a39d2..b567763c75832b742403356bb5deeaec
|
|||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 68688f094a68f9f29d7e8ec8d1158a0a4d7bb3f3..755d037d6f5046d4641b6532918125d1ca84cdd8 100644
|
||||
index 509a0dcc6620ead11ad91bafec7563c213492af2..1da5d311360171bbb8a5c5da50f6f9e676d8d13e 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3477,6 +3477,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3495,6 +3495,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ index 68688f094a68f9f29d7e8ec8d1158a0a4d7bb3f3..755d037d6f5046d4641b6532918125d1
|
|||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3487,7 +3494,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
@@ -3505,7 +3512,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
|
@ -113,10 +113,10 @@ index 68688f094a68f9f29d7e8ec8d1158a0a4d7bb3f3..755d037d6f5046d4641b6532918125d1
|
|||
|
||||
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 83a2e96325de2667036153e2fa9b3d0228ae3c37..b24fe240be02a013675cfb25be29560a3ff92792 100644
|
||||
index 40b74bd0b01e7271aa8d729777651f8ba79245d3..e9962f2dc5dccc510ab543e97dbf1c672c86a423 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -365,6 +365,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -363,6 +363,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
|
@ -124,7 +124,7 @@ index 83a2e96325de2667036153e2fa9b3d0228ae3c37..b24fe240be02a013675cfb25be29560a
|
|||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -760,11 +761,18 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -759,11 +760,18 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
SkColor background_color_override_ = Color::kTransparent;
|
||||
float zoom_factor_override_ = 0.f;
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
|
|||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index c66d791c7c9ade70473ba7f91056d403b10df24b..d1fb89d2ef0f81f2fbe37fabc8e466984d24280c 100644
|
||||
index 0f6a5a2fa3d82ae76889ef55af14e18b86cacffc..e33cd6305f53aa9287c61bf2d38848f878a14d30 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -119,6 +119,8 @@ viz_component("service") {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Fri, 14 Feb 2020 13:35:47 -0800
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Wed, 27 Jan 2021 15:24:44 -0800
|
||||
Subject: fix: route mouse event navigations through the web_contents delegate
|
||||
|
||||
This ensures that embedders can handle browser-side mouse navigations
|
||||
|
@ -13,22 +13,22 @@ This patch can be removed once app.allowRendererProcessReuse is forced
|
|||
to true as then Chromiums assumptions around processes become correct.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 3981c2caabd0362530c27e0dee572a56aaac0caf..81ecd2d06104aa125c95d40336e8192ec23a1206 100644
|
||||
index 2b81f39b61ad77bdf5382b15d3874532f017b93b..07b77b9eda090403d7d69e19085c2f574a18007f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2971,11 +2971,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -2960,11 +2960,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
WebContentsImpl* outermost = GetOutermostWebContents();
|
||||
if (event.button == blink::WebPointerProperties::Button::kBack &&
|
||||
outermost->controller_.CanGoBack()) {
|
||||
- outermost->controller_.GoBack();
|
||||
outermost->GetController().CanGoBack()) {
|
||||
- outermost->GetController().GoBack();
|
||||
+ if (delegate_->OnGoToEntryOffset(-1))
|
||||
+ outermost->controller_.GoBack();
|
||||
+ outermost->GetController().GoBack();
|
||||
return true;
|
||||
} else if (event.button == blink::WebPointerProperties::Button::kForward &&
|
||||
outermost->controller_.CanGoForward()) {
|
||||
- outermost->controller_.GoForward();
|
||||
outermost->GetController().CanGoForward()) {
|
||||
- outermost->GetController().GoForward();
|
||||
+ if (delegate_->OnGoToEntryOffset(1))
|
||||
+ outermost->controller_.GoForward();
|
||||
+ outermost->GetController().GoForward();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ as they will loaded as empty strings.
|
|||
* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows
|
||||
|
||||
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
index 3256f23502945b573b3e739e7916346867913bdf..0c72fa489b65a923637c2dc09a5c815940aeac29 100644
|
||||
index 33fd198d1c92ad20c5f6243bc64956a7d9488e1f..40e5444e48ad8a2b15bace12cf4a28165902ccc8 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -9,8 +9,7 @@
|
||||
|
|
|
@ -1,133 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Wed, 29 Jan 2020 12:28:48 -0800
|
||||
Subject: fix: use the new MediaPlayPause key listener for internal chrome
|
||||
logic
|
||||
|
||||
The new kGlobalRequiresAccessibility Scope type should be upstreamed
|
||||
and then we can use that and minimize this patch to just the change in
|
||||
global_shortcut_listener_mac.mm
|
||||
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
index bc009606d01469125052e68a9cdc82aaa697c764..ff18043cb07d748a49adea9874517fb29e3e7f9f 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
+#include "content/public/browser/media_keys_listener_manager.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
@@ -66,6 +67,22 @@ void GlobalShortcutListener::UnregisterAccelerator(
|
||||
StopListening();
|
||||
}
|
||||
|
||||
+// static
|
||||
+void GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(bool should_use) {
|
||||
+ if (content::MediaKeysListenerManager::
|
||||
+ IsMediaKeysListenerManagerEnabled()) {
|
||||
+ content::MediaKeysListenerManager* media_keys_listener_manager =
|
||||
+ content::MediaKeysListenerManager::GetInstance();
|
||||
+ DCHECK(media_keys_listener_manager);
|
||||
+
|
||||
+ if (should_use) {
|
||||
+ media_keys_listener_manager->EnableInternalMediaKeyHandling();
|
||||
+ } else {
|
||||
+ media_keys_listener_manager->DisableInternalMediaKeyHandling();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void GlobalShortcutListener::UnregisterAccelerators(Observer* observer) {
|
||||
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
if (IsShortcutHandlingSuspended())
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
index 9aec54a3263d24491d24013a80b719dfc834ecd4..001a6cb2a5eb701351fa924109b43fab6f30748d 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.h
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
@@ -31,6 +31,8 @@ class GlobalShortcutListener {
|
||||
|
||||
static GlobalShortcutListener* GetInstance();
|
||||
|
||||
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
|
||||
+
|
||||
// Register an observer for when a certain |accelerator| is struck. Returns
|
||||
// true if register successfully, or false if 1) the specificied |accelerator|
|
||||
// has been registered by another caller or other native applications, or
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/browser/extensions/global_shortcut_listener_mac.mm
|
||||
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
|
||||
@@ -39,7 +39,7 @@
|
||||
// global MediaKeysListener to receive media keys.
|
||||
if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) {
|
||||
media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
- this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
+ this, ui::MediaKeysListener::Scope::kGlobalRequiresAccessibility);
|
||||
DCHECK(media_keys_listener_);
|
||||
}
|
||||
}
|
||||
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
index 28dc8c8451940b18e74384aad10d4d9e886b31a3..f9e1854ed72cc5a9f2431df066eb72f5242569f1 100644
|
||||
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
@@ -177,8 +177,14 @@ void MediaKeysListenerManagerImpl::EnsureMediaKeysListener() {
|
||||
|
||||
EnsureAuxiliaryServices();
|
||||
|
||||
- media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
+ if (!media_key_handling_enabled_) {
|
||||
+ media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
+ this, ui::MediaKeysListener::Scope::kGlobalRequiresAccessibility);
|
||||
+ } else {
|
||||
+ media_keys_listener_ = ui::MediaKeysListener::Create(
|
||||
this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
+ }
|
||||
+
|
||||
DCHECK(media_keys_listener_);
|
||||
|
||||
media_keys_listener_->SetIsMediaPlaying(is_media_playing_);
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.h b/ui/base/accelerators/media_keys_listener.h
|
||||
index 6787fa39da18ec26c215e4cbe0b3f69093323f8c..ec10c46cde437a935edfdf79e5ba9622c6ba1d67 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.h
|
||||
+++ b/ui/base/accelerators/media_keys_listener.h
|
||||
@@ -20,8 +20,9 @@ class Accelerator;
|
||||
class COMPONENT_EXPORT(UI_BASE) MediaKeysListener {
|
||||
public:
|
||||
enum class Scope {
|
||||
- kGlobal, // Listener works whenever application in focus or not.
|
||||
- kFocused, // Listener only works whan application has focus.
|
||||
+ kGlobalRequiresAccessibility, // Listener works whenever application in focus or not but requires accessibility permissions on macOS
|
||||
+ kGlobal, // Listener works whenever application in focus or not but requires media to be playnig.
|
||||
+ kFocused, // Listener only works whan application has focus.
|
||||
};
|
||||
|
||||
// Media keys accelerators receiver.
|
||||
diff --git a/ui/base/accelerators/media_keys_listener_linux.cc b/ui/base/accelerators/media_keys_listener_linux.cc
|
||||
index c74807dfae799851bb2e40996e634d8513e590a0..48f459941cae385e49af09410bb1812db5e6d971 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener_linux.cc
|
||||
+++ b/ui/base/accelerators/media_keys_listener_linux.cc
|
||||
@@ -13,7 +13,7 @@ std::unique_ptr<MediaKeysListener> MediaKeysListener::Create(
|
||||
MediaKeysListener::Scope scope) {
|
||||
DCHECK(delegate);
|
||||
|
||||
- if (scope == Scope::kGlobal) {
|
||||
+ if (scope == Scope::kGlobal || scope == Scope::kGlobalRequiresAccessibility) {
|
||||
if (!SystemMediaControlsMediaKeysListener::has_instance()) {
|
||||
auto listener =
|
||||
std::make_unique<SystemMediaControlsMediaKeysListener>(delegate);
|
||||
diff --git a/ui/base/accelerators/media_keys_listener_win.cc b/ui/base/accelerators/media_keys_listener_win.cc
|
||||
index c50ea0ca2b8d612b96c0c822f5d36e9eb4ff861d..8b89fea7c09be007d8a020eb4d75f783c887f1a7 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener_win.cc
|
||||
+++ b/ui/base/accelerators/media_keys_listener_win.cc
|
||||
@@ -14,7 +14,7 @@ std::unique_ptr<MediaKeysListener> MediaKeysListener::Create(
|
||||
MediaKeysListener::Scope scope) {
|
||||
DCHECK(delegate);
|
||||
|
||||
- if (scope == Scope::kGlobal) {
|
||||
+ if (scope == Scope::kGlobal || scope == Scope::kGlobalRequiresAccessibility) {
|
||||
// We should never have more than one global media keys listener.
|
||||
if (!SystemMediaControlsMediaKeysListener::has_instance() &&
|
||||
!GlobalMediaKeysListenerWin::has_instance()) {
|
|
@ -42,10 +42,10 @@ index 65e627f2fa89352b0be27b5813d71a622bf1d326..113f4fd00f1cf994b39f64c9da387855
|
|||
// another SiteInstance for the same site.
|
||||
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 73a069bfa7e27c1cd8c5037237028d61d6c0716d..e5cf0906ed7e293665bddc991e40dad491eb61fa 100644
|
||||
index 95f300136a587d19316d6c91a1611a0afa6fa347..e09b590396a9c660079287459cd60e4d4f06ee99 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -1490,6 +1490,21 @@ void NavigationRequest::BeginNavigation() {
|
||||
@@ -1518,6 +1518,21 @@ void NavigationRequest::BeginNavigation() {
|
||||
if (IsSameDocument()) {
|
||||
render_frame_host_ = frame_tree_node_->current_frame_host();
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ index 73a069bfa7e27c1cd8c5037237028d61d6c0716d..e5cf0906ed7e293665bddc991e40dad4
|
|||
// Select an appropriate RenderFrameHost.
|
||||
std::string frame_host_choice_reason;
|
||||
render_frame_host_ =
|
||||
@@ -5338,6 +5353,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
@@ -5516,6 +5531,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
{WILL_START_REQUEST, {
|
||||
WILL_REDIRECT_REQUEST,
|
||||
WILL_PROCESS_RESPONSE,
|
||||
|
@ -75,7 +75,7 @@ index 73a069bfa7e27c1cd8c5037237028d61d6c0716d..e5cf0906ed7e293665bddc991e40dad4
|
|||
READY_TO_COMMIT,
|
||||
DID_COMMIT,
|
||||
CANCELING,
|
||||
@@ -5351,10 +5367,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
@@ -5529,10 +5545,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
WILL_FAIL_REQUEST,
|
||||
}},
|
||||
{WILL_PROCESS_RESPONSE, {
|
||||
|
@ -91,7 +91,7 @@ index 73a069bfa7e27c1cd8c5037237028d61d6c0716d..e5cf0906ed7e293665bddc991e40dad4
|
|||
NOT_STARTED,
|
||||
DID_COMMIT,
|
||||
diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h
|
||||
index 75a0258e27546237e1382083c0cc5fb2016e638c..a0b16ea67cd74f74058570a1ede64b305578bb09 100644
|
||||
index e29e67f5c91215a317d4244c7b62d89bea91a1fe..7ed0f9e6586b42b073d9dea8225baf3816516f5c 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.h
|
||||
+++ b/content/browser/renderer_host/navigation_request.h
|
||||
@@ -133,6 +133,10 @@ class CONTENT_EXPORT NavigationRequest
|
||||
|
@ -106,10 +106,10 @@ index 75a0258e27546237e1382083c0cc5fb2016e638c..a0b16ea67cd74f74058570a1ede64b30
|
|||
READY_TO_COMMIT,
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec381d331224 100644
|
||||
index 91f88109dacae55b8bb849e13d06309e89d028db..b57dbf3fb0aa6f9398cf09839d4208c5f055ee70 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -2703,6 +2703,16 @@ scoped_refptr<SiteInstance>
|
||||
@@ -2745,6 +2745,16 @@ scoped_refptr<SiteInstance>
|
||||
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
NavigationRequest* request,
|
||||
std::string* reason) {
|
||||
|
@ -126,7 +126,7 @@ index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec38
|
|||
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
|
||||
|
||||
// All children of MHTML documents must be MHTML documents. They all live in
|
||||
@@ -2730,10 +2740,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2772,10 +2782,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
//
|
||||
// TODO(clamy): We should also consider as a candidate SiteInstance the
|
||||
// speculative SiteInstance that was computed on redirects.
|
||||
|
@ -136,8 +136,7 @@ index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec38
|
|||
- : nullptr;
|
||||
+ if (!GetContentClient()->browser()->CanUseCustomSiteInstance() &&
|
||||
+ frame_tree_node_->IsMainFrame()) {
|
||||
+ BrowserContext* browser_context =
|
||||
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
|
||||
+ BrowserContext* browser_context = GetNavigationController().GetBrowserContext();
|
||||
+ bool has_navigation_started = request->state() != NavigationRequest::NOT_STARTED;
|
||||
+ bool has_response_started =
|
||||
+ (request->state() >= NavigationRequest::WILL_PROCESS_RESPONSE &&
|
||||
|
@ -191,7 +190,7 @@ index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec38
|
|||
|
||||
// Account for renderer-initiated reload as well.
|
||||
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
|
||||
@@ -2773,6 +2833,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2815,6 +2874,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
@ -202,10 +201,10 @@ index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec38
|
|||
}
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index 34f32197686fbb350a065cb2ce554a7b4ae917b5..7196c8a8b1be2d4e3496de2de1e8f62430696021 100644
|
||||
index 17ba2e76bc9b1e39c0b9e6e8938764c3096cfac4..9f36ec582037cb1b25fad95b1df5145c233f9b94 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -742,6 +742,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
|
||||
@@ -792,6 +792,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
|
||||
return browsing_instance_->HasSiteInstance(site_info);
|
||||
}
|
||||
|
||||
|
@ -217,10 +216,10 @@ index 34f32197686fbb350a065cb2ce554a7b4ae917b5..7196c8a8b1be2d4e3496de2de1e8f624
|
|||
const GURL& url) {
|
||||
return GetRelatedSiteInstanceImpl(
|
||||
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
|
||||
index 3dc0f0cf7f3e9b9e75cf053817e9ac5fba0182bc..16759a044e24ac3c0719a57e196fbf3e2975f1b9 100644
|
||||
index 1d79bf9261aad6e649a029257f7e6848cc34ad69..64cd5e188786ed60e474aeb1cabacd3d85069ae0 100644
|
||||
--- a/content/browser/site_instance_impl.h
|
||||
+++ b/content/browser/site_instance_impl.h
|
||||
@@ -321,6 +321,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
||||
@@ -323,6 +323,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
||||
BrowserContext* GetBrowserContext() override;
|
||||
const GURL& GetSiteURL() override;
|
||||
scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
|
||||
|
@ -229,10 +228,10 @@ index 3dc0f0cf7f3e9b9e75cf053817e9ac5fba0182bc..16759a044e24ac3c0719a57e196fbf3e
|
|||
size_t GetRelatedActiveContentsCount() override;
|
||||
bool RequiresDedicatedProcess() override;
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index e9e45bacdcc5ad09ac933ccaaa663e0d05a0ad33..780e3a085843a34e226838e24a3df0b62379e688 100644
|
||||
index e3088a155d552c87f009cec282f32730d9cb3655..d645a77362fad0033a256c2b946e8d6ce803c771 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -65,6 +65,21 @@
|
||||
@@ -66,6 +66,21 @@
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -255,10 +254,10 @@ index e9e45bacdcc5ad09ac933ccaaa663e0d05a0ad33..780e3a085843a34e226838e24a3df0b6
|
|||
const MainFunctionParams& parameters) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 133aef45c3187fac0e47e1538df3252de1fdfb8c..7c14448a06f64a685797c604564118c4a3c45f24 100644
|
||||
index ecd1d367a7634e377bffbe7590d2c21b49a56e93..84a0da56a65770f061728329b2a178533278aeec 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -255,8 +255,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -254,8 +254,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
using IsClipboardPasteAllowedCallback =
|
||||
base::OnceCallback<void(ClipboardPasteAllowed)>;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ index a8eb7190ddb87405e8d5b810c75d3fac6bab2120..689571089c3619f45d2f03df01f83bd7
|
|||
v8::Isolate* isolate() { return isolate_; }
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 3967c18d2b0b48bee6e095997ba65f59f6aa4dd6..25f492ec675b7de953f5e45d6f768be40b272c3a 100644
|
||||
index 2aba21ed3233460a660845b12ed7b88d33985dba..2b9e4956d8abb80f5cd44345816ed8af98d277f1 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -198,12 +198,14 @@ enum LoadV8FileResult {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
|||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 1343d7c03b07cb15416d353450a4b0f6937c4c4b..e199e5ad195c52943e81afc386dc9c7ba7e6f42d 100644
|
||||
index 91e764e8a85f041df9577d0212f9a62c65556e0d..6b4725f517593990b8b3baf6d6fe487b9926a571 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -696,6 +696,11 @@
|
||||
@@ -701,6 +701,11 @@
|
||||
"includes": [3880],
|
||||
},
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
|
|||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index f8693f150ace948f73a4201d4f0ae5efbaa99656..c92e46c5a2545990b68c1beed77620328ee3dc12 100644
|
||||
index e6348dc2ec5d57b9288380791ded9c978774e506..32decd4a731170d60e0fe633530bd1b9f95d348f 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -9,8 +9,8 @@
|
||||
|
|
|
@ -117,7 +117,7 @@ index 055d28d8c6f6cc6826db1f888b1ea0f535c3c716..1eedb217a700ffdc73d30c5daadf003d
|
|||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736bb5fa60f1 100644
|
||||
index e811980fc5798e668163adafce4e72a7188d94fe..cd45e6c19505e553a4632dd478d33f3ee2cce0de 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -234,8 +234,10 @@
|
||||
|
@ -131,7 +131,7 @@ index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736b
|
|||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1385,8 +1387,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1383,8 +1385,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
|
@ -142,7 +142,7 @@ index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736b
|
|||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1418,9 +1422,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1416,9 +1420,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
|
@ -154,7 +154,7 @@ index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736b
|
|||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -1907,12 +1913,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1905,12 +1911,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
|
@ -170,10 +170,10 @@ index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736b
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index dc5eedfa0d1194db18feb5bc2f418885163a795d..8e5af3ba8db08db55754b59a66231b07515655e3 100644
|
||||
index abb7355a2f5bf8475d902aafd153115d51b703cb..f0d596e4021b44f13ec399b1dcfbdd5a77a1971f 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -313,6 +313,13 @@ component("base") {
|
||||
@@ -312,6 +312,13 @@ component("base") {
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ index 33a689c23c72b1d18d0fceb595a4a45cf2790454..808eaf45096fbeb5d4bd62448c64078c
|
|||
// is concerned.
|
||||
@property(nonatomic, readonly) NSString* subrole;
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
index 3fb1c5954b704307724483c5e4c758b4b62e4f9b..f1f75aae285bbffc05e5598f411821a18ca47729 100644
|
||||
index b5940319ae17bfaf43daf18feb42722bf3705bdd..d997cfaa6275a570686d0c1703c30f21ca82a926 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -209,6 +209,7 @@
|
||||
|
@ -383,25 +383,26 @@ index 3fb1c5954b704307724483c5e4c758b4b62e4f9b..f1f75aae285bbffc05e5598f411821a1
|
|||
|
||||
- (id)accessibilityFocusedUIElement {
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
index 8f8e91c81897ef9fbd70ea5bdd07171c0f380e31..93bcc87244d41c6b72908ed31f83cdd629f6e69f 100644
|
||||
index d67fba3acaa02aaa6f5ee4a5004c378007b353a3..4b8b4e5e07d5e7c591903cf4a67c258cde9ce9e2 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
@@ -488,6 +488,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
[user_info setObject:native_focus_object
|
||||
forKey:ui::NSAccessibilityTextChangeElement];
|
||||
|
||||
@@ -484,7 +484,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
if (native_focus_object && [native_focus_object instanceActive]) {
|
||||
[user_info setObject:native_focus_object
|
||||
forKey:ui::NSAccessibilityTextChangeElement];
|
||||
-
|
||||
+#ifndef MAS_BUILD
|
||||
id selected_text = [native_focus_object selectedTextMarkerRange];
|
||||
if (selected_text) {
|
||||
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
||||
@@ -495,6 +496,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
[user_info setObject:selected_text
|
||||
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
||||
}
|
||||
+#endif
|
||||
id selected_text = [native_focus_object selectedTextMarkerRange];
|
||||
if (selected_text) {
|
||||
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
||||
@@ -492,6 +492,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
[user_info setObject:selected_text
|
||||
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
return user_info;
|
||||
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
index 894ac47e596c1c96a7e0659be80ed8a5629d0304..eca797a24df79b8502b9698e6ed8830ad1c5cb59 100644
|
||||
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
|
@ -473,10 +474,10 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5
|
|||
}
|
||||
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5d9910908 100644
|
||||
index b56737af6f4da7cc01f78430c53dfa5afd1bc6df..60cdaa18e55acfd5817d2689bdb5a0ec8c1318d7 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -42,6 +42,7 @@
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "device/bluetooth/bluetooth_socket_mac.h"
|
||||
#include "device/bluetooth/public/cpp/bluetooth_address.h"
|
||||
|
||||
|
@ -484,7 +485,7 @@ index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5
|
|||
extern "C" {
|
||||
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
|
||||
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
|
||||
@@ -55,6 +56,7 @@
|
||||
@@ -56,6 +57,7 @@
|
||||
// [4] https://support.apple.com/kb/PH25091
|
||||
void IOBluetoothPreferenceSetControllerPowerState(int state);
|
||||
}
|
||||
|
@ -492,7 +493,7 @@ index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5
|
|||
|
||||
namespace {
|
||||
|
||||
@@ -123,8 +125,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
@@ -124,8 +126,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
controller_state_function_(
|
||||
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
||||
base::Unretained(this))),
|
||||
|
@ -503,7 +504,7 @@ index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5
|
|||
classic_discovery_manager_(
|
||||
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
||||
low_energy_discovery_manager_(
|
||||
@@ -336,8 +340,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
@@ -356,8 +360,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
}
|
||||
|
||||
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
||||
|
@ -517,7 +518,7 @@ index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5
|
|||
|
||||
void BluetoothAdapterMac::RemovePairingDelegateInternal(
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index 21153d38f978f84fed54d9a904c7a30b9a072d56..0d23e05fe70c5b6f73f39bf3139c7456ba800a51 100644
|
||||
index 426d34399bdcb5494bc451fabd5c05fd901dce54..22d20a43f9717443a17056e4c3b561d63b469a0d 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -177,6 +177,12 @@ source_set("audio") {
|
||||
|
@ -547,10 +548,10 @@ index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022e
|
|||
}
|
||||
|
||||
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
|
||||
index b50f468c7666150ed501566d36ebe4e1fd32227f..f992753b2b3d514e836655e0aa81d00a61d8083d 100644
|
||||
index 3ab9e10949db76a31fdea78ba02945b7fdf73bf1..67d1808fc77fe4aa685b2a99a3df2fb999a28887 100644
|
||||
--- a/net/dns/dns_config_service_posix.cc
|
||||
+++ b/net/dns/dns_config_service_posix.cc
|
||||
@@ -232,8 +232,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
@@ -242,8 +242,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
|
||||
bool Watch() override {
|
||||
CheckOnCorrectSequence();
|
||||
|
@ -560,7 +561,7 @@ index b50f468c7666150ed501566d36ebe4e1fd32227f..f992753b2b3d514e836655e0aa81d00a
|
|||
if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged,
|
||||
base::Unretained(this)))) {
|
||||
LOG(ERROR) << "DNS config watch failed to start.";
|
||||
@@ -251,6 +251,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
@@ -261,6 +261,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
success = false;
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
|
||||
|
|
|
@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
|||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4aec7330f 100644
|
||||
index db667e13f2e4d9e96e9ac28f17c61412d6279ec7..94992396b2cd4a017788bfdab6f944647b08bb8f 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -118,6 +118,11 @@
|
||||
|
@ -116,7 +116,7 @@ index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4
|
|||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -1877,8 +1962,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1878,8 +1963,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
"NetworkContext should pass CertVerifierServiceRemoteParams.";
|
||||
|
||||
std::unique_ptr<net::CertVerifier> cert_verifier;
|
||||
|
@ -127,7 +127,7 @@ index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4
|
|||
} else {
|
||||
if (params_->cert_verifier_params &&
|
||||
params_->cert_verifier_params->is_remote_params()) {
|
||||
@@ -1906,7 +1992,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1907,7 +1993,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
cert_net_fetcher_ =
|
||||
base::MakeRefCounted<net::CertNetFetcherURLRequest>();
|
||||
|
||||
|
@ -136,7 +136,7 @@ index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4
|
|||
}
|
||||
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
@@ -1930,9 +2016,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1931,9 +2017,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
|
||||
// Whether the cert verifier is remote or in-process, we should wrap it in
|
||||
// caching and coalescing layers to avoid extra verifications and IPCs.
|
||||
|
@ -148,7 +148,7 @@ index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4
|
|||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
cert_verifier_with_trust_anchors_ =
|
||||
@@ -1944,10 +2030,24 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1945,10 +2031,24 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
@ -176,7 +176,7 @@ index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4
|
|||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
if (params_->enforce_chrome_ct_policy) {
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index b3c053ab425b923f1ae99d8d51f94acc58cfaa14..0c1b8bde497921c26347064023c3cf310a70b2a6 100644
|
||||
index 8c7a354d0e0deae7fab9990832b34c966b2e1e9f..c1cd4a20995af72fd386702d7baeb7d804d0844f 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -90,6 +90,7 @@ class DomainReliabilityMonitor;
|
||||
|
@ -196,7 +196,7 @@ index b3c053ab425b923f1ae99d8d51f94acc58cfaa14..0c1b8bde497921c26347064023c3cf31
|
|||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -698,6 +701,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -699,6 +702,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr;
|
||||
#endif
|
||||
|
||||
|
@ -206,7 +206,7 @@ index b3c053ab425b923f1ae99d8d51f94acc58cfaa14..0c1b8bde497921c26347064023c3cf31
|
|||
// CertNetFetcher is not used by the current platform, or if the actual
|
||||
// net::CertVerifier is instantiated outside of the network service.
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 294b04445bd375b2e0afa4a68ef5586d6a83c688..1a2e862862e1f6db0b18441509553082d5b049d9 100644
|
||||
index 9b0c830f36ae7de9987c0c27ad9fafce31d146e7..620ed2a4752ded3cbe6a2ce66fce25433d64d8f6 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -228,6 +228,17 @@ struct CTPolicy {
|
||||
|
@ -227,7 +227,7 @@ index 294b04445bd375b2e0afa4a68ef5586d6a83c688..1a2e862862e1f6db0b18441509553082
|
|||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -889,6 +900,9 @@ interface NetworkContext {
|
||||
@@ -884,6 +895,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ Do not check for unique origin in CacheStorage, in Electron we may have
|
|||
scripts running without an origin.
|
||||
|
||||
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
index 5e85bd8335d46b743700248241d059fed8924ec8..24e26ac4364818249e7ab29a08f5f73301ae190e 100644
|
||||
index 9a2b73ae09ae1f2fe5379905c48679668ec8447f..d7f29d25110c2242a6c92ed5d0b397b3c6b56460 100644
|
||||
--- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
@@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
@@ -108,7 +108,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
cache_storage_(cache_storage),
|
||||
origin_(origin),
|
||||
owner_(owner) {
|
||||
|
|
|
@ -108,10 +108,10 @@ index f9b6a18aa73968506ddeca13de69b368f4ca8606..d45cb1c32be1b5c76840dafcd96fd06c
|
|||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 6eb6699bad25f92bbcd2267d5cd9f92acdf8e5ca..7662384242619d32f5133757674fddae40615873 100644
|
||||
index c31df2f900b6b3b58a1c6c803908bfd6d7adae17..8212fbd81dfd5a513a25aae31b6173b88e278d08 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2091,7 +2091,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2162,7 +2162,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
|
|
@ -102,21 +102,23 @@ index 47a5b3c2a11ec595ff926df10f856ed3c5375c55..38769ab454b143a1f50d1291a363092c
|
|||
}
|
||||
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5ea5ae56b7 100644
|
||||
index ce47c91c4c0908ce01c6227ae30ee230f64e86cc..3bd261c89d3138d59bd40a86967d1f7f39c23adc 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -29,10 +29,7 @@
|
||||
@@ -28,10 +28,10 @@
|
||||
#include "chrome/browser/printing/print_view_manager_common.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
-#include "chrome/browser/ui/simple_message_box.h"
|
||||
-#include "chrome/browser/ui/webui/print_preview/printer_handler.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
+#if 0
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
+#endif
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/printing/browser/print_composite_client.h"
|
||||
@@ -49,6 +46,7 @@
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
@ -124,7 +126,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/metafile_skia.h"
|
||||
@@ -78,6 +76,8 @@ using PrintSettingsCallback =
|
||||
@@ -75,6 +76,8 @@ using PrintSettingsCallback =
|
||||
base::OnceCallback<void(std::unique_ptr<PrinterQuery>)>;
|
||||
|
||||
void ShowWarningMessageBox(const base::string16& message) {
|
||||
|
@ -133,7 +135,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
// Runs always on the UI thread.
|
||||
static bool is_dialog_shown = false;
|
||||
if (is_dialog_shown)
|
||||
@@ -86,6 +86,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
@@ -83,6 +86,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
|
||||
|
||||
chrome::ShowWarningMessageBox(nullptr, base::string16(), message);
|
||||
|
@ -141,7 +143,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -223,7 +224,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
@@ -220,7 +224,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
DCHECK(printer_query);
|
||||
auto params = mojom::PrintPagesParams::New();
|
||||
params->params = mojom::PrintParams::New();
|
||||
|
@ -152,7 +154,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
@@ -346,12 +349,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -343,12 +349,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
|
@ -167,7 +169,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -359,7 +364,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -356,7 +364,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
|
@ -179,7 +181,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
DisconnectFromCurrentPrintJob();
|
||||
|
||||
// Don't print / print preview crashed tabs.
|
||||
@@ -367,7 +375,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -364,7 +375,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
return false;
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
|
@ -195,7 +197,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -488,9 +503,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
@@ -485,9 +503,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
// The Unretained() is safe because ForEachFrame() is synchronous.
|
||||
|
@ -208,7 +210,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -607,12 +622,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -604,12 +622,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -223,7 +225,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
content::RenderFrameHost* render_frame_host =
|
||||
print_manager_host_receivers_.GetCurrentTargetFrame();
|
||||
|
||||
@@ -628,11 +644,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -625,11 +644,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -237,7 +239,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
if (!job_settings.FindIntKey(kSettingPrinterType)) {
|
||||
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
|
||||
return;
|
||||
@@ -671,7 +688,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
@@ -668,7 +688,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
PrintManager::PrintingFailed(cookie);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
@ -246,7 +248,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -683,6 +700,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
@@ -680,6 +700,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
|
@ -258,7 +260,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -752,9 +774,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
@@ -749,9 +774,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
content::NotificationService::NoDetails());
|
||||
break;
|
||||
}
|
||||
|
@ -274,7 +276,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
@@ -852,8 +878,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -849,8 +878,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
DCHECK(!quit_inner_loop_);
|
||||
DCHECK(query);
|
||||
|
||||
|
@ -287,8 +289,8 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents()->GetMainFrame()->GetRenderViewHost() ||
|
||||
@@ -877,8 +905,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
print_job_->SetSource(source, /*source_id=*/"");
|
||||
@@ -871,8 +902,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
/*source_id=*/"");
|
||||
#endif
|
||||
|
||||
- registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
|
@ -296,7 +298,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
printing_succeeded_ = false;
|
||||
return true;
|
||||
}
|
||||
@@ -927,14 +953,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -921,14 +950,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
content::RenderFrameHost* rfh = printing_rfh_;
|
||||
printing_rfh_ = nullptr;
|
||||
|
||||
|
@ -321,7 +323,7 @@ index ae1ab34986d15dcdb3e8db484e7b3cc9d8a2e4ab..7c20cf3c06bca2191be035ac9171ce5e
|
|||
// Don't close the worker thread.
|
||||
print_job_ = nullptr;
|
||||
}
|
||||
@@ -970,7 +1004,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -964,7 +1001,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -372,10 +374,10 @@ index 93103940036ece118c511703c20c659d73724202..fcbf4c69d1b6cd30124444158e3f2c6d
|
|||
// This means we are _blocking_ until all the necessary pages have been
|
||||
// rendered or the print settings are being loaded.
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index dfbaf97a1c3d73d324095f46a4ea73d68d5188cc..d5fd684fe8cef92ec0432143d284ff0cc825694d 100644
|
||||
index 4fde003f2a12794bfcd479ef2797cc6281c5720b..bc3bc4aee26f9373de35366ddb07f7bac67b6db6 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -246,7 +246,7 @@ interface PrintPreviewUI {
|
||||
@@ -271,7 +271,7 @@ interface PrintPreviewUI {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
|
@ -385,18 +387,18 @@ index dfbaf97a1c3d73d324095f46a4ea73d68d5188cc..d5fd684fe8cef92ec0432143d284ff0c
|
|||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page using the print preview document's frame/node, and then
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4265cf027 100644
|
||||
index bf5d2e30dbf6e01d435f523aefa36492b6e669b9..3ac6b4e60f25734e6e01abccf7227b7cd37ae420 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/metafile_skia.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
+#include "printing/print_settings.h"
|
||||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
@@ -1174,7 +1175,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1166,7 +1167,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
|
@ -406,7 +408,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
|
||||
if (weak_this)
|
||||
web_frame->DispatchAfterPrintEvent();
|
||||
@@ -1201,7 +1203,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1193,7 +1195,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
|
@ -415,7 +417,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1216,7 +1218,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1208,7 +1210,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
|
@ -424,7 +426,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
|
||||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
@@ -1235,7 +1237,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1227,7 +1229,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
|
@ -434,7 +436,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
if (!render_frame_gone_)
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1283,6 +1286,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
@@ -1275,6 +1278,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
|
||||
|
@ -443,7 +445,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
if (print_preview_context_.IsForArc()) {
|
||||
@@ -1819,7 +1824,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1809,7 +1814,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
|
@ -453,7 +455,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -1834,7 +1840,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1824,7 +1830,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -464,7 +466,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -1842,7 +1850,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1832,7 +1840,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
|
@ -473,7 +475,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -1861,8 +1869,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1851,8 +1859,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -516,7 +518,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2109,7 +2150,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2096,7 +2137,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,7 +529,7 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
mojom::PrintPagesParams settings;
|
||||
settings.params = mojom::PrintParams::New();
|
||||
GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
|
||||
@@ -2133,12 +2176,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
@@ -2120,12 +2163,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -546,8 +548,28 @@ index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4
|
|||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2469,18 +2514,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::CheckForCancel() {
|
||||
- const mojom::PrintParams& print_params = *print_pages_params_->params;
|
||||
- bool cancel = false;
|
||||
-
|
||||
- if (!GetPrintManagerHost()->CheckForCancel(print_params.preview_ui_id,
|
||||
- print_params.preview_request_id,
|
||||
- &cancel)) {
|
||||
- cancel = true;
|
||||
- }
|
||||
-
|
||||
- if (cancel)
|
||||
- notify_browser_of_print_failure_ = false;
|
||||
- return cancel;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::PreviewPageRendered(
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index 502fa982439553adf01d9c3b517b3facecefb8b7..f90f6603216b199910132f13a7b6f6d9583bd471 100644
|
||||
index 5b042a088a2f82fed1d48b05b7b2509343fecca1..983cff70dc991adb330e083ff1c35c8c63a58a37 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -231,7 +231,7 @@ class PrintRenderFrameHelper
|
||||
|
|
|
@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
|||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc
|
||||
index 6a864ebf186ee22b5a3495562f25f473e51fece0..50c2c58fe6ce0bb3ab14f3dc80b4b2f90eedf8ac 100644
|
||||
index 29ad448b1572856216b42d4f4737d844850b2ebb..5902d81f29984eb05a7c5324ab709e97e3b87557 100644
|
||||
--- a/ui/gtk/native_theme_gtk.cc
|
||||
+++ b/ui/gtk/native_theme_gtk.cc
|
||||
@@ -356,6 +356,29 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
@@ -357,6 +357,29 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
case ui::NativeTheme::kColorId_TableHeaderSeparator:
|
||||
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `
|
|||
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
index f3875c216b5f4169a3beb9ae3aeb73c9f4df23f1..5e471024655e1b9ee224ed8ba7fc416e8be10aaa 100644
|
||||
index bd204e18eb16517c9f008f15fb530bd1b46af203..83267d1da9caf2b83799af46a6089683ede5ee1e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
@@ -14,6 +14,7 @@
|
||||
|
@ -30,10 +30,10 @@ index f3875c216b5f4169a3beb9ae3aeb73c9f4df23f1..5e471024655e1b9ee224ed8ba7fc416e
|
|||
// RenderWidgetHost on the main frame, and false otherwise.
|
||||
virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 603db59e5ef4f4dd07350fdeee883eb896966ecd..8f61a9677e5f5b6278c989c4929656130e7aa2b6 100644
|
||||
index d155e69df2abb9cec5f2153c7cb3c7b45cf46bbc..037a25e8f59b76181423e27865f0d4768da672b0 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1912,6 +1912,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -1920,6 +1920,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(WebCursor(cursor));
|
||||
|
@ -43,27 +43,26 @@ index 603db59e5ef4f4dd07350fdeee883eb896966ecd..8f61a9677e5f5b6278c989c492965613
|
|||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 3ea1b844a80f85da1d4e3c47d0a33d0e9eeb02ef..d20ce60c04007a83e412defbf525a756788bd0cc 100644
|
||||
index d72a6ca4307a71d0f9dc8a8b4ce32e1dce305148..39ef587971d4c171fb5878efb7a94c3523b4b80c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4119,6 +4119,12 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4087,6 +4087,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
+void WebContentsImpl::OnCursorChanged(const WebCursor& cursor) {
|
||||
+ observers_.ForEachObserver([&](WebContentsObserver* observer) {
|
||||
+ observer->OnCursorChanged(cursor);
|
||||
+ });
|
||||
+ observers_.NotifyObservers(&WebContentsObserver::OnCursorChanged,
|
||||
+ cursor);
|
||||
+}
|
||||
+
|
||||
bool WebContentsImpl::IsWidgetForMainFrame(
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 4b09bb93269a9c9d25824992660c3613119ad3d4..90d4919d793b99f73a9bad85fbb0b41b380e8845 100644
|
||||
index a603ad8d4ff72be85f07746dc2790df66f18122b..f9ef4e3a7f7c4447cd9503954c512ce3f679c639 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -968,6 +968,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
blink::mojom::FrameVisibility visibility) override;
|
||||
void SendScreenRects() override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
|
|||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 7a90002e09be6f9e440d509cf437a7974b5eea64..44a06fe37b0a58a7ba5347a8ceca8aa2cbe13e31 100644
|
||||
index 463690a6dfdab2c7ffd3ec35a751fecbf25c74c7..7b61cd4714a09d7ba1955d690251bc52b76c71b3 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -567,6 +567,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
|
@ -24,7 +24,7 @@ index 7a90002e09be6f9e440d509cf437a7974b5eea64..44a06fe37b0a58a7ba5347a8ceca8aa2
|
|||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 63c4db6df041a5861aa9af201bdc15c2b06be809..d418e0549a9d7ee28a91eddc50e9dfc17be0d365 100644
|
||||
index be9de2cbeb28fd75e6d9ee4d42eb59a3dac8e9b7..5d3edd2c131c4615dc22ae361f130469620d7175 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -25,8 +25,10 @@
|
||||
|
@ -60,7 +60,7 @@ index 63c4db6df041a5861aa9af201bdc15c2b06be809..d418e0549a9d7ee28a91eddc50e9dfc1
|
|||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
gfx::PointF TransformPointToRootCoordSpaceF(
|
||||
@@ -280,6 +287,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
@@ -282,6 +289,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
|||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de33c4a032 100644
|
||||
index fe292660023d2944a83eb672fd50f57212e5df3d..f33a7cf57b5b734a1f195935a5477d5ca8ba9611 100644
|
||||
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
@ -29,7 +29,7 @@ index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de
|
|||
// These are not documented, so use only after checking -respondsToSelector:.
|
||||
@interface NSApplication (UndocumentedSpeechMethods)
|
||||
- (void)speakString:(NSString*)string;
|
||||
@@ -572,6 +581,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
@@ -571,6 +580,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@ -39,7 +39,7 @@ index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de
|
|||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -647,6 +659,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
@@ -646,6 +658,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
// its parent view.
|
||||
BOOL hitSelf = NO;
|
||||
while (view) {
|
||||
|
@ -50,7 +50,7 @@ index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de
|
|||
if (view == self)
|
||||
hitSelf = YES;
|
||||
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
|
||||
@@ -995,6 +1011,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
@@ -994,6 +1010,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
eventType == NSKeyDown &&
|
||||
!(modifierFlags & NSCommandKeyMask);
|
||||
|
||||
|
@ -61,7 +61,7 @@ index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de
|
|||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1723,9 +1743,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -1722,9 +1742,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
|
@ -73,7 +73,7 @@ index b5cbdfa71c977c728d14361b140097c080737ca9..2bc27fd364205239e5e709888fe8e3de
|
|||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1734,7 +1756,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
@@ -1733,7 +1755,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
|
|
@ -52,10 +52,10 @@ Some alternatives to this patch:
|
|||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 5eeb0d0c2598bbcff4981dcb6f43cae82ec37c99..f2d498b5fa6811acf62996b9b048aed5210ce8bb 100644
|
||||
index fa57158747bffc85a8f15b22af56012a91d89edb..4f9c74142fdcb04e10591422f1c1a529851cb327 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1416,7 +1416,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1422,7 +1422,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ index 5eeb0d0c2598bbcff4981dcb6f43cae82ec37c99..f2d498b5fa6811acf62996b9b048aed5
|
|||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1436,6 +1436,12 @@ if (!is_android) {
|
||||
@@ -1442,6 +1442,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
|
|||
are required to be NAPI or context aware (Electron v11), this patch can be removed.
|
||||
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
index e72dd633107c2a4841d814e5b1dffd8f275fbaab..19561f1c30f9610edccb2d15e456eae00a7fdd34 100644
|
||||
index 4f53d65a88a1afd030ae2afcb418022007e5cdcf..6bf0c4df4219fbb492a38dd0421c38d276cff497 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -1280,6 +1280,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
|
||||
@@ -1258,6 +1258,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -92,10 +92,10 @@ index 357df68c64071ef7dca98ce4aab885dd936b1c49..f501a2ab0bd6d4664dad13913671c4d7
|
|||
// |url|. If the function returns a valid |new_url|, the request must be
|
||||
// updated to use it.
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 2548f5fcb9872486b69de478ce9f5bb1fe14763c..6d3138edd55c0522b7321e7ab8f2c8642142134d 100644
|
||||
index 74f4881d51e671e178f8d4ff32a49b0010e9efb2..e9fb8a1aff0702984e7cfc96086a7d8d07908cbb 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -5438,6 +5438,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
@@ -5432,6 +5432,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
// we can do a per-frame check here rather than a process-wide check.
|
||||
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
|
||||
(enabled_bindings_ & kWebUIBindingsPolicyMask);
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
|||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 77b13bd51e1d9b51d40096b9c57c0d66486ec287..a54626a53de9ef005c8c0c43c0ab5a4bced5d9ae 100644
|
||||
index 482b84f3d92515ee0edf495625b765a8d7023992..1a63b709316df222300529f47dfb0aff44cbfb6c 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1294,7 +1294,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1277,7 +1277,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch
|
|||
Allows populating security tab info for devtools in Electron.
|
||||
|
||||
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
index c11f6e1ccb92aebad9bc3c50b7cecf9306ae815a..c89ddc95ffe595ec310f316b796eeea88f5f4e2c 100644
|
||||
index 70491781c7c97a86a3469b3a6954b579156f164d..813ebf8fc088822e7d17d0fbe4aeb7538e1a7cf7 100644
|
||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
|
|
|
@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
|||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 7662384242619d32f5133757674fddae40615873..3da3babcc13efc598faf17a4349dae73b908c380 100644
|
||||
index 8212fbd81dfd5a513a25aae31b6173b88e278d08..896630a5f595aa39265ceea68feb355454965ba0 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -401,6 +401,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -405,6 +405,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ index 7662384242619d32f5133757674fddae40615873..3da3babcc13efc598faf17a4349dae73
|
|||
~RendererSandboxedProcessLauncherDelegate() override = default;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -422,6 +427,9 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -427,6 +432,9 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
|
||||
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
|
||||
ZygoteHandle GetZygote() override {
|
||||
|
@ -47,7 +47,7 @@ index 7662384242619d32f5133757674fddae40615873..3da3babcc13efc598faf17a4349dae73
|
|||
const base::CommandLine& browser_command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
base::CommandLine::StringType renderer_prefix =
|
||||
@@ -436,10 +444,13 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -441,10 +449,13 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
return sandbox::policy::SandboxType::kRenderer;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ index 7662384242619d32f5133757674fddae40615873..3da3babcc13efc598faf17a4349dae73
|
|||
};
|
||||
|
||||
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
|
||||
@@ -1816,11 +1827,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1900,11 +1911,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
cmd_line->PrependWrapper(renderer_prefix);
|
||||
AppendRendererCommandLine(cmd_line.get());
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: ui_gtk_public_header.patch
|
|||
Allow electron to depend on //ui/gtk/gtk_util.h
|
||||
|
||||
diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn
|
||||
index bf6b7eef0bd567ffe39eba82bf09ca5b1c3884b6..05057d9d5b692d565c0026b9cea21e7d0cda6391 100644
|
||||
index 3ca7f064f627e5076c12cd79c56991e351cea6b1..7530f279b9d81ce3196a49d10e34c317a8a030fd 100644
|
||||
--- a/ui/gtk/BUILD.gn
|
||||
+++ b/ui/gtk/BUILD.gn
|
||||
@@ -23,13 +23,15 @@ component("gtk_ui_delegate") {
|
||||
@@ -31,13 +31,15 @@ component("gtk_ui_delegate") {
|
||||
}
|
||||
|
||||
component("gtk") {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 10 Apr 2020 15:14:49 -0700
|
||||
Date: Wed, 27 Jan 2021 15:11:19 -0800
|
||||
Subject: web_contents.patch
|
||||
|
||||
This allows overriding the RenderViewHostDelegateView of a WebContents, which
|
||||
|
@ -9,12 +9,12 @@ is needed for OSR.
|
|||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 81ecd2d06104aa125c95d40336e8192ec23a1206..3ea1b844a80f85da1d4e3c47d0a33d0e9eeb02ef 100644
|
||||
index 14f3ebdc6fe53f8e4a9b3d6ec8d7a8875a20c392..2b81f39b61ad77bdf5382b15d3874532f017b93b 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2725,6 +2725,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
@@ -2708,6 +2708,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
|
||||
params.main_frame_name);
|
||||
|
||||
+ if (params.view && params.delegate_view) {
|
||||
+ view_.reset(params.view);
|
||||
|
@ -25,19 +25,19 @@ index 81ecd2d06104aa125c95d40336e8192ec23a1206..3ea1b844a80f85da1d4e3c47d0a33d0e
|
|||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -2735,6 +2741,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2718,6 +2724,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
view_.reset(CreateWebContentsView(this, delegate,
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
+ } // !view_
|
||||
+ } // !view_
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 05efddc8d80fad9be7f4276d51a80ab0b747e484..c558236eb621ae6a67468afaa1b8431b9857a35f 100644
|
||||
index 53df8356eab8406962df12b8d047ea30007ba359..d35204c145a9ce5ddceaea86870fafcac3e76f8a 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -87,8 +87,11 @@ class BrowserContext;
|
||||
@@ -88,8 +88,11 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
|
@ -47,8 +47,8 @@ index 05efddc8d80fad9be7f4276d51a80ab0b747e484..c558236eb621ae6a67468afaa1b8431b
|
|||
class WebContentsDelegate;
|
||||
+class WebContentsView;
|
||||
class WebUI;
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -222,6 +225,10 @@ class WebContents : public PageNavigator,
|
||||
// Sandboxing flags set on the new WebContents.
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags;
|
||||
|
|
|
@ -26,10 +26,10 @@ index a4695ba832fc5ae6f458baf38bbf7efa95dc610e..357df68c64071ef7dca98ce4aab885dd
|
|||
// An empty URL is returned if the URL is not overriden.
|
||||
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index d21f7e95c856853116b317bc76dac6750037c941..6f8d94872d0419da5907d4cf3617c9a1582cc11f 100644
|
||||
index 4964d3567530153ad672b5f42d89547a406084f6..86d0bee87e7f6cb20214c609a3f95a2878d3640b 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -898,6 +898,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -899,6 +899,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ index f501a2ab0bd6d4664dad13913671c4d7d5a96c1e..e633d1755405feeae8c45c0bcbf90f67
|
|||
// from the worker thread.
|
||||
virtual void WillDestroyWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 6f8d94872d0419da5907d4cf3617c9a1582cc11f..9f24498f35719aca325bb7a34c7141408812370e 100644
|
||||
index 86d0bee87e7f6cb20214c609a3f95a2878d3640b..0f3b8a3ed43a04f1fd9d69b2a08cdaca7b8c5df2 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -910,6 +910,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
@@ -911,6 +911,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
worker);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ dcheck.patch
|
|||
export_symbols_needed_for_windows_build.patch
|
||||
workaround_an_undefined_symbol_error.patch
|
||||
do_not_export_private_v8_symbols_on_windows.patch
|
||||
revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch
|
||||
fix_build_deprecated_attirbute_for_older_msvc_versions.patch
|
||||
chore_disallow_copying_cppheapcreateparams.patch
|
||||
mac_wasm_work_around_macos_11_2_code_page_decommit_failures.patch
|
||||
|
|
|
@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
|
|||
Realloc on the v8 side.
|
||||
|
||||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 439613c3c9b003ad7a94bfeed8cae184c2677c5a..5b6ba7f444994c5e8a5079f9f399a15d4a34ff24 100644
|
||||
index f292758e8f93d9b00eefe0d80b7891ffec96777b..f98795e3e211875a0930f3ffec8405af9c8bc535 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -5275,6 +5275,13 @@ class V8_EXPORT ArrayBuffer : public Object {
|
||||
@@ -5296,6 +5296,13 @@ class V8_EXPORT ArrayBuffer : public Object {
|
||||
*/
|
||||
virtual void* AllocateUninitialized(size_t length) = 0;
|
||||
|
||||
|
@ -30,10 +30,10 @@ index 439613c3c9b003ad7a94bfeed8cae184c2677c5a..5b6ba7f444994c5e8a5079f9f399a15d
|
|||
* Free the memory block of size |length|, pointed to by |data|.
|
||||
* That memory is guaranteed to be previously allocated by |Allocate|.
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index bace7f4fbd0d37244aa890eff00b9726775c419e..e405464fec98fbee0e6dbc35b7fc655c7cbc2dc6 100644
|
||||
index 3656bc689df8516283717db1165d4f4c01b4f1bf..f8c1dc45f36b87c3cf1339cec2528e267113e0b7 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -545,6 +545,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
|
||||
@@ -547,6 +547,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
|
||||
i::V8::SetSnapshotBlob(snapshot_blob);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ necessary for native modules to load.
|
|||
Also, some fixes relating to mksnapshot on ARM.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 98ebd461469ef911b38a09dbc01c1823ff8adab9..a7c96aad93b5aee8d8a4cccbc81d140d6315b203 100644
|
||||
index 0c7841f6bf68d4836a6798c3bce4f70c903f04c6..8c6b1a5c0c6f86dd5e9d332d90811ad459cbae81 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -432,7 +432,7 @@ config("internal_config") {
|
||||
@@ -435,7 +435,7 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
@ -21,7 +21,7 @@ index 98ebd461469ef911b38a09dbc01c1823ff8adab9..a7c96aad93b5aee8d8a4cccbc81d140d
|
|||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
}
|
||||
@@ -4668,7 +4668,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -4785,7 +4785,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 98ebd461469ef911b38a09dbc01c1823ff8adab9..a7c96aad93b5aee8d8a4cccbc81d140d
|
|||
|
||||
deps = [
|
||||
":v8_libbase",
|
||||
@@ -4705,6 +4705,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
@@ -4822,6 +4822,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ implicitly deletes its copy ctor, so this commit makes it explicit.
|
|||
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2536642
|
||||
|
||||
diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h
|
||||
index 8a0d9cb9a0737e1642d666754926485b06136e98..31cb7545a37911f64597476eb4c4eb40da178c3f 100644
|
||||
index 33e06f4495979eab3fa1e0ac7af3e0b306254446..08e63751fcd2fe590299b0708b19e9c741bd3e40 100644
|
||||
--- a/include/v8-cppgc.h
|
||||
+++ b/include/v8-cppgc.h
|
||||
@@ -25,8 +25,13 @@ namespace internal {
|
||||
|
@ -30,7 +30,7 @@ index 8a0d9cb9a0737e1642d666754926485b06136e98..31cb7545a37911f64597476eb4c4eb40
|
|||
|
||||
/**
|
||||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 5b6ba7f444994c5e8a5079f9f399a15d4a34ff24..142684417bca56f6e9304594c9c3a2d51656ee26 100644
|
||||
index f98795e3e211875a0930f3ffec8405af9c8bc535..afa10ecb6b19e97ff7dc4848610611294cd26588 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -93,7 +93,7 @@ class Utils;
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: dcheck.patch
|
|||
https://github.com/auchenberg/volkswagen
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index e405464fec98fbee0e6dbc35b7fc655c7cbc2dc6..f38621c55f7f4b9d0c6e19fcc185abfd92007a93 100644
|
||||
index f8c1dc45f36b87c3cf1339cec2528e267113e0b7..a2d7272f7da99dbe20c0be24a017ced7729d25d9 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -9005,7 +9005,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
@@ -9025,7 +9025,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
}
|
||||
|
||||
void Isolate::PerformMicrotaskCheckpoint() {
|
||||
|
@ -19,10 +19,10 @@ index e405464fec98fbee0e6dbc35b7fc655c7cbc2dc6..f38621c55f7f4b9d0c6e19fcc185abfd
|
|||
isolate->default_microtask_queue()->PerformCheckpoint(this);
|
||||
}
|
||||
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
||||
index 235d17615d5388b5c6b74ffe3780a9a05c0497b1..eb0231b719e7a0325500d3f2074e1e9782e7c4a4 100644
|
||||
index 86049c4890848af9b0aae04b4656175ef6a62385..9e20eecf4839ff5638833cf2161a821939308a29 100644
|
||||
--- a/src/heap/heap.cc
|
||||
+++ b/src/heap/heap.cc
|
||||
@@ -5553,9 +5553,9 @@ void Heap::TearDown() {
|
||||
@@ -5544,9 +5544,9 @@ void Heap::TearDown() {
|
||||
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
|
||||
GCType gc_type, void* data) {
|
||||
DCHECK_NOT_NULL(callback);
|
||||
|
|
|
@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
|
|||
contain any standard C++ library exports (e.g. `std::ostringstream`).
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 909bf7b26806efeb8258ec5832cf79bbaf312813..ffeae5047a86b3d46b5994830af011010bdd0dc9 100644
|
||||
index 5b2a7b672f7360e4edf028c868a3cc7ffb4d2784..83a404d1adfe962fb258d555be278ff21bb1ce92 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -432,6 +432,10 @@ config("internal_config") {
|
||||
@@ -435,6 +435,10 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
|
|||
Needed in order to target mksnapshot for mksnapshot zip.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index a7c96aad93b5aee8d8a4cccbc81d140d6315b203..909bf7b26806efeb8258ec5832cf79bbaf312813 100644
|
||||
index 8c6b1a5c0c6f86dd5e9d332d90811ad459cbae81..5b2a7b672f7360e4edf028c868a3cc7ffb4d2784 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -4679,7 +4679,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -4796,7 +4796,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
|
|
@ -9,10 +9,10 @@ higher versions, but native module compiling with this version
|
|||
will have an issue.
|
||||
|
||||
diff --git a/include/v8config.h b/include/v8config.h
|
||||
index 0886f691d56a19ec2ffea686516148d55cce41ce..593cd73224479037908e09d0923f58cafba2122b 100644
|
||||
index acd34d7a1f255db4207a03506166ea8f4486195b..0c34547885bb6fea3da9c86c6cd852085d0bfb74 100644
|
||||
--- a/include/v8config.h
|
||||
+++ b/include/v8config.h
|
||||
@@ -401,10 +401,13 @@
|
||||
@@ -409,10 +409,13 @@ path. Add it with -I<path> to the command line
|
||||
# define V8_NOINLINE /* NOT SUPPORTED */
|
||||
#endif
|
||||
|
||||
|
@ -28,7 +28,7 @@ index 0886f691d56a19ec2ffea686516148d55cce41ce..593cd73224479037908e09d0923f58ca
|
|||
#else
|
||||
# define V8_DEPRECATED(message)
|
||||
#endif
|
||||
@@ -412,7 +415,11 @@
|
||||
@@ -420,7 +423,11 @@ path. Add it with -I<path> to the command line
|
||||
|
||||
// A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated.
|
||||
#if defined(V8_IMMINENT_DEPRECATION_WARNINGS)
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Tue, 17 Sep 2019 18:35:16 +0000
|
||||
Subject: Revert "[cleanup] Switch {OFFSET_OF} to {offsetof} where possible."
|
||||
|
||||
This reverts commit d287e4bc46243841c77cf9798516ee4dcc54bf43.
|
||||
|
||||
diff --git a/src/deoptimizer/deoptimizer.h b/src/deoptimizer/deoptimizer.h
|
||||
index efc37b59508a7e6a5d045e1a82102f0b2d5f1183..f5cbbb56852e23038790beb5fd94ee671cabeee4 100644
|
||||
--- a/src/deoptimizer/deoptimizer.h
|
||||
+++ b/src/deoptimizer/deoptimizer.h
|
||||
@@ -516,14 +516,14 @@ class Deoptimizer : public Malloced {
|
||||
DeoptimizeKind* type_out);
|
||||
|
||||
// Code generation support.
|
||||
- static int input_offset() { return offsetof(Deoptimizer, input_); }
|
||||
+ static int input_offset() { return OFFSET_OF(Deoptimizer, input_); }
|
||||
static int output_count_offset() {
|
||||
- return offsetof(Deoptimizer, output_count_);
|
||||
+ return OFFSET_OF(Deoptimizer, output_count_);
|
||||
}
|
||||
- static int output_offset() { return offsetof(Deoptimizer, output_); }
|
||||
+ static int output_offset() { return OFFSET_OF(Deoptimizer, output_); }
|
||||
|
||||
static int caller_frame_top_offset() {
|
||||
- return offsetof(Deoptimizer, caller_frame_top_);
|
||||
+ return OFFSET_OF(Deoptimizer, caller_frame_top_);
|
||||
}
|
||||
|
||||
V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate);
|
||||
@@ -792,7 +792,7 @@ class FrameDescription {
|
||||
int parameter_count() { return parameter_count_; }
|
||||
|
||||
static int registers_offset() {
|
||||
- return offsetof(FrameDescription, register_values_.registers_);
|
||||
+ return OFFSET_OF(FrameDescription, register_values_.registers_);
|
||||
}
|
||||
|
||||
static constexpr int double_registers_offset() {
|
|
@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
|
|||
this error no longer seems to happen.
|
||||
|
||||
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
|
||||
index 335419ebf5c810d990e072176d07bbe3e9934a7f..df2cd1c0a3c29d5fcd1398ead8903daf9208fb5e 100644
|
||||
index 8a44d21428b047eed73e0cf405c5064a0649b8cf..495c950b6cf725f4c4287e204d601ce178dc825d 100644
|
||||
--- a/src/codegen/arm64/assembler-arm64.cc
|
||||
+++ b/src/codegen/arm64/assembler-arm64.cc
|
||||
@@ -3644,6 +3644,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
|
||||
@@ -3653,6 +3653,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
|
||||
ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/extensions/command.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "shell/browser/api/electron_api_system_preferences.h"
|
||||
|
@ -22,7 +21,6 @@
|
|||
#include "base/mac/mac_util.h"
|
||||
#endif
|
||||
|
||||
using extensions::Command;
|
||||
using extensions::GlobalShortcutListener;
|
||||
|
||||
namespace {
|
||||
|
@ -46,15 +44,6 @@ bool RegisteringMediaKeyForUntrustedClient(const ui::Accelerator& accelerator) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MapHasMediaKeys(
|
||||
const std::map<ui::Accelerator, base::Closure>& accelerator_map) {
|
||||
auto media_key = std::find_if(
|
||||
accelerator_map.begin(), accelerator_map.end(),
|
||||
[](const auto& ac) { return Command::IsMediaKey(ac.first); });
|
||||
|
||||
return media_key != accelerator_map.end();
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
@ -112,12 +101,8 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
|
|||
return false;
|
||||
}
|
||||
#if defined(OS_MAC)
|
||||
if (Command::IsMediaKey(accelerator)) {
|
||||
if (RegisteringMediaKeyForUntrustedClient(accelerator))
|
||||
return false;
|
||||
|
||||
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(false);
|
||||
}
|
||||
if (RegisteringMediaKeyForUntrustedClient(accelerator))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(accelerator,
|
||||
|
@ -138,13 +123,6 @@ void GlobalShortcut::Unregister(const ui::Accelerator& accelerator) {
|
|||
if (accelerator_callback_map_.erase(accelerator) == 0)
|
||||
return;
|
||||
|
||||
#if defined(OS_MAC)
|
||||
if (Command::IsMediaKey(accelerator) &&
|
||||
!MapHasMediaKeys(accelerator_callback_map_)) {
|
||||
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
|
||||
this);
|
||||
}
|
||||
|
|
|
@ -136,8 +136,8 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
|
|||
->GetNetworkContext();
|
||||
|
||||
network_context->CreateNetLogExporter(mojo::MakeRequest(&net_log_exporter_));
|
||||
net_log_exporter_.set_connection_error_handler(
|
||||
base::BindOnce(&NetLog::OnConnectionError, base::Unretained(this)));
|
||||
net_log_exporter_.set_connection_error_handler(base::BindOnce(
|
||||
&NetLog::OnConnectionError, weak_ptr_factory_.GetWeakPtr()));
|
||||
|
||||
base::PostTaskAndReplyWithResult(
|
||||
file_task_runner_.get(), FROM_HERE,
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
#include "mojo/public/cpp/system/platform_handle.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_debugger.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
|
@ -1372,6 +1373,8 @@ void WebContents::RenderFrameCreated(
|
|||
static_cast<content::RenderWidgetHostImpl*>(rwhv->GetRenderWidgetHost());
|
||||
if (rwh_impl)
|
||||
rwh_impl->disable_hidden_ = !background_throttling_;
|
||||
|
||||
WebFrameMain::RenderFrameCreated(render_frame_host);
|
||||
}
|
||||
|
||||
void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) {
|
||||
|
@ -1577,11 +1580,19 @@ void WebContents::MessageTo(bool internal,
|
|||
const std::string& channel,
|
||||
blink::CloneableMessage arguments) {
|
||||
TRACE_EVENT1("electron", "WebContents::MessageTo", "channel", channel);
|
||||
auto* web_contents = FromID(web_contents_id);
|
||||
auto* target_web_contents = FromID(web_contents_id);
|
||||
|
||||
if (web_contents) {
|
||||
web_contents->SendIPCMessageWithSender(internal, channel,
|
||||
std::move(arguments), ID());
|
||||
if (target_web_contents) {
|
||||
content::RenderFrameHost* frame = target_web_contents->MainFrame();
|
||||
DCHECK(frame);
|
||||
|
||||
v8::HandleScope handle_scope(JavascriptEnvironment::GetIsolate());
|
||||
gin::Handle<WebFrameMain> web_frame_main =
|
||||
WebFrameMain::From(JavascriptEnvironment::GetIsolate(), frame);
|
||||
|
||||
int32_t sender_id = ID();
|
||||
web_frame_main->GetRendererApi()->Message(internal, channel,
|
||||
std::move(arguments), sender_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1967,9 +1978,6 @@ void WebContents::LoadURL(const GURL& url,
|
|||
// Calling LoadURLWithParams() can trigger JS which destroys |this|.
|
||||
auto weak_this = GetWeakPtr();
|
||||
|
||||
// Required to make beforeunload handler work.
|
||||
NotifyUserActivation();
|
||||
|
||||
params.transition_type = ui::PAGE_TRANSITION_TYPED;
|
||||
params.should_clear_history_list = true;
|
||||
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
|
||||
|
@ -1984,6 +1992,9 @@ void WebContents::LoadURL(const GURL& url,
|
|||
if (!weak_this)
|
||||
return;
|
||||
|
||||
// Required to make beforeunload handler work.
|
||||
NotifyUserActivation();
|
||||
|
||||
// Set the background color of RenderWidgetHostView.
|
||||
// We have to call it right after LoadURL because the RenderViewHost is only
|
||||
// created after loading a page.
|
||||
|
@ -2674,30 +2685,6 @@ bool WebContents::IsFocused() const {
|
|||
}
|
||||
#endif
|
||||
|
||||
bool WebContents::SendIPCMessage(bool internal,
|
||||
const std::string& channel,
|
||||
v8::Local<v8::Value> args) {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
blink::CloneableMessage message;
|
||||
if (!gin::ConvertFromV8(isolate, args, &message)) {
|
||||
isolate->ThrowException(v8::Exception::Error(
|
||||
gin::StringToV8(isolate, "Failed to serialize arguments")));
|
||||
return false;
|
||||
}
|
||||
return SendIPCMessageWithSender(internal, channel, std::move(message));
|
||||
}
|
||||
|
||||
bool WebContents::SendIPCMessageWithSender(bool internal,
|
||||
const std::string& channel,
|
||||
blink::CloneableMessage args,
|
||||
int32_t sender_id) {
|
||||
auto* frame_host = web_contents()->GetMainFrame();
|
||||
mojo::AssociatedRemote<mojom::ElectronRenderer> electron_renderer;
|
||||
frame_host->GetRemoteAssociatedInterfaces()->GetInterface(&electron_renderer);
|
||||
electron_renderer->Message(internal, channel, std::move(args), sender_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
void WebContents::SendInputEvent(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> input_event) {
|
||||
content::RenderWidgetHostView* view =
|
||||
|
@ -3111,12 +3098,10 @@ void WebContents::GrantOriginAccess(const GURL& url) {
|
|||
}
|
||||
|
||||
void WebContents::NotifyUserActivation() {
|
||||
auto* frame = web_contents()->GetMainFrame();
|
||||
if (!frame)
|
||||
return;
|
||||
mojo::AssociatedRemote<mojom::ElectronRenderer> renderer;
|
||||
frame->GetRemoteAssociatedInterfaces()->GetInterface(&renderer);
|
||||
renderer->NotifyUserActivation();
|
||||
content::RenderFrameHost* frame = web_contents()->GetMainFrame();
|
||||
if (frame)
|
||||
frame->NotifyUserActivation(
|
||||
blink::mojom::UserActivationNotificationType::kInteraction);
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
|
||||
|
@ -3139,18 +3124,23 @@ v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
|
|||
return handle;
|
||||
}
|
||||
|
||||
if (!frame_host->IsRenderFrameCreated()) {
|
||||
promise.RejectWithErrorMessage("takeHeapSnapshot failed");
|
||||
return handle;
|
||||
}
|
||||
|
||||
// This dance with `base::Owned` is to ensure that the interface stays alive
|
||||
// until the callback is called. Otherwise it would be closed at the end of
|
||||
// this function.
|
||||
auto electron_renderer =
|
||||
std::make_unique<mojo::AssociatedRemote<mojom::ElectronRenderer>>();
|
||||
frame_host->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
electron_renderer.get());
|
||||
std::make_unique<mojo::Remote<mojom::ElectronRenderer>>();
|
||||
frame_host->GetRemoteInterfaces()->GetInterface(
|
||||
electron_renderer->BindNewPipeAndPassReceiver());
|
||||
auto* raw_ptr = electron_renderer.get();
|
||||
(*raw_ptr)->TakeHeapSnapshot(
|
||||
mojo::WrapPlatformFile(base::ScopedPlatformFile(file.TakePlatformFile())),
|
||||
base::BindOnce(
|
||||
[](mojo::AssociatedRemote<mojom::ElectronRenderer>* ep,
|
||||
[](mojo::Remote<mojom::ElectronRenderer>* ep,
|
||||
gin_helper::Promise<void> promise, bool success) {
|
||||
if (success) {
|
||||
promise.Resolve();
|
||||
|
@ -3606,7 +3596,6 @@ v8::Local<v8::ObjectTemplate> WebContents::FillObjectTemplate(
|
|||
.SetMethod("stopFindInPage", &WebContents::StopFindInPage)
|
||||
.SetMethod("focus", &WebContents::Focus)
|
||||
.SetMethod("isFocused", &WebContents::IsFocused)
|
||||
.SetMethod("_send", &WebContents::SendIPCMessage)
|
||||
.SetMethod("sendInputEvent", &WebContents::SendInputEvent)
|
||||
.SetMethod("beginFrameSubscription", &WebContents::BeginFrameSubscription)
|
||||
.SetMethod("endFrameSubscription", &WebContents::EndFrameSubscription)
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/print_view_manager_basic.h"
|
||||
#include "components/printing/common/print_messages.h"
|
||||
#include "shell/browser/printing/print_preview_message_handler.h"
|
||||
#endif
|
||||
|
||||
|
@ -250,16 +249,6 @@ class WebContents : public gin::Wrappable<WebContents>,
|
|||
void Focus();
|
||||
bool IsFocused() const;
|
||||
|
||||
// Send messages to browser.
|
||||
bool SendIPCMessage(bool internal,
|
||||
const std::string& channel,
|
||||
v8::Local<v8::Value> args);
|
||||
|
||||
bool SendIPCMessageWithSender(bool internal,
|
||||
const std::string& channel,
|
||||
blink::CloneableMessage args,
|
||||
int32_t sender_id = 0);
|
||||
|
||||
// Send WebInputEvent to the page.
|
||||
void SendInputEvent(v8::Isolate* isolate, v8::Local<v8::Value> input_event);
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
#include "shell/browser/api/message_port.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
|
@ -28,7 +29,6 @@
|
|||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/v8_value_serializer.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -179,11 +179,25 @@ void WebFrameMain::Send(v8::Isolate* isolate,
|
|||
if (!CheckRenderFrame())
|
||||
return;
|
||||
|
||||
mojo::AssociatedRemote<mojom::ElectronRenderer> electron_renderer;
|
||||
render_frame_->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&electron_renderer);
|
||||
electron_renderer->Message(internal, channel, std::move(message),
|
||||
0 /* sender_id */);
|
||||
GetRendererApi()->Message(internal, channel, std::move(message),
|
||||
0 /* sender_id */);
|
||||
}
|
||||
|
||||
const mojo::Remote<mojom::ElectronRenderer>& WebFrameMain::GetRendererApi() {
|
||||
if (!renderer_api_) {
|
||||
pending_receiver_ = renderer_api_.BindNewPipeAndPassReceiver();
|
||||
if (render_frame_->IsRenderFrameCreated()) {
|
||||
render_frame_->GetRemoteInterfaces()->GetInterface(
|
||||
std::move(pending_receiver_));
|
||||
}
|
||||
renderer_api_.set_disconnect_handler(base::BindOnce(
|
||||
&WebFrameMain::OnRendererConnectionError, weak_factory_.GetWeakPtr()));
|
||||
}
|
||||
return renderer_api_;
|
||||
}
|
||||
|
||||
void WebFrameMain::OnRendererConnectionError() {
|
||||
renderer_api_.reset();
|
||||
}
|
||||
|
||||
void WebFrameMain::PostMessage(v8::Isolate* isolate,
|
||||
|
@ -215,11 +229,8 @@ void WebFrameMain::PostMessage(v8::Isolate* isolate,
|
|||
if (!CheckRenderFrame())
|
||||
return;
|
||||
|
||||
mojo::AssociatedRemote<mojom::ElectronRenderer> electron_renderer;
|
||||
render_frame_->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&electron_renderer);
|
||||
electron_renderer->ReceivePostMessage(channel,
|
||||
std::move(transferable_message));
|
||||
GetRendererApi()->ReceivePostMessage(channel,
|
||||
std::move(transferable_message));
|
||||
}
|
||||
|
||||
int WebFrameMain::FrameTreeNodeID() const {
|
||||
|
@ -335,6 +346,19 @@ void WebFrameMain::RenderFrameDeleted(content::RenderFrameHost* rfh) {
|
|||
web_frame->MarkRenderFrameDisposed();
|
||||
}
|
||||
|
||||
void WebFrameMain::RenderFrameCreated(content::RenderFrameHost* rfh) {
|
||||
auto* web_frame = FromRenderFrameHost(rfh);
|
||||
if (web_frame)
|
||||
web_frame->Connect();
|
||||
}
|
||||
|
||||
void WebFrameMain::Connect() {
|
||||
if (pending_receiver_) {
|
||||
render_frame_->GetRemoteInterfaces()->GetInterface(
|
||||
std::move(pending_receiver_));
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
v8::Local<v8::ObjectTemplate> WebFrameMain::FillObjectTemplate(
|
||||
v8::Isolate* isolate,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/process/process.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/wrappable.h"
|
||||
|
@ -51,11 +52,14 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
|||
// Called to mark any RenderFrameHost as disposed by any WebFrameMain that
|
||||
// may be holding a weak reference.
|
||||
static void RenderFrameDeleted(content::RenderFrameHost* rfh);
|
||||
static void RenderFrameCreated(content::RenderFrameHost* rfh);
|
||||
|
||||
// Mark RenderFrameHost as disposed and to no longer access it. This can
|
||||
// occur upon frame navigation.
|
||||
void MarkRenderFrameDisposed();
|
||||
|
||||
const mojo::Remote<mojom::ElectronRenderer>& GetRendererApi();
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static v8::Local<v8::ObjectTemplate> FillObjectTemplate(
|
||||
|
@ -71,6 +75,7 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
|||
// WebFrameMain can outlive its RenderFrameHost pointer so we need to check
|
||||
// whether its been disposed of prior to accessing it.
|
||||
bool CheckRenderFrame() const;
|
||||
void Connect();
|
||||
|
||||
v8::Local<v8::Promise> ExecuteJavaScript(gin::Arguments* args,
|
||||
const base::string16& code);
|
||||
|
@ -100,12 +105,19 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
|
|||
std::vector<content::RenderFrameHost*> Frames() const;
|
||||
std::vector<content::RenderFrameHost*> FramesInSubtree() const;
|
||||
|
||||
void OnRendererConnectionError();
|
||||
|
||||
mojo::Remote<mojom::ElectronRenderer> renderer_api_;
|
||||
mojo::PendingReceiver<mojom::ElectronRenderer> pending_receiver_;
|
||||
|
||||
content::RenderFrameHost* render_frame_ = nullptr;
|
||||
|
||||
// Whether the RenderFrameHost has been removed and that it should no longer
|
||||
// be accessed.
|
||||
bool render_frame_disposed_ = false;
|
||||
|
||||
base::WeakPtrFactory<WebFrameMain> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WebFrameMain);
|
||||
};
|
||||
|
||||
|
|
|
@ -568,7 +568,7 @@ content::TtsPlatform* ElectronBrowserClient::GetTtsPlatform() {
|
|||
}
|
||||
|
||||
void ElectronBrowserClient::OverrideWebkitPrefs(
|
||||
content::RenderViewHost* host,
|
||||
content::WebContents* web_contents,
|
||||
blink::web_pref::WebPreferences* prefs) {
|
||||
prefs->javascript_enabled = true;
|
||||
prefs->web_security_enabled = true;
|
||||
|
@ -597,7 +597,6 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
|
|||
? blink::mojom::PreferredColorScheme::kDark
|
||||
: blink::mojom::PreferredColorScheme::kLight;
|
||||
|
||||
auto* web_contents = content::WebContents::FromRenderViewHost(host);
|
||||
auto preloads =
|
||||
SessionPreferences::GetValidPreloads(web_contents->GetBrowserContext());
|
||||
if (!preloads.empty())
|
||||
|
@ -1107,6 +1106,7 @@ void ElectronBrowserClient::RenderProcessHostDestroyed(
|
|||
pending_processes_.erase(process_id);
|
||||
renderer_is_subframe_.erase(process_id);
|
||||
RemoveProcessPreferences(process_id);
|
||||
host->RemoveObserver(this);
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::RenderProcessReady(
|
||||
|
@ -1567,8 +1567,10 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
|
|||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
bool ElectronBrowserClient::PreSpawnRenderer(sandbox::TargetPolicy* policy,
|
||||
RendererSpawnFlags flags) {
|
||||
bool ElectronBrowserClient::PreSpawnChild(
|
||||
sandbox::TargetPolicy* policy,
|
||||
sandbox::policy::SandboxType sandbox_type,
|
||||
ChildSpawnFlags flags) {
|
||||
// Allow crashpad to communicate via named pipe.
|
||||
sandbox::ResultCode result = policy->AddRule(
|
||||
sandbox::TargetPolicy::SUBSYS_FILES,
|
||||
|
@ -1737,7 +1739,7 @@ ElectronBrowserClient::CreateURLLoaderThrottles(
|
|||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
result.push_back(std::make_unique<PluginResponseInterceptorURLLoaderThrottle>(
|
||||
request.resource_type, frame_tree_node_id));
|
||||
request.destination, frame_tree_node_id));
|
||||
#endif
|
||||
|
||||
return result;
|
||||
|
|
|
@ -92,7 +92,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
CreateSpeechRecognitionManagerDelegate() override;
|
||||
content::TtsPlatform* GetTtsPlatform() override;
|
||||
|
||||
void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
|
||||
void OverrideWebkitPrefs(content::WebContents* web_contents,
|
||||
blink::web_pref::WebPreferences* prefs) override;
|
||||
SiteInstanceForNavigationType ShouldOverrideSiteInstanceForNavigation(
|
||||
content::RenderFrameHost* current_rfh,
|
||||
|
@ -219,8 +219,9 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
bool is_for_isolated_world,
|
||||
network::mojom::URLLoaderFactoryParams* factory_params) override;
|
||||
#if defined(OS_WIN)
|
||||
bool PreSpawnRenderer(sandbox::TargetPolicy* policy,
|
||||
RendererSpawnFlags flags) override;
|
||||
bool PreSpawnChild(sandbox::TargetPolicy* policy,
|
||||
sandbox::policy::SandboxType sandbox_type,
|
||||
ChildSpawnFlags flags) override;
|
||||
#endif
|
||||
bool BindAssociatedReceiverFromFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "base/barrier_closure.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/no_destructor.h"
|
||||
|
@ -28,6 +29,8 @@
|
|||
#include "components/proxy_config/proxy_config_pref_names.h"
|
||||
#include "content/browser/blob_storage/chrome_blob_storage_context.h" // nogncheck
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/cors_origin_pattern_setter.h"
|
||||
#include "content/public/browser/shared_cors_origin_access_list.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
#include "net/base/escape.h"
|
||||
|
@ -105,7 +108,9 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition,
|
|||
: storage_policy_(new SpecialStoragePolicy),
|
||||
protocol_registry_(new ProtocolRegistry),
|
||||
in_memory_(in_memory),
|
||||
ssl_config_(network::mojom::SSLConfig::New()) {
|
||||
ssl_config_(network::mojom::SSLConfig::New()),
|
||||
shared_cors_origin_access_list_(
|
||||
content::SharedCorsOriginAccessList::Create()) {
|
||||
user_agent_ = ElectronBrowserClient::Get()->GetUserAgent();
|
||||
|
||||
// Read options.
|
||||
|
@ -431,9 +436,32 @@ void ElectronBrowserContext::SetCorsOriginAccessListForOrigin(
|
|||
std::vector<network::mojom::CorsOriginPatternPtr> allow_patterns,
|
||||
std::vector<network::mojom::CorsOriginPatternPtr> block_patterns,
|
||||
base::OnceClosure closure) {
|
||||
// TODO(nornagon): actually set the CORS access lists. This is called from
|
||||
// extensions/browser/renderer_startup_helper.cc.
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(closure));
|
||||
auto& context_map = ElectronBrowserContext::browser_context_map();
|
||||
auto barrier_closure =
|
||||
BarrierClosure(1 + context_map.size(), std::move(closure));
|
||||
|
||||
for (auto& iter : context_map) {
|
||||
if (iter.second) {
|
||||
auto bc_setter = base::MakeRefCounted<content::CorsOriginPatternSetter>(
|
||||
source_origin,
|
||||
content::CorsOriginPatternSetter::ClonePatterns(allow_patterns),
|
||||
content::CorsOriginPatternSetter::ClonePatterns(block_patterns),
|
||||
barrier_closure);
|
||||
ForEachStoragePartition(
|
||||
std::move(iter.second.get()),
|
||||
base::BindRepeating(&content::CorsOriginPatternSetter::SetLists,
|
||||
base::RetainedRef(bc_setter.get())));
|
||||
}
|
||||
}
|
||||
|
||||
shared_cors_origin_access_list_->SetForOrigin(
|
||||
source_origin, std::move(allow_patterns), std::move(block_patterns),
|
||||
barrier_closure);
|
||||
}
|
||||
|
||||
content::SharedCorsOriginAccessList*
|
||||
ElectronBrowserContext::GetSharedCorsOriginAccessList() {
|
||||
return shared_cors_origin_access_list_.get();
|
||||
}
|
||||
|
||||
ResolveProxyHelper* ElectronBrowserContext::GetResolveProxyHelper() {
|
||||
|
|
|
@ -119,6 +119,7 @@ class ElectronBrowserContext
|
|||
std::vector<network::mojom::CorsOriginPatternPtr> allow_patterns,
|
||||
std::vector<network::mojom::CorsOriginPatternPtr> block_patterns,
|
||||
base::OnceClosure closure) override;
|
||||
content::SharedCorsOriginAccessList* GetSharedCorsOriginAccessList() override;
|
||||
|
||||
CookieChangeNotifier* cookie_change_notifier() const {
|
||||
return cookie_change_notifier_.get();
|
||||
|
@ -197,6 +198,9 @@ class ElectronBrowserContext
|
|||
network::mojom::SSLConfigPtr ssl_config_;
|
||||
mojo::Remote<network::mojom::SSLConfigClient> ssl_config_client_;
|
||||
|
||||
scoped_refptr<content::SharedCorsOriginAccessList>
|
||||
shared_cors_origin_access_list_;
|
||||
|
||||
base::WeakPtrFactory<ElectronBrowserContext> weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserContext);
|
||||
|
|
|
@ -64,9 +64,6 @@ void AddStringsForPdf(base::DictionaryValue* dict) {
|
|||
|
||||
void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
dict->SetKey("pdfFormSaveEnabled",
|
||||
base::Value(base::FeatureList::IsEnabled(
|
||||
chrome_pdf::features::kSaveEditedPDFForm)));
|
||||
dict->SetKey("documentPropertiesEnabled",
|
||||
base::Value(base::FeatureList::IsEnabled(
|
||||
chrome_pdf::features::kPdfViewerDocumentProperties)));
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "electron/buildflags/buildflags.h"
|
||||
#include "extensions/browser/api/app_runtime/app_runtime_api.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/extension_user_script_manager.h"
|
||||
#include "extensions/browser/info_map.h"
|
||||
#include "extensions/browser/management_policy.h"
|
||||
#include "extensions/browser/notification_types.h"
|
||||
|
@ -31,7 +32,6 @@
|
|||
#include "extensions/browser/quota_service.h"
|
||||
#include "extensions/browser/runtime_data.h"
|
||||
#include "extensions/browser/service_worker_manager.h"
|
||||
#include "extensions/browser/shared_user_script_manager.h"
|
||||
#include "extensions/browser/value_store/value_store_factory_impl.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/file_util.h"
|
||||
|
@ -84,8 +84,8 @@ void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
|
|||
runtime_data_ =
|
||||
std::make_unique<RuntimeData>(ExtensionRegistry::Get(browser_context_));
|
||||
quota_service_ = std::make_unique<QuotaService>();
|
||||
shared_user_script_manager_ =
|
||||
std::make_unique<SharedUserScriptManager>(browser_context_);
|
||||
extension_user_script_manager_ =
|
||||
std::make_unique<ExtensionUserScriptManager>(browser_context_);
|
||||
app_sorting_ = std::make_unique<NullAppSorting>();
|
||||
extension_loader_ =
|
||||
std::make_unique<ElectronExtensionLoader>(browser_context_);
|
||||
|
@ -140,8 +140,9 @@ ServiceWorkerManager* ElectronExtensionSystem::service_worker_manager() {
|
|||
return service_worker_manager_.get();
|
||||
}
|
||||
|
||||
SharedUserScriptManager* ElectronExtensionSystem::shared_user_script_manager() {
|
||||
return new SharedUserScriptManager(browser_context_);
|
||||
ExtensionUserScriptManager*
|
||||
ElectronExtensionSystem::extension_user_script_manager() {
|
||||
return new ExtensionUserScriptManager(browser_context_);
|
||||
}
|
||||
|
||||
StateStore* ElectronExtensionSystem::state_store() {
|
||||
|
|
|
@ -61,7 +61,7 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
|||
RuntimeData* runtime_data() override;
|
||||
ManagementPolicy* management_policy() override;
|
||||
ServiceWorkerManager* service_worker_manager() override;
|
||||
SharedUserScriptManager* shared_user_script_manager() override;
|
||||
ExtensionUserScriptManager* extension_user_script_manager() override;
|
||||
StateStore* state_store() override;
|
||||
StateStore* rules_store() override;
|
||||
scoped_refptr<ValueStoreFactory> store_factory() override;
|
||||
|
@ -103,7 +103,7 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
|||
std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
|
||||
std::unique_ptr<RuntimeData> runtime_data_;
|
||||
std::unique_ptr<QuotaService> quota_service_;
|
||||
std::unique_ptr<SharedUserScriptManager> shared_user_script_manager_;
|
||||
std::unique_ptr<ExtensionUserScriptManager> extension_user_script_manager_;
|
||||
std::unique_ptr<AppSorting> app_sorting_;
|
||||
std::unique_ptr<ManagementPolicy> management_policy_;
|
||||
|
||||
|
|
|
@ -50,6 +50,11 @@ void BluetoothChooser::SetAdapterPresence(AdapterPresence presence) {
|
|||
switch (presence) {
|
||||
case AdapterPresence::ABSENT:
|
||||
case AdapterPresence::POWERED_OFF:
|
||||
// Chrome currently directs the user to system preferences
|
||||
// to grant bluetooth permission for this case, should we
|
||||
// do something similar ?
|
||||
// https://chromium-review.googlesource.com/c/chromium/src/+/2617129
|
||||
case AdapterPresence::UNAUTHORIZED:
|
||||
event_handler_.Run(content::BluetoothChooserEvent::CANCELLED, "");
|
||||
break;
|
||||
case AdapterPresence::POWERED_ON:
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "content/public/browser/network_service_instance.h"
|
||||
#include "content/public/browser/shared_cors_origin_access_list.h"
|
||||
#include "net/net_buildflags.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "services/network/public/cpp/cors/origin_access_list.h"
|
||||
#include "shell/browser/browser_process_impl.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
#include "shell/browser/net/system_network_context_manager.h"
|
||||
|
@ -40,6 +42,11 @@ void NetworkContextService::ConfigureNetworkContextParams(
|
|||
|
||||
network_context_params->user_agent = browser_context_->GetUserAgent();
|
||||
|
||||
network_context_params->cors_origin_access_list =
|
||||
browser_context_->GetSharedCorsOriginAccessList()
|
||||
->GetOriginAccessList()
|
||||
.CreateCorsOriginAccessPatternsList();
|
||||
|
||||
network_context_params->accept_language =
|
||||
net::HttpUtil::GenerateAcceptLanguageHeader(
|
||||
ElectronBrowserClient::Get()->GetApplicationLocale());
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "components/printing/browser/print_composite_client.h"
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
#include "components/printing/common/print_messages.h"
|
||||
#include "components/services/print_compositor/public/cpp/print_service_mojo_types.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
@ -53,67 +52,50 @@ void StopWorker(int document_cookie) {
|
|||
|
||||
PrintPreviewMessageHandler::PrintPreviewMessageHandler(
|
||||
content::WebContents* web_contents)
|
||||
: content::WebContentsObserver(web_contents) {
|
||||
: web_contents_(web_contents) {
|
||||
DCHECK(web_contents);
|
||||
}
|
||||
|
||||
PrintPreviewMessageHandler::~PrintPreviewMessageHandler() = default;
|
||||
|
||||
bool PrintPreviewMessageHandler::OnMessageReceived(
|
||||
const IPC::Message& message,
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(PrintPreviewMessageHandler, message,
|
||||
render_frame_host)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting,
|
||||
OnMetafileReadyForPrinting)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_DidPreviewPage, OnDidPreviewPage)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_DidPrepareDocumentForPreview,
|
||||
OnDidPrepareForDocumentToPdf)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
return handled;
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnMetafileReadyForPrinting(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const printing::mojom::DidPreviewDocumentParams& params,
|
||||
const printing::mojom::PreviewIds& ids) {
|
||||
void PrintPreviewMessageHandler::MetafileReadyForPrinting(
|
||||
printing::mojom::DidPreviewDocumentParamsPtr params,
|
||||
int32_t request_id) {
|
||||
// Always try to stop the worker.
|
||||
StopWorker(params.document_cookie);
|
||||
StopWorker(params->document_cookie);
|
||||
|
||||
if (params.expected_pages_count == 0) {
|
||||
RejectPromise(ids.request_id);
|
||||
if (params->expected_pages_count == 0) {
|
||||
RejectPromise(request_id);
|
||||
return;
|
||||
}
|
||||
|
||||
const base::ReadOnlySharedMemoryRegion& metafile =
|
||||
params.content->metafile_data_region;
|
||||
params->content->metafile_data_region;
|
||||
|
||||
if (printing::IsOopifEnabled()) {
|
||||
auto* client =
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents());
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents_);
|
||||
DCHECK(client);
|
||||
|
||||
auto callback = base::BindOnce(
|
||||
&PrintPreviewMessageHandler::OnCompositeDocumentToPdfDone,
|
||||
weak_ptr_factory_.GetWeakPtr(), ids);
|
||||
weak_ptr_factory_.GetWeakPtr(), request_id);
|
||||
|
||||
client->DoCompleteDocumentToPdf(
|
||||
params.document_cookie, params.expected_pages_count,
|
||||
params->document_cookie, params->expected_pages_count,
|
||||
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
|
||||
std::move(callback),
|
||||
printing::mojom::PrintCompositor::Status::kCompositingFailure,
|
||||
base::ReadOnlySharedMemoryRegion()));
|
||||
} else {
|
||||
ResolvePromise(
|
||||
ids.request_id,
|
||||
request_id,
|
||||
base::RefCountedSharedMemoryMapping::CreateFromWholeRegion(metafile));
|
||||
}
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnPrepareForDocumentToPdfDone(
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
if (status != printing::mojom::PrintCompositor::Status::kSuccess) {
|
||||
|
@ -121,49 +103,53 @@ void PrintPreviewMessageHandler::OnPrepareForDocumentToPdfDone(
|
|||
}
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnDidPrepareForDocumentToPdf(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
int document_cookie,
|
||||
const printing::mojom::PreviewIds& ids) {
|
||||
void PrintPreviewMessageHandler::DidPrepareDocumentForPreview(
|
||||
int32_t document_cookie,
|
||||
int32_t request_id) {
|
||||
if (printing::IsOopifEnabled()) {
|
||||
auto* client =
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents());
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents_);
|
||||
DCHECK(client);
|
||||
|
||||
if (client->GetIsDocumentConcurrentlyComposited(document_cookie))
|
||||
return;
|
||||
|
||||
auto* focused_frame = web_contents_->GetFocusedFrame();
|
||||
auto* rfh = focused_frame && focused_frame->HasSelection()
|
||||
? focused_frame
|
||||
: web_contents_->GetMainFrame();
|
||||
|
||||
client->DoPrepareForDocumentToPdf(
|
||||
document_cookie, render_frame_host,
|
||||
document_cookie, rfh,
|
||||
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
|
||||
base::BindOnce(
|
||||
&PrintPreviewMessageHandler::OnPrepareForDocumentToPdfDone,
|
||||
weak_ptr_factory_.GetWeakPtr(), ids),
|
||||
weak_ptr_factory_.GetWeakPtr(), request_id),
|
||||
printing::mojom::PrintCompositor::Status::kCompositingFailure));
|
||||
}
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnCompositeDocumentToPdfDone(
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status,
|
||||
base::ReadOnlySharedMemoryRegion region) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
if (status != printing::mojom::PrintCompositor::Status::kSuccess) {
|
||||
LOG(ERROR) << "Compositing pdf failed with error " << status;
|
||||
RejectPromise(ids.request_id);
|
||||
RejectPromise(request_id);
|
||||
return;
|
||||
}
|
||||
|
||||
ResolvePromise(
|
||||
ids.request_id,
|
||||
request_id,
|
||||
base::RefCountedSharedMemoryMapping::CreateFromWholeRegion(region));
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnCompositePdfPageDone(
|
||||
int page_number,
|
||||
int document_cookie,
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status,
|
||||
base::ReadOnlySharedMemoryRegion region) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
@ -173,31 +159,35 @@ void PrintPreviewMessageHandler::OnCompositePdfPageDone(
|
|||
}
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::OnDidPreviewPage(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const printing::mojom::DidPreviewPageParams& params,
|
||||
const printing::mojom::PreviewIds& ids) {
|
||||
int page_number = params.page_number;
|
||||
const printing::mojom::DidPrintContentParams& content = *params.content;
|
||||
void PrintPreviewMessageHandler::DidPreviewPage(
|
||||
printing::mojom::DidPreviewPageParamsPtr params,
|
||||
int32_t request_id) {
|
||||
int page_number = params->page_number;
|
||||
const printing::mojom::DidPrintContentParams& content = *(params->content);
|
||||
|
||||
if (page_number < printing::FIRST_PAGE_INDEX ||
|
||||
!content.metafile_data_region.IsValid()) {
|
||||
RejectPromise(ids.request_id);
|
||||
RejectPromise(request_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (printing::IsOopifEnabled()) {
|
||||
auto* client =
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents());
|
||||
printing::PrintCompositeClient::FromWebContents(web_contents_);
|
||||
DCHECK(client);
|
||||
|
||||
auto* focused_frame = web_contents_->GetFocusedFrame();
|
||||
auto* rfh = focused_frame && focused_frame->HasSelection()
|
||||
? focused_frame
|
||||
: web_contents_->GetMainFrame();
|
||||
|
||||
// Use utility process to convert skia metafile to pdf.
|
||||
client->DoCompositePageToPdf(
|
||||
params.document_cookie, render_frame_host, content,
|
||||
params->document_cookie, rfh, content,
|
||||
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
|
||||
base::BindOnce(&PrintPreviewMessageHandler::OnCompositePdfPageDone,
|
||||
weak_ptr_factory_.GetWeakPtr(), page_number,
|
||||
params.document_cookie, ids),
|
||||
params->document_cookie, request_id),
|
||||
printing::mojom::PrintCompositor::Status::kCompositingFailure,
|
||||
base::ReadOnlySharedMemoryRegion()));
|
||||
}
|
||||
|
@ -217,12 +207,6 @@ void PrintPreviewMessageHandler::PrintPreviewCancelled(int32_t document_cookie,
|
|||
RejectPromise(request_id);
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::CheckForCancel(
|
||||
int32_t request_id,
|
||||
CheckForCancelCallback callback) {
|
||||
std::move(callback).Run(false);
|
||||
}
|
||||
|
||||
void PrintPreviewMessageHandler::PrintToPDF(
|
||||
base::DictionaryValue options,
|
||||
gin_helper::Promise<v8::Local<v8::Value>> promise) {
|
||||
|
@ -230,10 +214,10 @@ void PrintPreviewMessageHandler::PrintToPDF(
|
|||
options.GetInteger(printing::kPreviewRequestID, &request_id);
|
||||
promise_map_.emplace(request_id, std::move(promise));
|
||||
|
||||
auto* focused_frame = web_contents()->GetFocusedFrame();
|
||||
auto* focused_frame = web_contents_->GetFocusedFrame();
|
||||
auto* rfh = focused_frame && focused_frame->HasSelection()
|
||||
? focused_frame
|
||||
: web_contents()->GetMainFrame();
|
||||
: web_contents_->GetMainFrame();
|
||||
|
||||
if (!print_render_frame_.is_bound()) {
|
||||
rfh->GetRemoteAssociatedInterfaces()->GetInterface(&print_render_frame_);
|
||||
|
|
|
@ -11,16 +11,12 @@
|
|||
#include "base/memory/weak_ptr.h"
|
||||
#include "components/printing/common/print.mojom.h"
|
||||
#include "components/services/print_compositor/public/mojom/print_compositor.mojom.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
struct PrintHostMsg_DidPreviewDocument_Params;
|
||||
struct PrintHostMsg_DidPreviewPage_Params;
|
||||
|
||||
namespace content {
|
||||
class RenderFrameHost;
|
||||
}
|
||||
|
@ -29,8 +25,7 @@ namespace electron {
|
|||
|
||||
// Manages the print preview handling for a WebContents.
|
||||
class PrintPreviewMessageHandler
|
||||
: public content::WebContentsObserver,
|
||||
public printing::mojom::PrintPreviewUI,
|
||||
: public printing::mojom::PrintPreviewUI,
|
||||
public content::WebContentsUserData<PrintPreviewMessageHandler> {
|
||||
public:
|
||||
~PrintPreviewMessageHandler() override;
|
||||
|
@ -38,38 +33,23 @@ class PrintPreviewMessageHandler
|
|||
void PrintToPDF(base::DictionaryValue options,
|
||||
gin_helper::Promise<v8::Local<v8::Value>> promise);
|
||||
|
||||
protected:
|
||||
// content::WebContentsObserver implementation.
|
||||
bool OnMessageReceived(const IPC::Message& message,
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
|
||||
private:
|
||||
friend class content::WebContentsUserData<PrintPreviewMessageHandler>;
|
||||
|
||||
explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
|
||||
|
||||
void OnMetafileReadyForPrinting(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const printing::mojom::DidPreviewDocumentParams& params,
|
||||
const printing::mojom::PreviewIds& ids);
|
||||
void OnCompositeDocumentToPdfDone(
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status,
|
||||
base::ReadOnlySharedMemoryRegion region);
|
||||
void OnPrepareForDocumentToPdfDone(
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status);
|
||||
void OnDidPrepareForDocumentToPdf(content::RenderFrameHost* render_frame_host,
|
||||
int document_cookie,
|
||||
const printing::mojom::PreviewIds& ids);
|
||||
void OnCompositePdfPageDone(int page_number,
|
||||
int document_cookie,
|
||||
const printing::mojom::PreviewIds& ids,
|
||||
int32_t request_id,
|
||||
printing::mojom::PrintCompositor::Status status,
|
||||
base::ReadOnlySharedMemoryRegion region);
|
||||
void OnDidPreviewPage(content::RenderFrameHost* render_frame_host,
|
||||
const printing::mojom::DidPreviewPageParams& params,
|
||||
const printing::mojom::PreviewIds& ids);
|
||||
|
||||
// printing::mojo::PrintPreviewUI:
|
||||
void SetOptionsFromDocument(
|
||||
|
@ -80,8 +60,20 @@ class PrintPreviewMessageHandler
|
|||
int32_t request_id) override;
|
||||
void PrinterSettingsInvalid(int32_t document_cookie,
|
||||
int32_t request_id) override {}
|
||||
void CheckForCancel(int32_t request_id,
|
||||
CheckForCancelCallback callback) override;
|
||||
void DidPrepareDocumentForPreview(int32_t document_cookie,
|
||||
int32_t request_id) override;
|
||||
void DidPreviewPage(printing::mojom::DidPreviewPageParamsPtr params,
|
||||
int32_t request_id) override;
|
||||
void MetafileReadyForPrinting(
|
||||
printing::mojom::DidPreviewDocumentParamsPtr params,
|
||||
int32_t request_id) override;
|
||||
void DidGetDefaultPageLayout(
|
||||
printing::mojom::PageSizeMarginsPtr page_layout_in_points,
|
||||
const gfx::Rect& printable_area_in_points,
|
||||
bool has_custom_page_size_style,
|
||||
int32_t request_id) override {}
|
||||
void DidStartPreview(printing::mojom::DidStartPreviewParamsPtr params,
|
||||
int32_t request_id) override {}
|
||||
|
||||
gin_helper::Promise<v8::Local<v8::Value>> GetPromise(int request_id);
|
||||
|
||||
|
@ -92,6 +84,8 @@ class PrintPreviewMessageHandler
|
|||
using PromiseMap = std::map<int, gin_helper::Promise<v8::Local<v8::Value>>>;
|
||||
PromiseMap promise_map_;
|
||||
|
||||
content::WebContents* web_contents_ = nullptr;
|
||||
|
||||
mojo::AssociatedRemote<printing::mojom::PrintRenderFrame> print_render_frame_;
|
||||
|
||||
mojo::AssociatedReceiver<printing::mojom::PrintPreviewUI> receiver_{this};
|
||||
|
|
|
@ -14,8 +14,6 @@ interface ElectronRenderer {
|
|||
|
||||
ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
|
||||
|
||||
NotifyUserActivation();
|
||||
|
||||
TakeHeapSnapshot(handle file) => (bool success);
|
||||
};
|
||||
|
||||
|
|
|
@ -347,15 +347,16 @@ v8::Local<v8::Value> Converter<blink::mojom::ContextMenuDataMediaType>::ToV8(
|
|||
}
|
||||
|
||||
// static
|
||||
v8::Local<v8::Value> Converter<blink::ContextMenuDataInputFieldType>::ToV8(
|
||||
v8::Local<v8::Value>
|
||||
Converter<blink::mojom::ContextMenuDataInputFieldType>::ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const blink::ContextMenuDataInputFieldType& in) {
|
||||
const blink::mojom::ContextMenuDataInputFieldType& in) {
|
||||
switch (in) {
|
||||
case blink::ContextMenuDataInputFieldType::kPlainText:
|
||||
case blink::mojom::ContextMenuDataInputFieldType::kPlainText:
|
||||
return StringToV8(isolate, "plainText");
|
||||
case blink::ContextMenuDataInputFieldType::kPassword:
|
||||
case blink::mojom::ContextMenuDataInputFieldType::kPassword:
|
||||
return StringToV8(isolate, "password");
|
||||
case blink::ContextMenuDataInputFieldType::kOther:
|
||||
case blink::mojom::ContextMenuDataInputFieldType::kOther:
|
||||
return StringToV8(isolate, "other");
|
||||
default:
|
||||
return StringToV8(isolate, "none");
|
||||
|
@ -393,31 +394,24 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
|
|||
|
||||
v8::Local<v8::Value> MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags) {
|
||||
gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(isolate);
|
||||
dict.Set("inError",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaInError));
|
||||
dict.Set("isPaused",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaPaused));
|
||||
dict.Set("isMuted", !!(mediaFlags & blink::WebContextMenuData::kMediaMuted));
|
||||
dict.Set("canSave",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanSave));
|
||||
dict.Set("hasAudio",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaHasAudio));
|
||||
dict.Set("isLooping", !!(mediaFlags & blink::WebContextMenuData::kMediaLoop));
|
||||
dict.Set("inError", !!(mediaFlags & blink::ContextMenuData::kMediaInError));
|
||||
dict.Set("isPaused", !!(mediaFlags & blink::ContextMenuData::kMediaPaused));
|
||||
dict.Set("isMuted", !!(mediaFlags & blink::ContextMenuData::kMediaMuted));
|
||||
dict.Set("canSave", !!(mediaFlags & blink::ContextMenuData::kMediaCanSave));
|
||||
dict.Set("hasAudio", !!(mediaFlags & blink::ContextMenuData::kMediaHasAudio));
|
||||
dict.Set("isLooping", !!(mediaFlags & blink::ContextMenuData::kMediaLoop));
|
||||
dict.Set("isControlsVisible",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaControls));
|
||||
!!(mediaFlags & blink::ContextMenuData::kMediaControls));
|
||||
dict.Set("canToggleControls",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanToggleControls));
|
||||
dict.Set("canPrint",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanPrint));
|
||||
!!(mediaFlags & blink::ContextMenuData::kMediaCanToggleControls));
|
||||
dict.Set("canPrint", !!(mediaFlags & blink::ContextMenuData::kMediaCanPrint));
|
||||
dict.Set("canRotate",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanRotate));
|
||||
dict.Set(
|
||||
"canShowPictureInPicture",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanPictureInPicture));
|
||||
!!(mediaFlags & blink::ContextMenuData::kMediaCanRotate));
|
||||
dict.Set("canShowPictureInPicture",
|
||||
!!(mediaFlags & blink::ContextMenuData::kMediaCanPictureInPicture));
|
||||
dict.Set("isShowingPictureInPicture",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaPictureInPicture));
|
||||
dict.Set("canLoop",
|
||||
!!(mediaFlags & blink::WebContextMenuData::kMediaCanLoop));
|
||||
!!(mediaFlags & blink::ContextMenuData::kMediaPictureInPicture));
|
||||
dict.Set("canLoop", !!(mediaFlags & blink::ContextMenuData::kMediaCanLoop));
|
||||
return ConvertToV8(isolate, dict);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#define SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_
|
||||
|
||||
#include "gin/converter.h"
|
||||
#include "third_party/blink/public/common/context_menu_data/context_menu_data.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/blink/public/common/messaging/cloneable_message.h"
|
||||
#include "third_party/blink/public/common/web_cache/web_cache_resource_type_stats.h"
|
||||
#include "third_party/blink/public/web/web_context_menu_data.h"
|
||||
|
||||
namespace blink {
|
||||
class WebMouseEvent;
|
||||
|
@ -74,10 +74,10 @@ struct Converter<blink::mojom::ContextMenuDataMediaType> {
|
|||
};
|
||||
|
||||
template <>
|
||||
struct Converter<blink::ContextMenuDataInputFieldType> {
|
||||
struct Converter<blink::mojom::ContextMenuDataInputFieldType> {
|
||||
static v8::Local<v8::Value> ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const blink::ContextMenuDataInputFieldType& in);
|
||||
const blink::mojom::ContextMenuDataInputFieldType& in);
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "content/public/browser/context_menu_params.h"
|
||||
#include "content/public/browser/native_web_keyboard_event.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/untrustworthy_context_menu_params.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/web_contents_permission_helper.h"
|
||||
#include "shell/common/gin_converters/blink_converter.h"
|
||||
|
@ -18,6 +17,7 @@
|
|||
#include "shell/common/gin_converters/gfx_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h"
|
||||
#include "ui/events/keycodes/dom/keycode_converter.h"
|
||||
#include "ui/events/keycodes/keyboard_code_conversion.h"
|
||||
|
||||
|
@ -25,36 +25,36 @@ namespace {
|
|||
|
||||
void ExecuteCommand(content::WebContents* web_contents,
|
||||
int action,
|
||||
const content::CustomContextMenuContext& context) {
|
||||
const blink::CustomContextMenuContext& context) {
|
||||
web_contents->ExecuteCustomContextMenuCommand(action, context);
|
||||
}
|
||||
|
||||
// Forward declaration for nested recursive call.
|
||||
v8::Local<v8::Value> MenuToV8(v8::Isolate* isolate,
|
||||
content::WebContents* web_contents,
|
||||
const content::CustomContextMenuContext& context,
|
||||
const std::vector<content::MenuItem>& menu);
|
||||
const blink::CustomContextMenuContext& context,
|
||||
const std::vector<blink::MenuItem>& menu);
|
||||
|
||||
v8::Local<v8::Value> MenuItemToV8(
|
||||
v8::Isolate* isolate,
|
||||
content::WebContents* web_contents,
|
||||
const content::CustomContextMenuContext& context,
|
||||
const content::MenuItem& item) {
|
||||
const blink::CustomContextMenuContext& context,
|
||||
const blink::MenuItem& item) {
|
||||
gin_helper::Dictionary v8_item = gin::Dictionary::CreateEmpty(isolate);
|
||||
switch (item.type) {
|
||||
case content::MenuItem::CHECKABLE_OPTION:
|
||||
case content::MenuItem::GROUP:
|
||||
case blink::MenuItem::CHECKABLE_OPTION:
|
||||
case blink::MenuItem::GROUP:
|
||||
v8_item.Set("checked", item.checked);
|
||||
FALLTHROUGH;
|
||||
case content::MenuItem::OPTION:
|
||||
case content::MenuItem::SUBMENU:
|
||||
case blink::MenuItem::OPTION:
|
||||
case blink::MenuItem::SUBMENU:
|
||||
v8_item.Set("label", item.label);
|
||||
v8_item.Set("enabled", item.enabled);
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
v8_item.Set("type", item.type);
|
||||
}
|
||||
if (item.type == content::MenuItem::SUBMENU)
|
||||
if (item.type == blink::MenuItem::SUBMENU)
|
||||
v8_item.Set("submenu",
|
||||
MenuToV8(isolate, web_contents, context, item.submenu));
|
||||
else if (item.action > 0)
|
||||
|
@ -65,8 +65,8 @@ v8::Local<v8::Value> MenuItemToV8(
|
|||
|
||||
v8::Local<v8::Value> MenuToV8(v8::Isolate* isolate,
|
||||
content::WebContents* web_contents,
|
||||
const content::CustomContextMenuContext& context,
|
||||
const std::vector<content::MenuItem>& menu) {
|
||||
const blink::CustomContextMenuContext& context,
|
||||
const std::vector<blink::MenuItem>& menu) {
|
||||
std::vector<v8::Local<v8::Value>> v8_menu;
|
||||
v8_menu.reserve(menu.size());
|
||||
for (const auto& menu_item : menu)
|
||||
|
@ -110,19 +110,19 @@ struct Converter<ui::MenuSourceType> {
|
|||
};
|
||||
|
||||
// static
|
||||
v8::Local<v8::Value> Converter<content::MenuItem::Type>::ToV8(
|
||||
v8::Local<v8::Value> Converter<blink::MenuItem::Type>::ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const content::MenuItem::Type& val) {
|
||||
const blink::MenuItem::Type& val) {
|
||||
switch (val) {
|
||||
case content::MenuItem::CHECKABLE_OPTION:
|
||||
case blink::MenuItem::CHECKABLE_OPTION:
|
||||
return StringToV8(isolate, "checkbox");
|
||||
case content::MenuItem::GROUP:
|
||||
case blink::MenuItem::GROUP:
|
||||
return StringToV8(isolate, "radio");
|
||||
case content::MenuItem::SEPARATOR:
|
||||
case blink::MenuItem::SEPARATOR:
|
||||
return StringToV8(isolate, "separator");
|
||||
case content::MenuItem::SUBMENU:
|
||||
case blink::MenuItem::SUBMENU:
|
||||
return StringToV8(isolate, "submenu");
|
||||
case content::MenuItem::OPTION:
|
||||
case blink::MenuItem::OPTION:
|
||||
default:
|
||||
return StringToV8(isolate, "normal");
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <utility>
|
||||
|
||||
#include "content/public/browser/permission_type.h"
|
||||
#include "content/public/common/menu_item.h"
|
||||
#include "content/public/common/referrer.h"
|
||||
#include "content/public/common/stop_find_action.h"
|
||||
#include "gin/converter.h"
|
||||
#include "third_party/blink/public/common/context_menu_data/menu_item.h"
|
||||
#include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -26,9 +26,9 @@ using ContextMenuParamsWithWebContents =
|
|||
namespace gin {
|
||||
|
||||
template <>
|
||||
struct Converter<content::MenuItem::Type> {
|
||||
struct Converter<blink::MenuItem::Type> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
const content::MenuItem::Type& val);
|
||||
const blink::MenuItem::Type& val);
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
|
@ -104,21 +104,42 @@ ElectronApiServiceImpl::ElectronApiServiceImpl(
|
|||
content::RenderFrame* render_frame,
|
||||
RendererClientBase* renderer_client)
|
||||
: content::RenderFrameObserver(render_frame),
|
||||
renderer_client_(renderer_client) {}
|
||||
renderer_client_(renderer_client) {
|
||||
registry_.AddInterface(base::BindRepeating(&ElectronApiServiceImpl::BindTo,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::BindTo(
|
||||
mojo::PendingAssociatedReceiver<mojom::ElectronRenderer> receiver) {
|
||||
// Note: BindTo might be called for multiple times.
|
||||
if (receiver_.is_bound())
|
||||
receiver_.reset();
|
||||
mojo::PendingReceiver<mojom::ElectronRenderer> receiver) {
|
||||
if (document_created_) {
|
||||
if (receiver_.is_bound())
|
||||
receiver_.reset();
|
||||
|
||||
receiver_.Bind(std::move(receiver));
|
||||
receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&ElectronApiServiceImpl::OnConnectionError, GetWeakPtr()));
|
||||
receiver_.Bind(std::move(receiver));
|
||||
receiver_.set_disconnect_handler(base::BindOnce(
|
||||
&ElectronApiServiceImpl::OnConnectionError, GetWeakPtr()));
|
||||
} else {
|
||||
pending_receiver_ = std::move(receiver);
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::OnInterfaceRequestForFrame(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle* interface_pipe) {
|
||||
registry_.TryBindInterface(interface_name, interface_pipe);
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::DidCreateDocumentElement() {
|
||||
document_created_ = true;
|
||||
|
||||
if (pending_receiver_) {
|
||||
if (receiver_.is_bound())
|
||||
receiver_.reset();
|
||||
|
||||
receiver_.Bind(std::move(pending_receiver_));
|
||||
receiver_.set_disconnect_handler(base::BindOnce(
|
||||
&ElectronApiServiceImpl::OnConnectionError, GetWeakPtr()));
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::OnDestruct() {
|
||||
|
@ -134,25 +155,6 @@ void ElectronApiServiceImpl::Message(bool internal,
|
|||
const std::string& channel,
|
||||
blink::CloneableMessage arguments,
|
||||
int32_t sender_id) {
|
||||
// Don't handle browser messages before document element is created.
|
||||
//
|
||||
// Note: It is probably better to save the message and then replay it after
|
||||
// document is ready, but current behavior has been there since the first
|
||||
// day of Electron, and no one has complained so far.
|
||||
//
|
||||
// Reason 1:
|
||||
// When we receive a message from the browser, we try to transfer it
|
||||
// to a web page, and when we do that Blink creates an empty
|
||||
// document element if it hasn't been created yet, and it makes our init
|
||||
// script to run while `window.location` is still "about:blank".
|
||||
// (See https://github.com/electron/electron/pull/1044.)
|
||||
//
|
||||
// Reason 2:
|
||||
// The libuv message loop integration would be broken for unkown reasons.
|
||||
// (See https://github.com/electron/electron/issues/19368.)
|
||||
if (!document_created_)
|
||||
return;
|
||||
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
if (!frame)
|
||||
return;
|
||||
|
@ -196,13 +198,6 @@ void ElectronApiServiceImpl::ReceivePostMessage(
|
|||
0);
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::NotifyUserActivation() {
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
if (frame)
|
||||
frame->NotifyUserActivation(
|
||||
blink::mojom::UserActivationNotificationType::kInteraction);
|
||||
}
|
||||
|
||||
void ElectronApiServiceImpl::TakeHeapSnapshot(
|
||||
mojo::ScopedHandle file,
|
||||
TakeHeapSnapshotCallback callback) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_
|
||||
#define SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_
|
||||
|
||||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
|
@ -12,8 +13,8 @@
|
|||
#include "content/public/renderer/render_frame_observer.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/receiver.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -24,9 +25,9 @@ class ElectronApiServiceImpl : public mojom::ElectronRenderer,
|
|||
public:
|
||||
ElectronApiServiceImpl(content::RenderFrame* render_frame,
|
||||
RendererClientBase* renderer_client);
|
||||
~ElectronApiServiceImpl() override;
|
||||
|
||||
void BindTo(
|
||||
mojo::PendingAssociatedReceiver<mojom::ElectronRenderer> receiver);
|
||||
void BindTo(mojo::PendingReceiver<mojom::ElectronRenderer> receiver);
|
||||
|
||||
void Message(bool internal,
|
||||
const std::string& channel,
|
||||
|
@ -34,17 +35,19 @@ class ElectronApiServiceImpl : public mojom::ElectronRenderer,
|
|||
int32_t sender_id) override;
|
||||
void ReceivePostMessage(const std::string& channel,
|
||||
blink::TransferableMessage message) override;
|
||||
void NotifyUserActivation() override;
|
||||
void TakeHeapSnapshot(mojo::ScopedHandle file,
|
||||
TakeHeapSnapshotCallback callback) override;
|
||||
void ProcessPendingMessages();
|
||||
|
||||
base::WeakPtr<ElectronApiServiceImpl> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
private:
|
||||
~ElectronApiServiceImpl() override;
|
||||
void OnInterfaceRequestForFrame(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle* interface_pipe) override;
|
||||
|
||||
private:
|
||||
// RenderFrameObserver implementation.
|
||||
void DidCreateDocumentElement() override;
|
||||
void OnDestruct() override;
|
||||
|
@ -53,8 +56,10 @@ class ElectronApiServiceImpl : public mojom::ElectronRenderer,
|
|||
|
||||
// Whether the DOM document element has been created.
|
||||
bool document_created_ = false;
|
||||
service_manager::BinderRegistry registry_;
|
||||
|
||||
mojo::AssociatedReceiver<mojom::ElectronRenderer> receiver_{this};
|
||||
mojo::PendingReceiver<mojom::ElectronRenderer> pending_receiver_;
|
||||
mojo::Receiver<mojom::ElectronRenderer> receiver_{this};
|
||||
|
||||
RendererClientBase* renderer_client_;
|
||||
base::WeakPtrFactory<ElectronApiServiceImpl> weak_factory_{this};
|
||||
|
|
|
@ -75,9 +75,7 @@
|
|||
#include "extensions/common/extensions_client.h"
|
||||
#include "extensions/renderer/dispatcher.h"
|
||||
#include "extensions/renderer/extension_frame_helper.h"
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
|
||||
#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
|
||||
#include "shell/common/extensions/electron_extensions_client.h"
|
||||
#include "shell/renderer/extensions/electron_extensions_renderer_client.h"
|
||||
|
@ -256,10 +254,7 @@ void RendererClientBase::RenderFrameCreated(
|
|||
|
||||
// Note: ElectronApiServiceImpl has to be created now to capture the
|
||||
// DidCreateDocumentElement event.
|
||||
auto* service = new ElectronApiServiceImpl(render_frame, this);
|
||||
render_frame->GetAssociatedInterfaceRegistry()->AddInterface(
|
||||
base::BindRepeating(&ElectronApiServiceImpl::BindTo,
|
||||
service->GetWeakPtr()));
|
||||
new ElectronApiServiceImpl(render_frame, this);
|
||||
|
||||
content::RenderView* render_view = render_frame->GetRenderView();
|
||||
if (render_frame->IsMainFrame() && render_view) {
|
||||
|
@ -352,20 +347,6 @@ void RendererClientBase::DidSetUserAgent(const std::string& user_agent) {
|
|||
#endif
|
||||
}
|
||||
|
||||
guest_view::GuestViewContainer* RendererClientBase::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
// TODO(nornagon): check the mime type isn't content::kBrowserPluginMimeType?
|
||||
return new extensions::MimeHandlerViewContainer(render_frame, info, mime_type,
|
||||
original_url);
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool RendererClientBase::IsPluginHandledExternally(
|
||||
content::RenderFrame* render_frame,
|
||||
const blink::WebElement& plugin_element,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
|
@ -40,12 +41,10 @@ struct WebPluginInfo;
|
|||
}
|
||||
#endif
|
||||
|
||||
namespace guest_view {
|
||||
class GuestViewContainer;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
class ElectronApiServiceImpl;
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
class ElectronExtensionsRendererClient;
|
||||
#endif
|
||||
|
@ -108,11 +107,6 @@ class RendererClientBase : public content::ContentRendererClient
|
|||
override;
|
||||
bool IsKeySystemsUpdateNeeded() override;
|
||||
void DidSetUserAgent(const std::string& user_agent) override;
|
||||
guest_view::GuestViewContainer* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url);
|
||||
bool IsPluginHandledExternally(content::RenderFrame* render_frame,
|
||||
const blink::WebElement& plugin_element,
|
||||
const GURL& original_url,
|
||||
|
|
Загрузка…
Ссылка в новой задаче