chore: bump chromium to 93.0.4530.0 (master) (#29256)

* chore: bump chromium in DEPS to 92.0.4512.6

* 2887336: [CaptureHandle][#2] Propagate CaptureHandleConfig in browser process

https://chromium-review.googlesource.com/c/chromium/src/+/2887336

* refactor: base::Optional -> absl::optional

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4514.0

* 2899417: Make build work when enable_pdf is set to false.

https://chromium-review.googlesource.com/c/chromium/src/+/2899417

* 2904731: use BrowserContext instead of Profile in PreconnectManager

https://chromium-review.googlesource.com/c/chromium/src/+/2904731

* 2295749: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true

https://chromium-review.googlesource.com/c/chromium/src/+/2295749

* 2893803: Add a GetWebView to RenderFrame.

https://chromium-review.googlesource.com/c/chromium/src/+/2893803

* 2892345: Implement WebContents::ForEachRenderFrameHost

https://chromium-review.googlesource.com/c/chromium/src/+/2892345

* chore: fixup patch indices

* 2892048: Real instance methods for BrowserContext: remaining 5 methods.

https://chromium-review.googlesource.com/c/chromium/src/+/2892048

* 2902821: [mojo] Don't require full header includes for referenced interfaces

https://chromium-review.googlesource.com/c/chromium/src/+/2902821

* 2496500: Remove last deprecated extension Event ctor.

https://chromium-review.googlesource.com/c/chromium/src/+/2496500

* chore: fixup malformed pepper support patch

* chore: bump chromium in DEPS to 92.0.4515.0

* 2908461: Add CreateEmptyPrintPagesParamsPtr() inside print_view_manager_base.cc.

https://chromium-review.googlesource.com/c/chromium/src/+/2908461

* 2880838: viz: add optional HDRMetadata to TransferableResource

https://chromium-review.googlesource.com/c/chromium/src/+/2880838

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4515.5

* chore: update patches

* chore: bump chromium in DEPS to 92.0.4515.7

* chore: bump chromium in DEPS to 92.0.4515.9

* chore: bump chromium in DEPS to 93.0.4522.0

* chore: bump chromium in DEPS to 93.0.4523.0

* chore: bump chromium in DEPS to 93.0.4524.0

* chore: update patches

* chore: enable_pak_file_integrity_checks was reverted

* chore: update patches

* refactor: base/optional was replaced with absl::optional

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202

* refactor: replace all usages of base::nullopt with absl::nullopt

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202

* chore: add missing base::Contains include

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202

* refactor: replace all usages of base::make_optional with
absl::make_optional

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202

* refactor: replace WorldScriptContext() with GetScriptContextFromWorldId

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2893213

* chore: clean up left over opening namespace

Refs: 95bfe6d08f

* chore: add missing base::Contains include

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202

* refactor: replace GetCurrentDisplayIterator with the hard checker
GetCurrentDisplay

This code looks suspicious but if the iterator was invalid before it
will also be invalid now.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2893191

* refactor: headers are now passed directly in extensions client

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2918906

* refactor: base::DictionaryValue::empty() has been removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2912424

* chore: add missing includes for network URLLoaderFactory

Refs: unknown, probably a side effect of header changes

* refactor: make convenience wrapper around AppendArg

There is no converter FromV8 for base::StringPiece (apparently its not
possible).  So we now take in an std::string and use the construct for
StringPiece to do implicit conversion.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2905544

* chore: add patch

* chore: bump chromium in DEPS to 93.0.4525.0

* chore: update patches

* refactor: CanResize has been de-virtualized

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2485774

* chore: update resource integrity patch

* chore: add character encoding idl patch

* chore: bump chromium in DEPS to 93.0.4526.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4527.0

* chore: bump chromium in DEPS to 93.0.4528.0

* chore: update patches

* chore: update idl encoding patch

* chore: bump chromium in DEPS to 93.0.4529.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4530.0

* chore: update patches

* fix: only SetCanResize after the widget has been initialized

* chore: add patch for vr on windows gn gen

* spec: fix focus related tests on linux due to delay in focus swap

* chore: remove new usages of base::Optional from main

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
electron-roller[bot] 2021-06-03 01:05:04 -07:00 коммит произвёл GitHub
Родитель 8d0ed05c99
Коммит 8532e1239e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
165 изменённых файлов: 720 добавлений и 1048 удалений

2
DEPS
Просмотреть файл

@ -14,7 +14,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'92.0.4511.0',
'93.0.4530.0',
'node_version':
'v14.17.0',
'nan_version':

Просмотреть файл

@ -29,7 +29,5 @@ enable_pseudolocales = false
is_cfi = false
enable_pak_file_integrity_checks = false
# Make application name configurable at runtime for cookie crypto
allow_runtime_configurable_key_storage = true

Просмотреть файл

@ -3,7 +3,6 @@ dcheck.patch
accelerator.patch
blink_file_path.patch
blink_local_frame.patch
blink_world_context.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
@ -49,7 +48,6 @@ build_add_electron_tracing_category.patch
worker_context_will_destroy.patch
frame_host_manager.patch
crashpad_pid_check.patch
preconnect_feature.patch
network_service_allow_remote_certificate_verification_logic.patch
put_back_deleted_colors_for_autofill.patch
disable_color_correct_rendering.patch
@ -83,7 +81,6 @@ crash_allow_disabling_compression_on_linux.patch
allow_setting_secondary_label_via_simplemenumodel.patch
feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
fix_patch_out_profile_refs_in_accessibility_ui.patch
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
skip_atk_toolchain_check.patch
worker_feat_add_hook_to_notify_script_ready.patch
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
@ -99,7 +96,8 @@ fix_add_check_for_sandbox_then_result.patch
extend_apply_webpreferences.patch
fix_expose_decrementcapturercount_in_web_contents_impl.patch
add_setter_for_browsermainloop_result_code.patch
chore_allow_overriding_of_enable_pak_file_integrity_checks.patch
make_include_of_stack_trace_h_unconditional.patch
build_libc_as_static_library.patch
support_runtime_configurable_key_storage_on_linux_os_crypto.patch
build_do_not_depend_on_packed_resource_integrity.patch
build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch
build_do_not_include_vr_directx_helpers_when_enable_vr.patch

Просмотреть файл

@ -63,14 +63,14 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59
if (IsCmdDown()) {
diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h
index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b740fbbfb14b5737b18b84c07c8e9f79cfc645c0 100644
index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b1b46f18e9c600820fdd2d26631eac38da672811 100644
--- a/ui/base/accelerators/accelerator.h
+++ b/ui/base/accelerators/accelerator.h
@@ -16,6 +16,7 @@
#include <utility>
#include "base/component_export.h"
+#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ui/events/event_constants.h"
@ -78,7 +78,7 @@ index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b740fbbfb14b5737b18b84c07c8e9f79
return interrupted_by_mouse_event_;
}
+ base::Optional<char16_t> shifted_char;
+ absl::optional<char16_t> shifted_char;
+
private:
std::u16string ApplyLongFormModifiers(const std::u16string& shortcut) const;

Просмотреть файл

@ -10,7 +10,7 @@ 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 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7474f81d1 100644
index 3d985164eee3d7d8ef9e7ff2215ec9a17ec157a5..9c1c4fd8528fbb088f1836c8503c5875727f5d62 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -127,6 +127,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@ -23,10 +23,10 @@ index 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345d475744d 100644
index 08d697c611363155d3b6230b3e994ac456fb843b..cfc895ca8ce72655df5862d917a3954009930c4c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4135,6 +4135,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4259,6 +4259,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@ -40,10 +40,10 @@ index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e435f5410 100644
index 9636a1b59f05353b0777a0c304238703d17e1a01..0b5e6e726ebe7f4467b26725c477dc46dea579a5 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -576,6 +576,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -582,6 +582,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 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e
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 4b3b9b1c4034656fdf5f9862d3fffa66f51e72fe..55e69bb644e2c47ac15fe8b2e255d660b8a51b4f 100644
index 7bbe3754fec723c490c61cf52b875930dfa3543f..6035143b0d47fd0222fe7bc5c44328b043073335 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -577,6 +577,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -580,6 +580,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@ -79,10 +79,10 @@ index 83b81f4c1fd4232ee5c2b7b1b7b85424164f3acc..bdd4a0031af6f9c2b701979dd469867c
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 d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74ac649933e 100644
index 549a8f00a631bc860dde7a2362a0234420a1167a..14c3151f86a4d268352865c78c4889df6e9cf325 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -291,6 +291,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -297,6 +297,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@ -92,7 +92,7 @@ index d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74a
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 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d9f487367 100644
index 077a726d6f2c0899fac1bccfe8ecc05b3bbd76b3..ed6dfe4598d2396c4cc48b6fd3cfecf0076726d4 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
@@ -272,6 +272,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@ -110,7 +110,7 @@ index 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d
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 aab6643b89899a2b7f5bd74d4501bbf74562a663..8a3dddf797106e3d5da6a75d458ddea97cdf5edc 100644
index dd342c654a29a18fad347abe8d94131f78ce0f3e..51276dfa934ebb9d2695a068f89e4d5b07c190a2 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 {

Просмотреть файл

@ -10,10 +10,10 @@ valid use cases for setting custom exit codes of the main loop. This
exposes a simple setter that embedders can call.
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index 30d6d6f54e453c5b9690bc028005d4169f7d71c4..76228c72b87368d5372ed812693b81e7d4d370d0 100644
index 090ca9c6e8785c6e9f1b9245771645ea19805795..fdf587055a71103c21f27fd79e5714baa24ea5c4 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -164,6 +164,10 @@ class CONTENT_EXPORT BrowserMainLoop {
@@ -161,6 +161,10 @@ class CONTENT_EXPORT BrowserMainLoop {
int GetResultCode() const { return result_code_; }

Просмотреть файл

@ -6,10 +6,10 @@ Subject: 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 e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98ec6ece5f8 100644
index 5f4b4d0a6b7df869fef93129b6a3ce4c217a74c5..f00052e3335c5c2dbd00812be61ccae048e3e5b1 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -611,6 +611,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -615,6 +615,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@ -22,7 +22,7 @@ index e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98e
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 8926801ad5fdc5a560cb8a1eb40675eb5416f5cc..691abfe3802c207f402aef54eae481aaedafc364 100644
index 37f3a9cae4ce9652943bbe7e71541ce182f52c1e..608b54785a1d8b34df41b030f65253c14b8285a1 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@ -48,18 +48,18 @@ index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520
// 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 dfaf88a323e6b1e63cc2b7abd1d7a1dcc26b1b8c..9cbc5fcf90d54173c84b5e91c620d175166ed9b3 100644
index 59f8c47769c5fa325bb9464912561da1f0ba6c8b..822c94e3a3439b1c97ef25baf3eac97a017fa472 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -183,6 +183,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -155,6 +155,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy);
+ void OnSetSchedulerThrottling(bool allowed);
+
// Misc private functions ----------------------------------------------------
// In OOPIF-enabled modes, this tells each RenderFrame with a pending state
// ---------------------------------------------------------------------------
// ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put
// it in the same order in the .cc file as it was in the header.
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee8896e01ee45 100644
--- a/third_party/blink/public/mojom/page/page.mojom
@ -73,10 +73,10 @@ 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 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8605b1a0a 100644
index 7acd3f2bf496172490e8bf3ea033ee213fcfdb02..ebc73fa9fbaf689f50deb547ac778f0a74c376fb 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -357,6 +357,7 @@ class WebView {
@@ -364,6 +364,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@ -85,10 +85,10 @@ index 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8
// 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 e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf85575e1a12c 100644
index f2fbcc760726822b86a9ca7ae37ef07d209a0984..ac730780c3f643b7131b742bd8fb6fd34aae0d9b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3559,6 +3559,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3573,6 +3573,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@ -102,7 +102,7 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3570,7 +3577,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3584,7 +3591,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@ -113,10 +113,10 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
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 e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397e924bc12 100644
index c2e704e745d3859790e73e515c3c1cbcd11ce529..5b3233f4d1f108492f370fc0f6450633dbe713f0 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -403,6 +403,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -408,6 +408,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@ -124,7 +124,7 @@ index e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -828,6 +829,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -833,6 +834,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

Просмотреть файл

@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
documentation at https://electronjs.org/docs/api/file-object
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
index 7c21e6bc889c5bead5aa25a3a7582918d2f6d953..fe255a5d6afca61852adead82beaac275ebe9c54 100644
index d70a95cc9b28674dd4ac925e9f1aca481e60c34b..fa9d21a20e77867a7d596e0df4ec143edb871f27 100644
--- a/third_party/blink/renderer/core/fileapi/file.h
+++ b/third_party/blink/renderer/core/fileapi/file.h
@@ -200,6 +200,9 @@ class CORE_EXPORT File final : public Blob {
@@ -191,6 +191,9 @@ class CORE_EXPORT File final : public Blob {
}
const String& name() const { return name_; }

Просмотреть файл

@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450cb02331f 100644
index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a0883c16430c 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -120,14 +120,6 @@ bool Frame::Detach(FrameDetachType type) {
@ -49,10 +49,10 @@ index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450
// 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 fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74f1da69ed 100644
index 932b271a34fe295b2f0dd807f67b22682addfbf9..ea8336ff1f6c8bf26465e5ff6ed01cae0899f258 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -785,10 +785,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -784,10 +784,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@ -63,7 +63,7 @@ index fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74
if (!Client())
return false;
@@ -834,6 +830,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -833,6 +829,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

Просмотреть файл

@ -1,52 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:45:11 -0700
Subject: blink_world_context.patch
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 fd6ce9a3df30bc11387db8ee63293f202a8d00aa..014a71c2b81cb6ab3a6a295d8ee6f403f75770fd 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -369,6 +369,8 @@ class WebLocalFrame : public WebFrame {
// Returns the world ID associated with |script_context|.
virtual int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const = 0;
+ virtual v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const = 0;
// 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 35290011b1c32b8695e08ec80398e4df2cf611dc..1ae8fc18f467c50f2a7e0de9e24d708514c5cc86 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
@@ -1078,6 +1078,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
+v8::Local<v8::Context> WebLocalFrameImpl::WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const {
+ scoped_refptr<DOMWrapperWorld> world = DOMWrapperWorld::EnsureIsolatedWorld(
+ isolate, world_id);
+ return ToScriptState(GetFrame(), *world)->GetContext();
+}
+
bool WebFrame::ScriptCanAccess(WebFrame* target) {
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 415bd0ead0d6be7e73dbdfc2066612b7abee99b4..7e6512649709e68b9ea9cd829f6b7ffadf8a59dd 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
@@ -170,6 +170,8 @@ class CORE_EXPORT WebLocalFrameImpl final
v8::Local<v8::Context> MainWorldScriptContext() const override;
int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const override;
+ v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const override;
void RequestExecuteScriptAndReturnValue(const WebScriptSource&,
bool user_gesture,
WebScriptExecutionCallback*) override;

Просмотреть файл

@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 563674ae9631732979d973f5233a3b707312d638..779b76fe62c520f1681a82343a21aa4d734b3a55 100644
index c0bcfbab13bc243a4cf575340867463d79358ab7..6d51381b8d9414e44dba0fc1246066e97f9ff88a 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -77,6 +77,7 @@

Просмотреть файл

@ -0,0 +1,68 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Thu, 27 May 2021 17:21:07 -0700
Subject: build: do not depend on packed_resource_integrity
This ensures we do not depend on a target that does not exist when
building Electron, electron generates its own .pak files via
electron_repack and therefore this integrity target which is generated
by the chrome_paks target does not exist. This can not be upstreamed,
if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 75868925758560075e95b79a7473e635b23127d5..1aba073ab6bddfa20d82f66938383fe98baf5774 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -170,11 +170,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
+ if (!is_electron_build) {
+ deps += [
+ ":packed_resources_integrity",
+ ]
+ }
+
deps += [
":chrome_dll",
":chrome_exe_version",
":copy_first_run",
- ":packed_resources_integrity",
":visual_elements_resources",
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 6a690c18e5fd8b36237be6711437cf8997e074c7..8b0fc49851669ac98bdeed9975ed1f84596ddfa2 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4287,7 +4287,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
- if (!is_win) {
+ if (!is_win && !is_electron_build) {
deps += [ "//chrome:packed_resources_integrity" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 081cb42207daad824a12ea8b5c709387a3a0832a..4c4d614a47f36d2d75bd83081f10c5d294f59d6c 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -4878,10 +4878,15 @@ test("unit_tests") {
assert(toolkit_views)
sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
deps += [
- "//chrome:packed_resources_integrity",
"//chrome/browser/win/conflicts:unit_tests",
"//chrome/test:credential_provider_test_utils",
]
+
+ if (!is_electron_build) {
+ deps += [
+ "//chrome:packed_resources_integrity",
+ ]
+ }
}
if (is_win || is_chromeos_ash || is_mac) {

Просмотреть файл

@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Wed, 2 Jun 2021 15:10:18 -0700
Subject: build: do not include vr:directx_helpers when !enable_vr
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2935426
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 4c4d614a47f36d2d75bd83081f10c5d294f59d6c..864708e3f75b3fb8fce7b3cfedda52049c43bcc1 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -4883,9 +4883,7 @@ test("unit_tests") {
]
if (!is_electron_build) {
- deps += [
- "//chrome:packed_resources_integrity",
- ]
+ deps += [ "//chrome:packed_resources_integrity" ]
}
}
@@ -8568,7 +8566,7 @@ if (!is_android) {
"//third_party/blink/web_tests/resources/testharness.js",
]
- if (is_win) {
+ if (is_win && enable_vr) {
deps += [
"//device/vr",
"//device/vr:directx_helpers",

Просмотреть файл

@ -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 0ef73ab2b2e124466c4ff22fe662273ade82603b..f2451ca5f2ce1f22b84fe81637314daeb3dc64d8 100644
index 46bc4769236eabee773be1e5690f0d406cb22229..0c674012b6265a8109e00b13c7c95a36eaddbe27 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

Просмотреть файл

@ -0,0 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Fri, 28 May 2021 14:29:38 -0700
Subject: build: read IDL files as utf8 to fix python3 character encodding
issue
This should be upstreamed
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index 6e6990525d0441d22899450d34991bbb94265ca6..2ac3ae8f783f7472ffaf054714f07cf50bdf0fd3 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -146,7 +146,7 @@ def GenerateSchema(generator_name,
output_dir = os.path.join(destdir, src_path)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
- with open(os.path.join(output_dir, filename), 'w') as f:
+ with open(os.path.join(output_dir, filename), 'w', encoding='utf-8') as f:
f.write(code)
# If multiple files are being output, add the filename for each file.
if len(generators) > 1:
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
index 029e83c7179b2582bc46b5e3eeac1e32a016a479..f83d9edd37ad89478d6b741e1cf0c525bab94587 100755
--- a/tools/json_schema_compiler/idl_schema.py
+++ b/tools/json_schema_compiler/idl_schema.py
@@ -575,7 +575,7 @@ def Load(filename):
Python dictionary in a format that the JSON schema compiler expects to see.
'''
- f = open(filename, 'r')
+ f = open(filename, 'r', encoding='utf-8')
contents = f.read()
f.close()

Просмотреть файл

@ -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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d6983b767 100644
index bf3147e7dcb7b2a31a856c8397c41f1d09d857b2..5c52a31673c511b58a49857a97dcb3c12ba5e702 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5720,6 +5720,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -5934,6 +5934,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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6ceaecf46f 100644
index da7b464837a13a901e4a670d00d2a45c94dabd7a..4728f584f537b6496a437511873028c0a454a1d2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3658,6 +3658,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3757,6 +3757,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@ -39,7 +39,7 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_id, session_storage_namespace);
@@ -3700,12 +3708,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3799,12 +3807,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -53,10 +53,10 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
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 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b2595e5f8 100644
index e7293484f9779d87ee5e5d913b72f2eca24f91e1..71928d8cc6216f20704a7adda528bacd9292e188 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -455,6 +455,10 @@ struct CreateNewWindowParams {
@@ -468,6 +468,10 @@ struct CreateNewWindowParams {
// The impression associated with the navigation in the new window, if
// one is specified.
Impression? impression;
@ -68,10 +68,10 @@ index 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b
// 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 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee39c349f9b 100644
index dcc9c2261a5a68230f929e2d8755cc752d704c4d..6ddae5e216070967b592c81e3d465087d27905b1 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -561,6 +561,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -566,6 +566,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -81,10 +81,10 @@ index 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee3
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 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd852742b5a4 100644
index 09ce07d6501e1c651cf3ae76e4687650bb0c6f18..31414b7818ecb333be7cff85195d06c850202c6b 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -158,6 +158,7 @@ class NetworkService;
@@ -160,6 +160,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@ -92,7 +92,7 @@ index 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd85
} // namespace network
namespace sandbox {
@@ -928,6 +929,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -937,6 +938,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -150,10 +150,10 @@ index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db8
// 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 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36c6ee1ff9 100644
index 870b5f66ec8ec2e243c691b460071a9363cd0fa4..3d8175c6d343450173bc2f16cc6a6f37e7d0084d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -27,6 +27,7 @@
@@ -26,6 +26,7 @@
#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"
@ -161,7 +161,7 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
#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"
@@ -312,6 +313,10 @@ WebView* RenderViewImpl::CreateView(
@@ -289,6 +290,10 @@ WebView* RenderViewImpl::CreateView(
params->impression = blink::ConvertWebImpressionToImpression(*impression);
}
@ -173,7 +173,7 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
// 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 5e9b1a409f5fb0dd683cc67318bae9c542816451..e2a3780b6ea5e15839b89ff92c85e57e7c48b017 100644
index e3dd040164fec1a70c9bd2dac7cc3d93478ec39f..f8894682e181a99b9e6cf3d0e4b46413076eb5ef 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -450,6 +450,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(

Просмотреть файл

@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Tue, 11 May 2021 21:35:39 -0400
Subject: chore: allow overriding of enable_pak_file_integrity_checks
enable_pak_file_integrity_checks is not currently overridable
but Electron does not need to run this.
diff --git a/chrome/browser/buildflags.gni b/chrome/browser/buildflags.gni
index 8c19e707371c7ad4fbcd46d58b147de3bfc89790..17c82c078a2beb8146c39290aa37703c7a3b07f2 100644
--- a/chrome/browser/buildflags.gni
+++ b/chrome/browser/buildflags.gni
@@ -21,11 +21,13 @@ declare_args() {
# app_session_service and some not.
enable_app_session_service =
!(is_chromeos_lacros || is_chromecast || is_android)
-}
-# If true, the resource .pak files will be hashed and the digest will be
-# embedded in the binary and checked at run-time. This is incompatible with
-# enable_resource_allowlist_generation on Windows because it creates a circular
-# dependency with chrome_dll.
-enable_pak_file_integrity_checks =
- !(enable_resource_allowlist_generation && is_win) && !is_android
+
+ # If true, the resource .pak files will be hashed and the digest will be
+ # embedded in the binary and checked at run-time. This is incompatible with
+ # enable_resource_allowlist_generation on Windows because it creates a circular
+ # dependency with chrome_dll.
+ enable_pak_file_integrity_checks =
+ !(enable_resource_allowlist_generation && is_win) && !is_android
+
+}
\ No newline at end of file

Просмотреть файл

@ -9,10 +9,10 @@ we're running with contextIsolation enabled, we should be falling back
to Blink's logic. This will be upstreamed in some form.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 72248101cdaee12ff71d0d6cd9b83ea50db2c829..2b242fa4f7cb0562c31a48ba5aad49f534fbd71c 100644
index e3ad92d44fe90f45f8986f2ba3b6d5af096f831b..dafa7d7e67ed3a870d5ae534124047703c0328f1 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -464,7 +464,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
@@ -448,7 +448,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
return {true, std::move(stringified_source)};
}

Просмотреть файл

@ -67,10 +67,10 @@ index d072e66a2ad8a05c9678c98aa5dbeecd4a925465..3874397a4f3096cc965fc8ce4ee955c7
return extension && extension->id() == app_id_;
}
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
index 4499d9df3723b1c721aef919cbe376166985ddab..c641a8e3dc64f98aacc09567cc5fc9edcc6c9ff5 100644
index 412e6b05265a97077c3b617e12908c88719e6e73..8365a0d5923beb2ffbd837535db2abc23e32e891 100644
--- a/chrome/browser/media/offscreen_tab.cc
+++ b/chrome/browser/media/offscreen_tab.cc
@@ -283,8 +283,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
@@ -282,8 +282,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -140,10 +140,10 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f321829b3 100644
index 268f6547ff84b14c8f35afe36fcc3a46df65fdc9..68ad5985f1bc5d2e6bf90b2e8b59f413c1b888e1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1796,12 +1796,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -159,10 +159,10 @@ index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 71ce1e28e6291dcf5a8765003b93054eca360925..11d87d0ad1f86963b52c870adcdc65c2322ececc 100644
index 946c447afbde10c3136e8f13c3aaaa6333cc0153..f6d8708947997aa8256fd14687ca5c1bc79db68e 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -796,8 +796,7 @@ class Browser : public TabStripModelObserver,
@@ -791,8 +791,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -201,7 +201,7 @@ index 058ec72442d59989c4d6df4a7c791ecfeff0ef99..f7c8c2139382cb2e290c561624291afe
// The profile used for the presentation.
Profile* otr_profile_;
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98d90e4467 100644
index 821efb221cd2a6efca5ec9af0e91d930bf335dea..f5c34246a329ce49d5fe84067c722656005b89fa 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@ -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 e240f8a32b1f7f69afa992861c995e668695c51f..87792fc94a84ed3336c70d431516150a91ec5928 100644
index 6cbe9f509390367bf97bfbf1f2ebd58215e74db3..b21c2fa17d71a05a2b363cf31bbaaae82a3dc7aa 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3610,8 +3610,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3709,8 +3709,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@ -334,7 +334,7 @@ index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f50
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 8dc27c2df589861c3176a54c02abe821419e39c7..7e5d49798cd4f55e6b3e24f5f10824f5043c2ddd 100644
index a28112a99dfdc46148904fb064a321c13f443359..087d85af8f65873ce44b81580cf6392f568e3182 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(
@ -362,10 +362,10 @@ index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88af
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 ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126ac28bd1c 100644
index d5bb190807b3b8e7b025d3779420e41c222c054a..b7dc3554078011c9fbf5d467df31bc091b94013c 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -381,8 +381,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -387,8 +387,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -376,10 +376,10 @@ index ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126
// can catch bad client behavior while not interfering with normal operation.
constexpr size_t kMaxPendingWebContentsCount = 10;
diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
index 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7bee49accc8 100644
index 08b2a1d7e1a0bc458e478a77bfd2fbaf35865d08..690c4baace675a6f8bbeaa1e7297e3bf0f0a8a50 100644
--- a/fuchsia/engine/browser/frame_impl.h
+++ b/fuchsia/engine/browser/frame_impl.h
@@ -240,8 +240,7 @@ class FrameImpl : public fuchsia::web::Frame,
@@ -241,8 +241,7 @@ class FrameImpl : public fuchsia::web::Frame,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -390,10 +390,10 @@ index 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7be
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 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930b74e3ed5 100644
index dd1f6129173a0e19023f4ec9b66c44486b080456..d10468c06f84b59387af0a8fd5bc1c06108865eb 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -198,8 +198,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -192,8 +192,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 be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf3489a088 100644
index b4acb5dd3862e8411bfb00a99168e69822be0d53..6a690c18e5fd8b36237be6711437cf8997e074c7 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -6350,6 +6350,7 @@ static_library("browser") {
@@ -6365,6 +6365,7 @@ static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@ -19,7 +19,7 @@ index be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf
if (!is_android) {
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index d511c9085253ebfba69ba37f41193d15638bb10f..d98cfc569c775b52687a533e03c595a5e45be87e 100644
index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -6,7 +6,7 @@

Просмотреть файл

@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169630fa502 100644
index 03489704b2632b8a5af07ca073e83b03fe407130..21233d01ef39a959769bd0bb58cbe4c9a0daef08 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -16,7 +16,9 @@
@ -20,10 +20,10 @@ index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs(
@@ -269,12 +271,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability,
// Returns persistent-license session support.
static EmeSessionTypeSupport GetPersistentLicenseSupport(
bool supported_by_the_cdm) {
EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
+#if 0
// Do not support persistent-license if the process cannot persist data.
// TODO(crbug.com/457487): Have a better plan on this. See bug for details.

Просмотреть файл

@ -201,7 +201,7 @@ index 60f7ad6ffb28fa6554e02a7e031408f4d1124d86..0e8325e993178443d926249c427957bb
}
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
index 658c04c865f0e0f17501fc97965adc3bd56c709a..8c693eecbca10cd8b287fdd504d498e6a5e72e96 100644
index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688ada1a3ad3 100644
--- a/ui/base/x/x11_global_shortcut_listener.cc
+++ b/ui/base/x/x11_global_shortcut_listener.cc
@@ -32,11 +32,13 @@ const x11::ModMask kModifiersMasks[] = {

Просмотреть файл

@ -102,7 +102,7 @@ index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895d
arguments.push_back("--monitor-self");
}
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
index 686be7964d77dbba91a6265d157d05d97d5823fb..3e4585f7ba14650fa8b7e644b026147e0bac5119 100644
index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ecff2e9aa7 100644
--- a/components/crash/core/app/crashpad_win.cc
+++ b/components/crash/core/app/crashpad_win.cc
@@ -89,6 +89,7 @@ base::FilePath PlatformCrashpadInitialization(

Просмотреть файл

@ -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/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index d1f10922b82e4e0578d1c32978784216117e0696..8f0a750d1a5957b987c5ac506455587a09474461 100644
index c2df77803f30ad948d357a9679938320702e14b4..7d4a89e10e475c8cddd8fea77eac348c54014f0e 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -889,10 +889,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
@@ -882,10 +882,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
UINT cf_format = format.ToFormatEtc().cfFormat;

Просмотреть файл

@ -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 41363666bbbec7a92ac563282816f0a058979bc7..82ec517dbd675ad8b4a78848b7d2a7f71512c2d5 100644
index aabbdffa06268d5cd2b7ab46322d2db39e095cca..42d093965aa6d10a2d5f17fb9e0561adb60a5a70 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;

Просмотреть файл

@ -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 f75e776fc6cae207a7ba42fa7d893b3e8cb02856..6a9563fe2a7570bb0109a8dab83983c3935f49c5 100644
index 32cddc7ebb6f643bf81b395ce42ad8919719e5d6..a6eb50bad0bf0e05e91c5a7fa4a8d3f74886fa22 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1791,6 +1791,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1796,6 +1796,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
gfx::ContentColorUsage content_color_usage) const {
@ -81,10 +81,10 @@ index f919df4d79a1168269c1538ac13a2a944586cf4e..fc34cf5d7dab95e7b6fc0576674b3e2b
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d07259b74dfaa 100644
index 6eb1aa1766528176a1b9b77596031494f8b4fc00..67cc9e57b28d0544256c36c2744917e22b1cf43b 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -87,6 +87,9 @@
@@ -89,6 +89,9 @@
using gpu::gles2::GLES2Interface;
@ -94,7 +94,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
namespace viz {
namespace {
@@ -677,8 +680,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
@@ -679,8 +682,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
SetBlendEnabled(quad->ShouldDrawWithBlending());
@ -106,7 +106,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
// Use the full quad_rect for debug quads to not move the edges based on
// partial swaps.
@@ -1668,7 +1672,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
@@ -1670,7 +1674,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
params->use_color_matrix, tint_gl_composited_content_,
params->apply_shader_based_rounded_corner &&
ShouldApplyRoundedCorner(params->quad)),
@ -116,7 +116,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
}
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
@@ -2141,15 +2146,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
@@ -2143,15 +2148,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 f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
color_transform->Transform(&col, 1);
color_f.fR = col.x();
@@ -2371,7 +2377,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
@@ -2373,7 +2379,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
: NON_PREMULTIPLIED_ALPHA,
false, false, tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@ -146,7 +146,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2470,7 +2477,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
@@ -2472,7 +2479,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@ -156,7 +156,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2580,7 +2588,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
@@ -2582,7 +2590,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 f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
@@ -2761,7 +2770,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2763,7 +2772,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@ -176,7 +176,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2832,8 +2842,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2834,8 +2844,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
@ -184,21 +184,21 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
- CurrentRenderPassColorSpace(),
+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()),
+ PATCH_CS(CurrentRenderPassColorSpace()),
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
/*adjust_src_white_level=*/draw_cache_.is_video_frame,
locked_quad.hdr_metadata());
if (current_program_->rounded_corner_rect_location() != -1) {
@@ -3661,7 +3671,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& src_color_space,
@@ -3666,7 +3676,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& dst_color_space,
bool adjust_src_white_level) {
bool adjust_src_white_level,
absl::optional<gfx::HDRMetadata> hdr_metadata) {
- DCHECK(dst_color_space.IsValid());
+ if (settings_->enable_color_correct_rendering) {
+ DCHECK(dst_color_space.IsValid());
+ }
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,
@@ -4040,9 +4052,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
if (adjust_src_white_level && src_color_space.IsHDR()) {
// TODO(b/183236148): consider using the destination's HDR static metadata
@@ -4050,9 +4062,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
}
@ -211,7 +211,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -4262,8 +4274,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -4272,8 +4284,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@ -222,14 +222,14 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -4453,3 +4465,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
@@ -4463,3 +4475,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
GLRenderer::OverlayTexture::~OverlayTexture() = default;
} // namespace viz
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973cc6a22afb 100644
index 262633bdb89ffefb78091788b4b48d23e0e473e6..69016f864405f87a5ee161b52b9dacf909c52949 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@ -241,7 +241,7 @@ index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973c
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 c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acbd435f677 100644
index aa5b91076df81cf32f6aa1e128073c278234a684..9e7f587deb1be9f6043784c6ad9a7dc934c264f3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -213,6 +213,7 @@
@ -252,7 +252,7 @@ index c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acb
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3237,6 +3238,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3313,6 +3314,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[] = {
@ -315,7 +315,7 @@ index f5751beeb390b556dde8598b67b5fc9270e6805b..b155ad47f19950602000cecba52b1176
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index e5fd0a36f83e14f13ad37525266076d791829900..f75d17d9506e7f9aad9f95a9a2026db4dda2706e 100644
index 4e22b4cf0bd06955af5fbac32db084f41d547545..087ec6df3e7cf53e0d79c7b3edb581dc426ff3a3 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -20,6 +20,7 @@

Просмотреть файл

@ -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 c4ba0addc40a9f9b304ae207b765a0ed6f1bcb45..2e21eb0b6fcb5de410e30617f1949590dc8427f2 100644
index 4f4e4c0af566570e276090558c8427531a370ff5..b613b7462c548061d14b14fb6ef9151f7cc2a7ac 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 @@
@@ -482,7 +482,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 b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afde3811def 100644
index 499d2ce54fa960f61bd91c040baa8a989d9b3dc1..f25796e28c6381cc1a844026f9a81e0ce9ddef0f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -712,6 +712,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -744,6 +744,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@ -20,10 +20,10 @@ index b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afd
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 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30846d99ff 100644
index fc32f198f1aa66d11fc51a793e9d0e495f5acc36..f508236c9ae6f85a90f2e14269ee8ae7bd3625bd 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -850,6 +850,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -855,6 +855,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
mojom::CreateFrameWidgetParamsPtr
BindAndGenerateCreateFrameWidgetParamsForNewWindow();
@ -34,7 +34,7 @@ index 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30
// |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 b8ae3c5d06c09139966accc3861e2c65d6310fb9..00de546240344c20548f05ff750a86223c9613ed 100644
index d8365d0848719b16c8a068dd62861d37e2b10938..f9accc80b305d361dae0874da774e05067438059 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -595,7 +595,7 @@ void RenderWidgetHostViewAura::HideImpl() {

Просмотреть файл

@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d1d4751ba 100644
index bf827d4e83fc3efb35de8dbb30f27bf3eef1394f..817824317183fa55fe1bc2aec224d4de6967e5a8 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1078,6 +1078,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1059,6 +1059,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@ -35,7 +35,7 @@ index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1124,6 +1125,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1105,6 +1106,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

Просмотреть файл

@ -11,14 +11,14 @@ 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 ba517758ddd044a32e9c364bd803e0090d19b8cb..23717632bad15eaaf34d9190d242724cc1a4a07b 100644
index 5193c3f4b1832bf0ccb070b91aa6439cd7e56571..d34db0be6911cc058828135b4873483a735586a9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2278,7 +2278,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
@@ -2328,7 +2328,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
}
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
- return GetWebFrame()->View()->GetWebPreferences();
- return GetWebView()->GetWebPreferences();
+ return render_view_->GetWebView()->GetWebPreferences();
}

Просмотреть файл

@ -19,7 +19,7 @@ index fb8bbb639f6b6d93581b4eb6500a54deb331f18d..71a5b130e2c956f4d43c9a5b6a21f887
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 82ec517dbd675ad8b4a78848b7d2a7f71512c2d5..4a44a9f5fe9ffa69ebd7bb10e02f7b6f8acdb21c 100644
index 42d093965aa6d10a2d5f17fb9e0561adb60a5a70..b0e7ccdb24a28abce941a690c914ee9f01963775 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {

Просмотреть файл

@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
of the default V8 allocator. This probably can't be usptreamed.
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
index 967ef1dffddfb4d6e30c7b97eacc099c70f4ef31..9c870947e2747c9c73bbf9a058a689b8b422f470 100644
index fa0e7faad9296b9be8d662324c52f40e502f2e38..a579b359c684ccd72dcbe43f40b4aa7b4779c36b 100644
--- a/gin/public/v8_platform.h
+++ b/gin/public/v8_platform.h
@@ -25,6 +25,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {

Просмотреть файл

@ -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 81acb80ef2a52b2133dcc59a1214723345095f61..634ef00866805f3953327f92f572e370ac56e015 100644
index f70cf0036d950a0fd5ccb2ea432f51231ca382f2..946c749fd69743fe1e4d3a3b724f7d16fbcd3685 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1140,6 +1140,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1141,6 +1141,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@ -63,10 +63,10 @@ index 22e155061860f6782b261205f6297c09f8c6e1fa..656d1de560a1db7ff4973a9e087fcb7c
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 6f830a84d20e39b802b44465882f9ae0627a0759..b425a47d5a70267418fee69b55080ac05328a0b5 100644
index 492a03d742702e2aaaf00cc77fdd53c8a8d968cd..30795a4ce31f22fe49511be96ba9865bc5ff8300 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -952,6 +952,9 @@ interface NetworkContext {
@@ -943,6 +943,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

Просмотреть файл

@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
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 ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5d2fc89cd 100644
index ac730780c3f643b7131b742bd8fb6fd34aae0d9b..4db50c1dc41b4b0bec636f885a1fad6a11c0b5b7 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -155,6 +155,7 @@
@ -23,7 +23,7 @@ index ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1787,6 +1788,16 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1788,6 +1789,16 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
prefs.translate_service_available);

Просмотреть файл

@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
whole bunch more useful!
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
index 002ee34ce9a1bbcbdeb5c54967a2f22b1444cc85..c22870137449bf55a62f74d702e25fa6547baca3 100644
index bacf27d57927dba10566b4c02ce12c6ed5c876c9..d0247e32a93447cfe3af286ae83bff958e6edcca 100644
--- a/third_party/blink/renderer/core/messaging/message_port.cc
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
@@ -158,6 +158,7 @@ void MessagePort::close() {
@@ -159,6 +159,7 @@ void MessagePort::close() {
Entangle(pipe.TakePort0());
}
closed_ = true;

Просмотреть файл

@ -26,10 +26,10 @@ index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2563c4566 100644
index 2ba7ea70d901b17c3f8f98cb93e2bc8a97ec8853..ad2dc2a217bdc08820fc5311a2bda08e42182620 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
SkColor GetUnprocessedSystemColor(ColorId color_id,
ColorScheme color_scheme) const;
@ -52,7 +52,7 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -577,6 +593,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -578,6 +594,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool forced_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
@ -61,10 +61,10 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
SEQUENCE_CHECKER(sequence_checker_);
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index ae908912cd5ea1b2cd43974e1b8ea1bc0c600042..d0a34eca1ded4cbba46fe1d0655a49018b667461 100644
index eafe512bc90d967eaadddc2e355c418ecd7dd83a..581de5b8a056dc1d529568e7c4c1f5f48555f579 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -749,6 +749,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -748,6 +748,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// ...unless --force-dark-mode was specified in which case caveat emptor.
if (InForcedColorsMode() && !IsForcedDarkMode())
return false;

Просмотреть файл

@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc
index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2aac77977 100644
index e43037d541ad5d387d71222d831e7119bbb7c278..d49b92f3605523c62cdc267b1424b06c345a0a8c 100644
--- a/media/blink/multibuffer_data_source.cc
+++ b/media/blink/multibuffer_data_source.cc
@@ -10,9 +10,11 @@
@ -48,12 +48,12 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
+ GetStreamingSchemes()->push_back(new_scheme);
+}
+
class MultibufferDataSource::ReadOperation {
class MultiBufferDataSource::ReadOperation {
public:
ReadOperation(int64_t position,
@@ -153,7 +167,14 @@ bool MultibufferDataSource::media_has_played() const {
@@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const {
bool MultibufferDataSource::AssumeFullyBuffered() const {
bool MultiBufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);
- return !url_data_->url().SchemeIsHTTPOrHTTPS();
+
@ -66,12 +66,12 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
+ return true;
}
void MultibufferDataSource::SetReader(MultiBufferReader* reader) {
void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {
diff --git a/media/blink/multibuffer_data_source.h b/media/blink/multibuffer_data_source.h
index 2f35c43811e98679c739d1d672fd6dce517ea24f..b598d58c26a12f0e97ecfcb611baf46a86af4a62 100644
index 1ee6944629ab348f327848f6bda8b521e9fc3db4..3c4dfcf25ec67a8ca1e3a2ae1941386990e63827 100644
--- a/media/blink/multibuffer_data_source.h
+++ b/media/blink/multibuffer_data_source.h
@@ -32,6 +32,8 @@ class BufferedDataSourceHost;
@@ -31,6 +31,8 @@ class BufferedDataSourceHost;
class MediaLog;
class MultiBufferReader;

Просмотреть файл

@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
This patch is used by Electron to implement spellchecker events.
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf42c791f5a 100644
index 340667d184550f09077c0c6afb3e0befc9f3044e..c60be9ac250466dc882d950c4ec64787c0c19053 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -482,6 +482,9 @@ void SpellcheckService::LoadDictionaries() {
@@ -466,6 +466,9 @@ void SpellcheckService::LoadDictionaries() {
std::make_unique<SpellcheckHunspellDictionary>(
dictionary, platform_spellcheck_language, context_, this));
hunspell_dictionaries_.back()->AddObserver(this);
@ -20,7 +20,7 @@ index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf4
hunspell_dictionaries_.back()->Load();
}
@@ -534,6 +537,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
@@ -518,6 +521,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
}

Просмотреть файл

@ -532,7 +532,7 @@ index 83a23404d1c029af6f7e7aa695bfe60e71d86fde..eef92d3366715774670ebcdcb76ad84d
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index 409115f95787e3cf037f762a33368b173441012f..45a7a1607b8711420ba4e1a5455a61fb7d8b75ac 100644
index 03ad7c39128fc408d576a23e595021ffa3238423..de1c1f6984f8d81081643415d1724bce333ca940 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -90,7 +90,6 @@ interface DisplayClient {
@ -567,10 +567,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467af7dabd2 100644
index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc497dcb66 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -80,6 +80,7 @@ class DisplayPrivate;
@@ -81,6 +81,7 @@ class DisplayPrivate;
class ExternalBeginFrameController;
} // namespace mojom
class ContextProvider;
@ -578,7 +578,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
class HostFrameSinkManager;
class LocalSurfaceId;
class RasterContextProvider;
@@ -136,6 +137,16 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@ -595,7 +595,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -171,6 +182,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -172,6 +183,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -605,7 +605,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -442,6 +456,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -443,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

Просмотреть файл

@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@github.com>
Date: Thu, 9 Jul 2020 11:16:30 -0400
Subject: fix: check IsSecureEventInputEnabled in constructor before setting
SetPasswordInputEnabled to true
It appears that macOS 12 has IsSecureEventInputEnabled set to true initially.
diff --git a/ui/base/cocoa/secure_password_input.mm b/ui/base/cocoa/secure_password_input.mm
index c9d003216ec51407d80b2c3ed0a77e747d203069..f10829d7fe369d2419bb1f0828d6d1ec7c8f57e1 100644
--- a/ui/base/cocoa/secure_password_input.mm
+++ b/ui/base/cocoa/secure_password_input.mm
@@ -41,7 +41,7 @@ void SetPasswordInputEnabled(bool enabled) {
namespace ui {
ScopedPasswordInputEnabler::ScopedPasswordInputEnabler() {
- if (!g_password_input_counter) {
+ if (!g_password_input_counter && !IsSecureEventInputEnabled()) {
SetPasswordInputEnabled(true);
}
++g_password_input_counter;

Просмотреть файл

@ -6,7 +6,7 @@ Subject: fix: export zlib symbols
This patch sets ZLIB_DLL so that we properly export zlib symbols.
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index d64cb38bcdab4fbf9449f259d4dd62d39edcbfe1..6e4cd5c43d98145df2eca6b1dbe6d0e4047c2750 100644
index 74ecbd19ae270e3fead8702187aa0c78d42fcc4d..72cb46657a800259ce6541164909694fd54a3aaf 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -301,6 +301,10 @@ component("zlib") {

Просмотреть файл

@ -8,31 +8,33 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
to users. We should try to upstream this.
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 5212e1547796cae0c2c2508e5c0fcdab18190895..db8b468eecca3e980075072e50863738c280e1a2 100644
index de9f77c4fe4dda9005e7211fba22c496008e6d98..28d401ae1ebb1d6f94d5069003d1bc5546e5449e 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1738,9 +1738,11 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// shown in the address bar), as opposed to one in for example a Prerender.
bool IsPrimaryFrameTree(const FrameTree& frame_tree) const;
@@ -1771,10 +1771,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// outermost frame trees in this WebContents.
std::vector<RenderFrameHostImpl*> GetOutermostMainFrames();
+ public:
// Called when the base::ScopedClosureRunner returned by
// IncrementCapturerCount() is destructed.
- void DecrementCapturerCount(bool stay_hidden, bool stay_awake);
+ void DecrementCapturerCount(bool stay_hidden, bool stay_awake) override;
+ private:
+ private:
// Calculates the PageVisibilityState for |visibility|, taking the capturing
// state into account.
PageVisibilityState CalculatePageVisibilityState(Visibility visibility) const;
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 3b7b5facc0cd2454a83f9034d63add1e684f438c..409bd016ee867d2e826feb441b6b8f15f56c0dd6 100644
index e4e70e4d378cf13eb00d7327b88e2501dcfc7f84..7c0d9ee9311de772f8966bacf7908480b89c7915 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -561,6 +561,7 @@ class WebContents : public PageNavigator,
const gfx::Size& capture_size,
@@ -582,6 +582,8 @@ class WebContents : public PageNavigator,
bool stay_hidden,
bool stay_awake) WARN_UNUSED_RESULT = 0;
+ virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0;
// Returns true if audio/screenshot/video is being captured by the embedder,
// as indicated by calls to IncrementCapturerCount().
+ virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0;
+
// Getter for the capture handle, which allows a captured application to
// opt-in to exposing information to its capturer(s).
virtual const blink::mojom::CaptureHandleConfig& GetCaptureHandleConfig() = 0;

Просмотреть файл

@ -10,10 +10,10 @@ them should they exist.
This will be upstreamed.
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 07fcfad6ecf676068d3f0b44f97e748d58b13016..f165eea20ca3b120f5fb499248d65fa7befc7686 100644
index 0fb5c91b8abcdd7e674251bafebfc2c51044ef77..8c134bae25afeb0dbbb6e33182f053bb34e2f978 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -82,6 +82,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
@@ -83,6 +83,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
// Returns true if the orientation was set.
bool SetOrientationIsLandscape(bool landscape);
@ -25,10 +25,10 @@ index 07fcfad6ecf676068d3f0b44f97e748d58b13016..f165eea20ca3b120f5fb499248d65fa7
// Returns true if duplex mode is set.
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index 1a52ea3cd11b3ec573cfef6f6f03ab39fcb998d6..c8a17ef24a4bb62fc03b361d5153acc8f0098c6b 100644
index 9f80fe6f10515849dd02d580db9852e6fbbbaa30..67f5b76a8141857ba02abd806341f06b07a4ebdc 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -189,7 +189,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -190,7 +190,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
!SetCollateInPrintSettings(settings_->collate()) ||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
!SetOutputColor(static_cast<int>(settings_->color())) ||
@ -38,7 +38,7 @@ index 1a52ea3cd11b3ec573cfef6f6f03ab39fcb998d6..c8a17ef24a4bb62fc03b361d5153acc8
return OnError();
}
}
@@ -342,6 +343,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -343,6 +344,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
return PMSetCopies(print_settings, copies, false) == noErr;
}
@ -100,7 +100,7 @@ index fe7fc797504dcc7097a3d79a2dab2c18de737048..20c63b1f657f2969850b31eaafdff7e5
} else {
// No need to bother, we don't know how many pages are available.
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
index 5e7dd30b97c4ca3e6f14636955791ab0c6b63d6d..11a521a5f261e8306a7159487ffad6e4f990a0b2 100644
index 62108f0eb91fd04235d29a5e010aa600f76f8288..0e21b30dbe3f6daca9dce6d2b89b063c13d044ee 100644
--- a/ui/gtk/printing/print_dialog_gtk.cc
+++ b/ui/gtk/printing/print_dialog_gtk.cc
@@ -238,6 +238,24 @@ void PrintDialogGtk::UpdateSettings(

Просмотреть файл

@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 6d84bf99d112eb2877cc1b022a90cee4d1043b0a..0b03f38856a6a0b7896b7432ad10d1ef8d92a34e 100644
index 2b89bf4e6073f4f4c7b8c6a6005efdaf64c7a7b5..9c507c6f227580fd0f8d717ca0b11a545eca6d98 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -2942,6 +2942,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2929,6 +2929,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@ -20,10 +20,10 @@ index 6d84bf99d112eb2877cc1b022a90cee4d1043b0a..0b03f38856a6a0b7896b7432ad10d1ef
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index c24c05c17e5511d247fb93a4f987dd852742b5a4..57fac275ce40087e8928df51f50f191e07690e42 100644
index 31414b7818ecb333be7cff85195d06c850202c6b..ec3a452d43a08fe9edca1073f8b1c56771c42e41 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -263,6 +263,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -265,6 +265,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

Просмотреть файл

@ -38,10 +38,10 @@ index eaf06bd895f3ed390d1b206b2dc5adcca5c87e72..6bd634c4a66999648c51b8867c0d9b0c
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index f4d6372c79a7e0b91df287be19494129c391d50d..7e247ee07de099a3cff1cdfdf2dabe207d3c648b 100644
index 8bac97b6809a1f09020db980790d538c8ff03033..5230314293c6970d99f3700ec616eb99f5fd5dbd 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -216,12 +216,14 @@ void SetV8FlagsFormatted(const char* format, ...) {
@@ -207,12 +207,14 @@ void SetV8FlagsFormatted(const char* format, ...) {
} // namespace
// static

Просмотреть файл

@ -40,7 +40,7 @@ index 9b75a03bb11bb9e9338017a1a287209bdb0636c5..aab43444bdb1a968d9c880028144ac81
// Update the GPU feature info. This updates the blocklist and enabled status
// of GPU rasterization. In the future this will be used for more features.
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 82c37883b0760e283e1539d3c7d14176a25e9bbd..d48f443c5ea0ebd7b42f23eb1ef72a31d6e2bb37 100644
index 420dbbdfab57b18edc0ea646acac6d9d8748471d..7f00895f75177016045cbd016bc55cbec0a5f4ee 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1082,6 +1082,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
@ -56,10 +56,10 @@ index 82c37883b0760e283e1539d3c7d14176a25e9bbd..d48f443c5ea0ebd7b42f23eb1ef72a31
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index 9fcaec43515ca2a488ddee08e9dd275c966a7d40..b8508a6c11d46a7f3c7e3143924ced78a2b3ddc0 100644
index c679229beae9440a9fc92f39be76a1d37065d586..a0468d452604a5dee05f5dd5d0bb6256d2808aea 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -76,6 +76,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
@@ -77,6 +77,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool VulkanRequested() const;
void PostCreateThreads();
void TerminateInfoCollectionGpuProcess();

Просмотреть файл

@ -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 c149ea34605b6640fffb0f84cf9dac3ab8fa2e49..11f211b65fddee011fedd0ff281a71549598d6b5 100644
index a67a4b93e9551d33c4daf419512598d56ef330f2..3a46809edea6ae0906d2591afc69e2db1259033a 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -765,6 +765,11 @@
@@ -781,6 +781,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 b264d431b0581fa88bd2a22a2736cf7c853cdb16..a4b29f3911b6c93732adbda61a2c92356cabd294 100644
index f993f92509620752c861e7ae447bc375f1453e80..4f562b30cbb6079ecf62c54e1538cca4140f497c 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 @@

Просмотреть файл

@ -95,7 +95,7 @@ index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db342
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index 73e450939f1232bb8f2e19067c15c1f465ca6745..a19db25096260258ae2debc16bc5612edd62e411 100644
index e301610a2d7cc0559e1bca7947f4f557b32b3c94..c98a6a1d02a607bb30869c14e915ed12f1941b91 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -16,7 +16,9 @@

Просмотреть файл

@ -44,7 +44,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index f20d8147d52df79b27e65036d947d3a8fbef93e4..f176e98283a86bd63109f3d2aa2754081d7bb4ed 100644
index def66d5040d17537decbfe596356ef11dc2471bd..f7b305c5916ee35a4f35a0051c38f9dfc3ed456d 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -559,10 +559,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@ -114,10 +114,10 @@ index 3116e9098aad4fab8d1f8d2bb74b2437548b3566..1bb3ed4c7ec4f03c2512c6321c016fac
// 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 e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed6f1bcb45 100644
index 9ac29edf10f8ffd2e1e4db549a7977d8f26e8c22..4f4e4c0af566570e276090558c8427531a370ff5 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -241,8 +241,10 @@
@@ -240,8 +240,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@ -128,7 +128,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1435,8 +1437,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1438,8 +1440,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@ -139,7 +139,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
return [GetInProcessNSView() window];
}
@@ -1480,9 +1484,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1483,9 +1487,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@ -151,7 +151,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -1976,12 +1982,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1979,12 +1985,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@ -167,10 +167,10 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index a7fd3c7812a65cd10a53a2e29e7dd50b0aa428e9..f19cba3289def3fbd70b6106f7c4491b320bf608 100644
index a6b721245a5b141b7ee3170b92335a5f89eaebb6..8a370c537f62ee2246f0d64ee1f1f1613e76bf29 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -328,6 +328,13 @@ component("base") {
@@ -320,6 +320,13 @@ component("base") {
]
}
@ -205,7 +205,7 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d3240977657751 100644
index c164c3a8b28172a5c6d3a82b7ffdb48222328e60..de717b3603158d7baf71e32ce37b6398e2f6590d 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -30,7 +30,9 @@
@ -218,7 +218,7 @@ index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d32409
@class NSView;
namespace remote_cocoa {
@@ -416,11 +418,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -418,11 +420,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
@ -233,7 +233,7 @@ index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d32409
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc2952249daf084 100644
index d20f9af87220533749bc4897f87c51f91ce1a091..564bcca78a451f6504d66f60e0a936ce934f2304 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -285,14 +285,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@ -259,7 +259,7 @@ index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc29522
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1173,6 +1181,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1193,6 +1201,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@ -267,7 +267,7 @@ index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc29522
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1180,14 +1189,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1200,14 +1209,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];

Просмотреть файл

@ -46,18 +46,18 @@ index 65adc773e82d99c5dd57d52e84a71e67d676be13..f5d0318c1c4fa036a233142cd6eea0a0
NSArray* node_array,
const LineIndexer* line_indexer) const {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
index 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008da713fc3c 100644
index 9e659cffb60ceec3d9f9ece23a524229e3eba565..36218d5179ea2f9935e1d8869f9205885c0bd6a4 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
@@ -177,6 +177,7 @@
if (property_name == "AXIndexForChildUIElement") { // UIElement
@@ -186,6 +186,7 @@
property_name == "AXTextMarkerRangeForUIElement") { // UIElement
return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
}
+#ifndef MAS_BUILD
if (property_name == "AXIndexForTextMarker") { // TextMarker
return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node));
}
@@ -184,6 +185,7 @@
@@ -193,6 +194,7 @@
return OptionalNSObject::NotNilOrError(
PropertyNodeToTextMarkerRange(arg_node));
}
@ -65,7 +65,7 @@ index 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008d
return OptionalNSObject::NotApplicable();
}
@@ -249,6 +251,7 @@
@@ -258,6 +260,7 @@
return uielement;
}
@ -73,7 +73,7 @@ index 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008d
id AttributeInvoker::DictNodeToTextMarker(
const AXPropertyNode& dictnode) const {
if (!dictnode.IsDict()) {
@@ -356,6 +359,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
@@ -365,6 +368,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom(
cocoa_node, range.focus()->text_offset(), range.focus()->affinity()));
}
@ -471,10 +471,10 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5
}
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fdac3c226c 100644
index 717daca205b64ddbaf138f88400683dafac1a270..50ce32674525567b24b387e64b27f815585e61a0 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -43,6 +43,7 @@
@@ -42,6 +42,7 @@
#include "device/bluetooth/bluetooth_socket_mac.h"
#include "device/bluetooth/public/cpp/bluetooth_address.h"
@ -482,7 +482,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
extern "C" {
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
@@ -56,6 +57,7 @@
@@ -55,6 +56,7 @@
// [4] https://support.apple.com/kb/PH25091
void IOBluetoothPreferenceSetControllerPowerState(int state);
}
@ -490,7 +490,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
namespace {
@@ -124,8 +126,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -123,8 +125,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@ -501,7 +501,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
low_energy_discovery_manager_(
@@ -356,8 +360,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -355,8 +359,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {

Просмотреть файл

@ -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 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a1214723345095f61 100644
index fa95b1744e46396013cdf8344b23933aacefc270..f70cf0036d950a0fd5ccb2ea432f51231ca382f2 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -117,6 +117,11 @@
@ -22,7 +22,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -375,6 +380,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
@@ -376,6 +381,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
} // namespace
@ -102,7 +102,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
@@ -574,6 +652,13 @@ void NetworkContext::SetClient(
@@ -575,6 +653,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@ -157,10 +157,10 @@ index 89451c626bee5a9970a1f77f2739ce03a01e6b30..22e155061860f6782b261205f6297c09
// 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 e24ec4cb3c49ade12be048d96aaca2f672fb292f..6f830a84d20e39b802b44465882f9ae0627a0759 100644
index 8b74f2f855eaed87c012fea690238e1c95978f71..492a03d742702e2aaaf00cc77fdd53c8a8d968cd 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -192,6 +192,17 @@ struct CTPolicy {
@@ -189,6 +189,17 @@ struct CTPolicy {
array<string> excluded_legacy_spkis;
};
@ -178,7 +178,7 @@ index e24ec4cb3c49ade12be048d96aaca2f672fb292f..6f830a84d20e39b802b44465882f9ae0
// Parameters for constructing a network context.
struct NetworkContextParams {
// Name used by memory tools to identify the context.
@@ -732,6 +743,9 @@ interface NetworkContext {
@@ -723,6 +734,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

Просмотреть файл

@ -54,7 +54,7 @@ index 19c2beb1f1949f0dc4466a8728f151c035544b24..f7aa5f94d6dea0e6b2c1107b8ef01600
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
index 9f6c32085b8808735a0cbf3502bcb1a186a200ba..ae6d2960a767bf9c20a1e14c93454cd544f4a2a3 100644
index 0c2117e90b32d42ff71ee63b2f4d85293cbb5cd1..11879ef5ae0971dbb0810cbdee29d7b8ef4c9509 100644
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@@ -139,7 +139,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
@ -108,10 +108,10 @@ index b195cb84d8bba3c51b04f8c32cf909d15bf34335..37528715db985d12771ba2dca86dcec8
const GURL& document_url,
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 fcb30910e0d473d5f67a823e68c5002a85b9c2f0..ec0f47781d42d55e907afd039e961a74ed9c7c9c 100644
index a107b15508da3ebcf30fad08f209847a2032e38d..5de57bd4a08e586251d26ede70e6b51ad61d2c42 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2169,7 +2169,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2266,7 +2266,7 @@ void RenderProcessHostImpl::CreateNotificationService(
document_url = rfh->GetLastCommittedURL();
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

Просмотреть файл

@ -7,13 +7,13 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it
usable from Electron.
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
index e90525fdee7b7f1e299e56899ddca51af93d7aa6..4afb696f57d83935dabd0abc97bfe80018b56977 100644
index 66e5a32ca6021a712a82d918a6dcb44039f71bf2..ce1559ea6020825ad0fa996e3148ff2744fa00c4 100644
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
@@ -7,17 +7,21 @@
#include <stddef.h>
#include "base/stl_util.h"
#include "base/cxx17_backports.h"
+#if 0
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
@ -154,7 +154,7 @@ index 56a23e8f41bb418d414f11af5797b30571d4cc2b..6f9f577f16de80dd2ab194b557bbd9ec
DISALLOW_COPY_AND_ASSIGN(PepperIsolatedFileSystemMessageFilter);
};
diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
index 7820a55f563d40865cd7bbf4a03e7f82db81043e..d9b1c4bc6abfa395782761455d4dd2e3105d7b14 100644
index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a611926acb2 100644
--- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
+++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
@@ -7,8 +7,13 @@
@ -169,40 +169,42 @@ index 7820a55f563d40865cd7bbf4a03e7f82db81043e..d9b1c4bc6abfa395782761455d4dd2e3
#include "components/pdf/renderer/pepper_pdf_host.h"
+#endif
#include "content/public/renderer/renderer_ppapi_host.h"
#include "pdf/buildflags.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
@@ -36,19 +41,10 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
@@ -37,6 +42,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
if (!host_->IsValidInstance(instance))
return nullptr;
- if (host_->GetPpapiHost()->permissions().HasPermission(
- ppapi::PERMISSION_FLASH)) {
- switch (message.type()) {
- case PpapiHostMsg_FlashFullscreen_Create::ID: {
- return std::make_unique<PepperFlashFullscreenHost>(host_, instance,
- resource);
- }
- }
- }
-
// TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
// We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
// rid of its use in PDF if possible.
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
+#if 0
if (host_->GetPpapiHost()->permissions().HasPermission(
ppapi::PERMISSION_FLASH) ||
host_->GetPpapiHost()->permissions().HasPermission(
@@ -75,7 +71,9 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
ppapi::PERMISSION_FLASH)) {
switch (message.type()) {
@@ -46,6 +52,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
}
}
}
+#endif
// TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
// We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
@@ -68,7 +75,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
}
}
-#if BUILDFLAG(ENABLE_PDF)
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
if (host_->GetPpapiHost()->permissions().HasPermission(
ppapi::PERMISSION_PDF)) {
switch (message.type()) {
@@ -79,6 +86,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
}
#endif
+#if 0
// Permissions for the following interfaces will be checked at the
// time of the corresponding instance's method calls. Currently these
// interfaces are available only for whitelisted apps which may not have
@@ -85,6 +83,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
@@ -88,6 +96,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
return std::make_unique<PepperUMAHost>(host_, instance, resource);
}
}

Просмотреть файл

@ -1,69 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexey Kuts <kruntuid@gmail.com>
Date: Fri, 26 Jul 2019 22:32:54 +0300
Subject: remove references to Profile from PreconnectManager
The PreconnectManager in Chrome only depends on Profile for testing purposes;
this patch removes that dependency so we can reuse it.
Ideally we would change this class in upstream to not depend on Profile.
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
index 7cbe5b3ebac99849dc784e1dc587b3a091abbf49..6de33ea6f7e452cdfbf3271827a943828e93fb8f 100644
--- a/chrome/browser/predictors/preconnect_manager.cc
+++ b/chrome/browser/predictors/preconnect_manager.cc
@@ -69,7 +69,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
PreresolveJob::~PreresolveJob() = default;
PreconnectManager::PreconnectManager(base::WeakPtr<Delegate> delegate,
- Profile* profile)
+ content::BrowserContext* profile)
: delegate_(std::move(delegate)),
profile_(profile),
inflight_preresolves_count_(0) {
@@ -329,11 +329,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
if (network_context_)
return network_context_;
+#if 0
if (profile_->AsTestingProfile()) {
// We're testing and |network_context_| wasn't set. Return nullptr to avoid
// hitting the network.
return nullptr;
}
+#endif
return profile_->GetDefaultStoragePartition()->GetNetworkContext();
}
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
index dbdde3dfd9bb160486a1d06f16ef86548798b61c..a4373ebdbe8bb833c3b782e3d3cb27a5116f976d 100644
--- a/chrome/browser/predictors/preconnect_manager.h
+++ b/chrome/browser/predictors/preconnect_manager.h
@@ -22,6 +22,10 @@
class Profile;
+namespace content {
+class BrowserContext;
+}
+
namespace network {
namespace mojom {
class NetworkContext;
@@ -145,7 +149,7 @@ class PreconnectManager {
bool success) {}
};
- PreconnectManager(base::WeakPtr<Delegate> delegate, Profile* profile);
+ PreconnectManager(base::WeakPtr<Delegate> delegate, content::BrowserContext* profile);
virtual ~PreconnectManager();
// Starts preconnect and preresolve jobs keyed by |url|.
@@ -210,7 +214,7 @@ class PreconnectManager {
network::mojom::NetworkContext* GetNetworkContext() const;
base::WeakPtr<Delegate> delegate_;
- Profile* const profile_;
+ content::BrowserContext* const profile_;
std::list<PreresolveJobId> queued_jobs_;
PreresolveJobMap preresolve_jobs_;
std::map<GURL, std::unique_ptr<PreresolveInfo>> preresolve_info_;

Просмотреть файл

@ -102,7 +102,7 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed138ed777c 100644
index 15dcd3179a2705ab87c525efe1a5210c07ffc17b..fc45f0449fc8bc24fe3bdc3571c9793c6789d36b 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -28,10 +28,10 @@
@ -143,10 +143,10 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
}
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -256,7 +260,9 @@ void UpdatePrintSettingsReplyOnIO(
@@ -236,7 +240,9 @@ void UpdatePrintSettingsReplyOnIO(
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(printer_query);
auto params = mojom::PrintPagesParams::New();
params->params = mojom::PrintParams::New();
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
- if (printer_query->last_status() == PrintingContext::OK) {
+ // We call update without first printing from defaults,
+ // so the last printer status will still be defaulted to PrintingContext::FAILED
@ -154,7 +154,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
RenderParamsFromPrintSettings(printer_query->settings(),
params->params.get());
params->params->document_cookie = printer_query->cookie();
@@ -382,12 +388,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
@@ -339,12 +345,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
: PrintManager(web_contents),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
@ -169,7 +169,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -395,7 +403,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
@@ -352,7 +360,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
@ -181,7 +181,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
DisconnectFromCurrentPrintJob();
// Don't print / print preview crashed tabs.
@@ -403,7 +414,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
@@ -360,7 +371,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
return false;
SetPrintingRFH(rfh);
@ -197,7 +197,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
return true;
}
@@ -524,9 +542,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
@@ -515,9 +533,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
void PrintViewManagerBase::UpdatePrintingEnabled() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// The Unretained() is safe because ForEachFrame() is synchronous.
@ -210,36 +210,37 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
}
void PrintViewManagerBase::NavigationStopped() {
@@ -643,12 +661,13 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -631,12 +649,13 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+#if 0 // Printing is always enabled.
if (!printing_enabled_.GetValue()) {
auto params = mojom::PrintParams::New();
GetDefaultPrintSettingsReply(std::move(callback), std::move(params));
GetDefaultPrintSettingsReply(std::move(callback),
mojom::PrintParams::New());
return;
}
-
+#endif
content::RenderFrameHost* render_frame_host =
print_manager_host_receivers_.GetCurrentTargetFrame();
@@ -665,11 +684,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
auto callback_wrapper =
base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply,
@@ -654,12 +673,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+#if 0 // Printing is always enabled.
if (!printing_enabled_.GetValue()) {
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
UpdatePrintSettingsReply(std::move(callback),
CreateEmptyPrintPagesParamsPtr(), false);
return;
}
-
+#endif
if (!job_settings.FindIntKey(kSettingPrinterType)) {
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
return;
@@ -709,7 +729,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
UpdatePrintSettingsReply(std::move(callback),
CreateEmptyPrintPagesParamsPtr(), false);
@@ -704,7 +724,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
PrintManager::PrintingFailed(cookie);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@ -248,7 +249,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
#endif
ReleasePrinterQuery();
@@ -721,6 +741,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
@@ -716,6 +736,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
}
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
@ -260,7 +261,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
l10n_util::GetStringUTF16(
@@ -790,9 +815,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
@@ -785,9 +810,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
content::NotificationService::NoDetails());
break;
}
@ -276,7 +277,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
NOTREACHED();
break;
}
@@ -901,8 +930,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -896,8 +925,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
DCHECK(!quit_inner_loop_);
DCHECK(query);
@ -289,7 +290,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
// We can't print if there is no renderer.
if (!web_contents()->GetMainFrame()->GetRenderViewHost() ||
@@ -923,8 +954,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -918,8 +949,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
/*source_id=*/"");
#endif
@ -298,7 +299,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
printing_succeeded_ = false;
return true;
}
@@ -973,14 +1002,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -968,14 +997,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@ -323,7 +324,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
// Don't close the worker thread.
print_job_ = nullptr;
}
@@ -1016,7 +1053,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -1011,7 +1048,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@ -333,7 +334,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
if (!cookie) {
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d9e722927 100644
index b19ee4414584d0e192ea6b4b91b4e2ed59aef51b..e67bf37ca58877639a724589ca911940fd04016e 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -38,6 +38,8 @@ class PrintJob;
@ -357,7 +358,7 @@ index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in |print_data| with settings specified in
@@ -216,9 +221,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -231,9 +236,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_ = nullptr;
@ -374,7 +375,7 @@ index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d
// 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 bea375f1c23fdb6efdd6e0f7801e7bd087ddb7a3..f74c70d1c535384df1849b2d2841b27f5d0b25c6 100644
index bfca294bd94763d7a661f9b424bbe1351f076030..a5b50dfbf2a64d87c5f9e632c0709bf5967c0f1e 100644
--- a/components/printing/common/print.mojom
+++ b/components/printing/common/print.mojom
@@ -271,7 +271,7 @@ interface PrintPreviewUI {
@ -387,7 +388,7 @@ index bea375f1c23fdb6efdd6e0f7801e7bd087ddb7a3..f74c70d1c535384df1849b2d2841b27f
// 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 f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a7e5d868f 100644
index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7efe71924 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -38,6 +38,7 @@
@ -518,7 +519,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
// Check if |this| is still valid.
if (!self)
return;
@@ -2129,7 +2170,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2128,7 +2169,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
}
@ -529,7 +530,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
mojom::PrintPagesParams settings;
settings.params = mojom::PrintParams::New();
GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
@@ -2153,12 +2196,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -2152,12 +2195,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@ -548,7 +549,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
notify_browser_of_print_failure_ = false;
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
return false;
@@ -2529,18 +2574,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
@@ -2528,18 +2573,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
}
bool PrintRenderFrameHelper::CheckForCancel() {

Просмотреть файл

@ -62,10 +62,10 @@ index 083640808cd6a4a5e6e65d715c77ef58d090ba1e..d7d2fe4e0ada417769cbfe8390b8e2b1
OP(kColorId_ThrobberSpinningColor), \
OP(kColorId_ThrobberWaitingColor), \
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 5e1dcf9487470986d771b7777033be2c32677962..ae908912cd5ea1b2cd43974e1b8ea1bc0c600042 100644
index a02662fb29ff297a55afdb0d6e2dc336137a749d..eafe512bc90d967eaadddc2e355c418ecd7dd83a 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -659,6 +659,18 @@ absl::optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
@@ -658,6 +658,18 @@ absl::optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
case kColorId_ThrobberWaitingColor:
return system_colors_[SystemThemeColor::kGrayText];

Просмотреть файл

@ -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 c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc7489f02ebc 100644
index 24933acc8579ce057178ad36c42069c38df20581..483cdbe9abb299419afebe1f3abaf5d84372fadf 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 @@
@ -18,8 +18,8 @@ index c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc74
+#include "content/common/cursors/webcursor.h"
#include "content/public/common/drop_data.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/blink/public/common/input/web_input_event.h"
@@ -255,6 +256,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
#include "third_party/abseil-cpp/absl/types/optional.h"
@@ -256,6 +257,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
// Returns the associated RenderViewHostDelegateView*, if possible.
virtual RenderViewHostDelegateView* GetDelegateView();
@ -30,10 +30,10 @@ index c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc74
// 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 738920fccc048d0a4471dac407619afde3811def..a75064854fb28a1b736f66c8dfa08435d7895e7b 100644
index f25796e28c6381cc1a844026f9a81e0ce9ddef0f..158dcb7306dd41d8053b1d07780393d62e659df3 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1946,6 +1946,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
@@ -1978,6 +1978,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_)
view_->UpdateCursor(WebCursor(cursor));
@ -43,10 +43,10 @@ index 738920fccc048d0a4471dac407619afde3811def..a75064854fb28a1b736f66c8dfa08435
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 04e320e1b0150dbf7edd42be88c3ab6ceaecf46f..e240f8a32b1f7f69afa992861c995e668695c51f 100644
index 4728f584f537b6496a437511873028c0a454a1d2..6cbe9f509390367bf97bfbf1f2ebd58215e74db3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4201,6 +4201,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -4317,6 +4317,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -59,10 +59,10 @@ index 04e320e1b0150dbf7edd42be88c3ab6ceaecf46f..e240f8a32b1f7f69afa992861c995e66
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 6e731f45502bb6d8e2f65652fccb883978ad3260..5212e1547796cae0c2c2508e5c0fcdab18190895 100644
index f5318f70def9bfd73983b8a91d7cd80e3b4fa61f..de9f77c4fe4dda9005e7211fba22c496008e6d98 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -971,6 +971,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
blink::mojom::FrameVisibility visibility) override;
void SendScreenRects() override;
TextInputManager* GetTextInputManager() override;
@ -71,7 +71,7 @@ index 6e731f45502bb6d8e2f65652fccb883978ad3260..5212e1547796cae0c2c2508e5c0fcdab
bool IsShowingContextMenuOnPage() const override;
void DidChangeScreenOrientation() override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 3ca079e32b4aeb83440625a7bf1efbde1369a99f..df6ae54d10efc4abbd2e3d87774977d1f593ac01 100644
index 6c2b6e48f769ddd4b0e872287e0e654288ff2674..a0815fefbfdd9a9fec2af162e9721749e00a0f85 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -13,6 +13,7 @@
@ -82,7 +82,7 @@ index 3ca079e32b4aeb83440625a7bf1efbde1369a99f..df6ae54d10efc4abbd2e3d87774977d1
#include "content/public/browser/allow_service_worker_result.h"
#include "content/public/browser/cookie_access_details.h"
#include "content/public/browser/navigation_controller.h"
@@ -413,6 +414,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
@@ -423,6 +424,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
// Invoked every time the WebContents changes visibility.
virtual void OnVisibilityChanged(Visibility visibility) {}

Просмотреть файл

@ -9,10 +9,10 @@ change to move more of //chrome spellchecker logic into //components so
that we can further separate our dependency from //chrome.
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index 89edb0f8372b3606f2dd38980d5cc40d5b9d4a81..d511c9085253ebfba69ba37f41193d15638bb10f 100644
index 1d426c35c539064e899b848d0ccc19306f1c4db8..2b7aa1add57dccbcbf8202cead5b7d2d5a174270 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -76,7 +76,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs(
@@ -71,7 +71,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs(
content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {

Просмотреть файл

@ -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 d504e82794cb50fb81dd9a568644254115c03e5d..d67f775b1bb6ca12055aed68947e0ca1591d4cfc 100644
index ec0d6b0acbc8945eaeddc24b1b7fc89cba575c5b..43412e27c8a515e3889f1639fd560537de35a403 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -664,6 +664,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@ -24,7 +24,7 @@ index d504e82794cb50fb81dd9a568644254115c03e5d..d67f775b1bb6ca12055aed68947e0ca1
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 8cc591cfc75a02b371293b1edc6d9fad8d4ea36d..2fa7e2f5d1280e9b933bd0b2524ddea50f7b4de0 100644
index 9e20702506673230590177add5845d09b2def665..31b167720f702576a42a169fd6c094635424ecfa 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -24,8 +24,10 @@
@ -50,7 +50,7 @@ index 8cc591cfc75a02b371293b1edc6d9fad8d4ea36d..2fa7e2f5d1280e9b933bd0b2524ddea5
class WebCursor;
class WebContentsAccessibility;
class DelegatedFrameHost;
@@ -145,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -137,6 +141,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
bool show_reason_unoccluded,
bool show_reason_bfcache_restore) final;
@ -60,7 +60,7 @@ index 8cc591cfc75a02b371293b1edc6d9fad8d4ea36d..2fa7e2f5d1280e9b933bd0b2524ddea5
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -307,6 +314,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -299,6 +306,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

Просмотреть файл

@ -10,10 +10,10 @@ 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 dd8c6b1d7e6a0ac5e7a069c96dcffe379c1b69bf..0d21dd75e419b482b1bd54fefaf07b96c795f71c 100644
index e92152bde1b04ad5623c7f5684be80d211c7f20b..cf0be922f1054824103f626ddabc86e7e214f7ea 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
@@ -152,6 +152,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@ -29,7 +29,7 @@ index dd8c6b1d7e6a0ac5e7a069c96dcffe379c1b69bf..0d21dd75e419b482b1bd54fefaf07b96
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -574,6 +583,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -575,6 +584,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -39,7 +39,7 @@ index dd8c6b1d7e6a0ac5e7a069c96dcffe379c1b69bf..0d21dd75e419b482b1bd54fefaf07b96
return [self acceptsMouseEventsWhenInactive];
}
@@ -649,6 +661,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -650,6 +662,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@ -50,7 +50,7 @@ index dd8c6b1d7e6a0ac5e7a069c96dcffe379c1b69bf..0d21dd75e419b482b1bd54fefaf07b96
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -997,6 +1013,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -998,6 +1014,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);

Просмотреть файл

@ -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 931fb7579a9d5a7b6e378ddc2d823e81ce7b8a6a..59f3a36836d6dd3687e64b85198cd7100e8272f3 100644
index 039bf6ff05e45e62e0e1595cedec6c816d8c72e5..75868925758560075e95b79a7473e635b23127d5 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1531,7 +1531,7 @@ if (is_chrome_branded && !is_android) {
@@ -1534,7 +1534,7 @@ if (is_chrome_branded && !is_android) {
}
}
@ -64,7 +64,7 @@ index 931fb7579a9d5a7b6e378ddc2d823e81ce7b8a6a..59f3a36836d6dd3687e64b85198cd710
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1559,6 +1559,12 @@ if (!is_android) {
@@ -1562,6 +1562,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 2ac02aabeb0689e70f842a98eec132f220b9810f..ab9f4655933326cf2197a73a1672781792bfbcb4 100644
index 21bc479c64b31293c498391da3ebcfdfe0bde9c8..f7e2abfa217c2e29ecee47c6884dab7754ba119f 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1300,6 +1300,24 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
@@ -1312,6 +1312,24 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
#endif
}
@ -88,10 +88,10 @@ index 529e597b572854cbf56bb45d9554549e51e519f4..f3dd10a3b30c89a02acc499279660d97
// |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 0f13101c719e6f43cfc5d281d0f6f345d475744d..ba517758ddd044a32e9c364bd803e0090d19b8cb 100644
index cfc895ca8ce72655df5862d917a3954009930c4c..5193c3f4b1832bf0ccb070b91aa6439cd7e56571 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4913,6 +4913,22 @@ void RenderFrameImpl::BeginNavigation(
@@ -5034,6 +5034,22 @@ 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 57269d67faaf9ecb43759c8d489971c4c8ef3df3..3da6525282e19eb0ea229ea24b101171fdeb2391 100644
index a61bf4dbeae9846b834372c734118119bf91e873..b504864915483ea4221945acd9a9e1fee2f72482 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1250,7 +1250,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1258,7 +1258,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

Просмотреть файл

@ -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 ec0f47781d42d55e907afd039e961a74ed9c7c9c..c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7 100644
index 5de57bd4a08e586251d26ede70e6b51ad61d2c42..aa5b91076df81cf32f6aa1e128073c278234a684 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -392,10 +392,18 @@ class RendererSandboxedProcessLauncherDelegate
@@ -422,10 +422,18 @@ class RendererSandboxedProcessLauncherDelegate
public:
RendererSandboxedProcessLauncherDelegate() = default;
@ -44,7 +44,7 @@ index ec0f47781d42d55e907afd039e961a74ed9c7c9c..c54084b7b1b7b3459a4b34f4afc0891d
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
base::CommandLine::StringType renderer_prefix =
@@ -413,6 +421,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -443,6 +451,11 @@ class RendererSandboxedProcessLauncherDelegate
sandbox::policy::SandboxType GetSandboxType() override {
return sandbox::policy::SandboxType::kRenderer;
}
@ -56,7 +56,7 @@ index ec0f47781d42d55e907afd039e961a74ed9c7c9c..c54084b7b1b7b3459a4b34f4afc0891d
};
#if defined(OS_WIN)
@@ -423,6 +436,9 @@ class RendererSandboxedProcessLauncherDelegateWin
@@ -453,6 +466,9 @@ class RendererSandboxedProcessLauncherDelegateWin
RendererSandboxedProcessLauncherDelegateWin(base::CommandLine* cmd_line)
: renderer_code_integrity_enabled_(
GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) {
@ -66,7 +66,7 @@ index ec0f47781d42d55e907afd039e961a74ed9c7c9c..c54084b7b1b7b3459a4b34f4afc0891d
if (cmd_line->HasSwitch(switches::kJavaScriptFlags)) {
std::string js_flags =
cmd_line->GetSwitchValueASCII(switches::kJavaScriptFlags);
@@ -1887,9 +1903,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1984,9 +2000,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
cmd_line.get());

Просмотреть файл

@ -1,288 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Mon, 10 May 2021 17:10:25 -0700
Subject: support runtime configurable key storage on linux (os_crypto)
This modifies the OsCrypt::Config struct used on linux to support
runtime configurable application names which are used in the Keyring and
LibSecret implementations of os_crypt on linux.
Change-Id: Ifc287b589f118da8fcd5afaf39e5ba7ffe46f5fd
diff --git a/components/os_crypt/key_storage_config_linux.h b/components/os_crypt/key_storage_config_linux.h
index a856604756aa65c52171a9eff84ba2b316d8609c..72c16682e5df615ab84f67af66cc36c2b76c30e3 100644
--- a/components/os_crypt/key_storage_config_linux.h
+++ b/components/os_crypt/key_storage_config_linux.h
@@ -26,6 +26,12 @@ struct COMPONENT_EXPORT(OS_CRYPT) Config {
std::string store;
// The product name to use for permission prompts.
std::string product_name;
+ // The application name to store the key under. For Chromium/Chrome builds
+ // leave this unset and it will default correctly. This config option is
+ // for embedders to provide their application name in place of "Chromium".
+ // Only used when the allow_runtime_configurable_key_storage feature is
+ // enabled.
+ std::string application_name;
// A runner on the main thread for gnome-keyring to be called from.
// TODO(crbug/466975): Libsecret and KWallet don't need this. We can remove
// this when we stop supporting keyring.
diff --git a/components/os_crypt/key_storage_keyring.cc b/components/os_crypt/key_storage_keyring.cc
index 29720b8e8ff81791970e054050b37bbc5f338eb3..3ad654cf4a893f497ac4567aea77f8d1f2e1525f 100644
--- a/components/os_crypt/key_storage_keyring.cc
+++ b/components/os_crypt/key_storage_keyring.cc
@@ -15,12 +15,6 @@
namespace {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
-const char kApplicationName[] = "chrome";
-#else
-const char kApplicationName[] = "chromium";
-#endif
-
const GnomeKeyringPasswordSchema kSchema = {
GNOME_KEYRING_ITEM_GENERIC_SECRET,
{{"application", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING}, {nullptr}}};
@@ -28,8 +22,10 @@ const GnomeKeyringPasswordSchema kSchema = {
} // namespace
KeyStorageKeyring::KeyStorageKeyring(
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner)
- : main_thread_runner_(main_thread_runner) {}
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
+ std::string application_name)
+ : main_thread_runner_(main_thread_runner),
+ application_name_(std::move(application_name)) {}
KeyStorageKeyring::~KeyStorageKeyring() {}
@@ -49,7 +45,8 @@ absl::optional<std::string> KeyStorageKeyring::GetKeyImpl() {
gchar* password_c = nullptr;
GnomeKeyringResult result =
GnomeKeyringLoader::gnome_keyring_find_password_sync_ptr(
- &kSchema, &password_c, "application", kApplicationName, nullptr);
+ &kSchema, &password_c, "application", application_name_.c_str(),
+ nullptr);
if (result == GNOME_KEYRING_RESULT_OK) {
password = password_c;
GnomeKeyringLoader::gnome_keyring_free_password_ptr(password_c);
@@ -71,7 +68,7 @@ absl::optional<std::string> KeyStorageKeyring::AddRandomPasswordInKeyring() {
GnomeKeyringResult result =
GnomeKeyringLoader::gnome_keyring_store_password_sync_ptr(
&kSchema, nullptr /* default keyring */, KeyStorageLinux::kKey,
- password.c_str(), "application", kApplicationName, nullptr);
+ password.c_str(), "application", application_name_.c_str(), nullptr);
if (result != GNOME_KEYRING_RESULT_OK) {
VLOG(1) << "OSCrypt failed to store generated password to gnome-keyring";
return absl::nullopt;
diff --git a/components/os_crypt/key_storage_keyring.h b/components/os_crypt/key_storage_keyring.h
index 26a3f587b49cdea3e4913ce0e08eeade6d1853a0..598c8b8ad35efa002a29dd98c9cba98453bef5ac 100644
--- a/components/os_crypt/key_storage_keyring.h
+++ b/components/os_crypt/key_storage_keyring.h
@@ -20,8 +20,9 @@ class SingleThreadTaskRunner;
// Specialisation of KeyStorageLinux that uses Libsecret.
class COMPONENT_EXPORT(OS_CRYPT) KeyStorageKeyring : public KeyStorageLinux {
public:
- explicit KeyStorageKeyring(
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner);
+ KeyStorageKeyring(
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
+ std::string application_name);
~KeyStorageKeyring() override;
protected:
@@ -37,6 +38,8 @@ class COMPONENT_EXPORT(OS_CRYPT) KeyStorageKeyring : public KeyStorageLinux {
// Keyring calls need to originate from the main thread.
scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
+ const std::string application_name_;
+
DISALLOW_COPY_AND_ASSIGN(KeyStorageKeyring);
};
diff --git a/components/os_crypt/key_storage_keyring_unittest.cc b/components/os_crypt/key_storage_keyring_unittest.cc
index aba31971dc33f4b60c2847fd037c419baf084eaa..93fc216d54168eb3fd7e9f1b23f71a77f6e6735d 100644
--- a/components/os_crypt/key_storage_keyring_unittest.cc
+++ b/components/os_crypt/key_storage_keyring_unittest.cc
@@ -130,7 +130,7 @@ class GnomeKeyringTest : public testing::Test {
};
GnomeKeyringTest::GnomeKeyringTest()
- : task_runner_(new base::TestSimpleTaskRunner()), keyring_(task_runner_) {
+ : task_runner_(new base::TestSimpleTaskRunner()), keyring_(task_runner_, "chromium") {
MockGnomeKeyringLoader::ResetForOSCrypt();
}
diff --git a/components/os_crypt/key_storage_libsecret.cc b/components/os_crypt/key_storage_libsecret.cc
index 0857cc1874f4153541c7f21dd8cc6bdc1d59b39d..ccc60522791508f02dc759e55e781dbb9627967b 100644
--- a/components/os_crypt/key_storage_libsecret.cc
+++ b/components/os_crypt/key_storage_libsecret.cc
@@ -14,12 +14,6 @@
namespace {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
-const char kApplicationName[] = "chrome";
-#else
-const char kApplicationName[] = "chromium";
-#endif
-
const SecretSchema kKeystoreSchemaV2 = {
"chrome_libsecret_os_crypt_password_v2",
SECRET_SCHEMA_DONT_MATCH_NAME,
@@ -64,6 +58,9 @@ void AnalyseKeyHistory(GList* secret_items) {
} // namespace
+KeyStorageLibsecret::KeyStorageLibsecret(std::string application_name)
+ : application_name_(std::move(application_name)) {}
+
absl::optional<std::string>
KeyStorageLibsecret::AddRandomPasswordInLibsecret() {
std::string password;
@@ -71,7 +68,7 @@ KeyStorageLibsecret::AddRandomPasswordInLibsecret() {
GError* error = nullptr;
bool success = LibsecretLoader::secret_password_store_sync(
&kKeystoreSchemaV2, nullptr, KeyStorageLinux::kKey, password.c_str(),
- nullptr, &error, "application", kApplicationName, nullptr);
+ nullptr, &error, "application", application_name_.c_str(), nullptr);
if (error) {
VLOG(1) << "Libsecret lookup failed: " << error->message;
g_error_free(error);
@@ -88,7 +85,7 @@ KeyStorageLibsecret::AddRandomPasswordInLibsecret() {
absl::optional<std::string> KeyStorageLibsecret::GetKeyImpl() {
LibsecretAttributesBuilder attrs;
- attrs.Append("application", kApplicationName);
+ attrs.Append("application", application_name_);
LibsecretLoader::SearchHelper helper;
helper.Search(&kKeystoreSchemaV2, attrs.Get(),
diff --git a/components/os_crypt/key_storage_libsecret.h b/components/os_crypt/key_storage_libsecret.h
index 4759d076ea0017a41b398491dd24dde76a61e463..5292e21b8e7e1a873591e474571adb5b4ed8fe16 100644
--- a/components/os_crypt/key_storage_libsecret.h
+++ b/components/os_crypt/key_storage_libsecret.h
@@ -15,7 +15,7 @@
// Specialisation of KeyStorageLinux that uses Libsecret.
class COMPONENT_EXPORT(OS_CRYPT) KeyStorageLibsecret : public KeyStorageLinux {
public:
- KeyStorageLibsecret() = default;
+ explicit KeyStorageLibsecret(std::string application_name);
~KeyStorageLibsecret() override = default;
protected:
@@ -26,6 +26,8 @@ class COMPONENT_EXPORT(OS_CRYPT) KeyStorageLibsecret : public KeyStorageLinux {
private:
absl::optional<std::string> AddRandomPasswordInLibsecret();
+ const std::string application_name_;
+
DISALLOW_COPY_AND_ASSIGN(KeyStorageLibsecret);
};
diff --git a/components/os_crypt/key_storage_libsecret_unittest.cc b/components/os_crypt/key_storage_libsecret_unittest.cc
index ebe9a6b4bcbf748cd7f7e5fcf941b78ab1835749..a17bbc1f8061b33d55444919f546256d63bc809b 100644
--- a/components/os_crypt/key_storage_libsecret_unittest.cc
+++ b/components/os_crypt/key_storage_libsecret_unittest.cc
@@ -236,7 +236,7 @@ class LibsecretTest : public testing::Test {
};
TEST_F(LibsecretTest, LibsecretRepeats) {
- KeyStorageLibsecret libsecret;
+ KeyStorageLibsecret libsecret("chromium");
MockLibsecretLoader::ResetForOSCrypt();
g_password_store.Pointer()->SetPassword("initial password");
absl::optional<std::string> password = libsecret.GetKey();
@@ -248,7 +248,7 @@ TEST_F(LibsecretTest, LibsecretRepeats) {
}
TEST_F(LibsecretTest, LibsecretCreatesRandomised) {
- KeyStorageLibsecret libsecret;
+ KeyStorageLibsecret libsecret("chromium");
MockLibsecretLoader::ResetForOSCrypt();
absl::optional<std::string> password = libsecret.GetKey();
MockLibsecretLoader::ResetForOSCrypt();
diff --git a/components/os_crypt/key_storage_linux.cc b/components/os_crypt/key_storage_linux.cc
index 8feb147c96baa2f853a647eb648297b4b747f515..53b1903ff04043e2d058deda086e116a0e00fdca 100644
--- a/components/os_crypt/key_storage_linux.cc
+++ b/components/os_crypt/key_storage_linux.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/nix/xdg_util.h"
+#include "base/no_destructor.h"
#include "base/sequenced_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/task_runner_util.h"
@@ -147,12 +148,29 @@ std::unique_ptr<KeyStorageLinux> KeyStorageLinux::CreateService(
std::unique_ptr<KeyStorageLinux> KeyStorageLinux::CreateServiceInternal(
os_crypt::SelectedLinuxBackend selected_backend,
const os_crypt::Config& config) {
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ static const base::NoDestructor<std::string> kDefaultApplicationName("chrome");
+#else
+ static const base::NoDestructor<std::string> kDefaultApplicationName("chromium");
+#endif
+
std::unique_ptr<KeyStorageLinux> key_storage;
+#if defined(USE_LIBSECRET) || defined(USE_KEYRING)
+#if defined(ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE)
+ std::string application_name = config.application_name;
+ if (application_name.empty()) {
+ application_name = *kDefaultApplicationName;
+ }
+#else
+ std::string application_name = *kDefaultApplicationName;
+#endif
+#endif
+
#if defined(USE_LIBSECRET)
if (selected_backend == os_crypt::SelectedLinuxBackend::GNOME_ANY ||
selected_backend == os_crypt::SelectedLinuxBackend::GNOME_LIBSECRET) {
- key_storage = std::make_unique<KeyStorageLibsecret>();
+ key_storage = std::make_unique<KeyStorageLibsecret>(std::move(application_name));
if (key_storage->WaitForInitOnTaskRunner()) {
VLOG(1) << "OSCrypt using Libsecret as backend.";
return key_storage;
@@ -164,8 +182,8 @@ std::unique_ptr<KeyStorageLinux> KeyStorageLinux::CreateServiceInternal(
#if defined(USE_KEYRING)
if (selected_backend == os_crypt::SelectedLinuxBackend::GNOME_ANY ||
selected_backend == os_crypt::SelectedLinuxBackend::GNOME_KEYRING) {
- key_storage =
- std::make_unique<KeyStorageKeyring>(config.main_thread_runner);
+ key_storage = std::make_unique<KeyStorageKeyring>(config.main_thread_runner,
+ std::move(application_name));
if (key_storage->WaitForInitOnTaskRunner()) {
VLOG(1) << "OSCrypt using Keyring as backend.";
return key_storage;
diff --git a/services/network/network_service.cc b/services/network/network_service.cc
index 02c8af43258f6a31f3cc667e73f55f8f67330b51..bea06f626cc2b302ca8a25c753c37cea0d4c9e8c 100644
--- a/services/network/network_service.cc
+++ b/services/network/network_service.cc
@@ -622,6 +622,7 @@ void NetworkService::SetCryptConfig(mojom::CryptConfigPtr crypt_config) {
auto config = std::make_unique<os_crypt::Config>();
config->store = crypt_config->store;
config->product_name = crypt_config->product_name;
+ config->application_name = crypt_config->application_name;
config->main_thread_runner = base::ThreadTaskRunnerHandle::Get();
config->should_use_preference = crypt_config->should_use_preference;
config->user_data_path = crypt_config->user_data_path;
diff --git a/services/network/public/mojom/network_service.mojom b/services/network/public/mojom/network_service.mojom
index 3a1abc4d1b64ad9480f5218cd1de8fd61a064f34..0edbe59d3a70b5bca759cd8a726baded6b81ea71 100644
--- a/services/network/public/mojom/network_service.mojom
+++ b/services/network/public/mojom/network_service.mojom
@@ -99,6 +99,13 @@ struct CryptConfig {
// The product name to use for permission prompts.
string product_name;
+ // The application name to store the crypto key against. For Chromium/Chrome
+ // builds leave this unset and it will default correctly. This config option
+ // is for embedders to provide their application name in place of "Chromium".
+ // Only used when the allow_runtime_configurable_key_storage feature is
+ // enabled
+ string application_name;
+
// Controls whether preference on using or ignoring backends is used.
bool should_use_preference;

Просмотреть файл

@ -6,7 +6,7 @@ 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 d83a80204cd6cb87333208d1d4edf9b355d1cdb8..7158a7d827255108a288708e51f99d9ad357c6ec 100644
index 7bdb5a0e439ab931d0656265cedf298ca4a34d13..a0098d0ca4256f22138f857fad920725853f998d 100644
--- a/ui/gtk/BUILD.gn
+++ b/ui/gtk/BUILD.gn
@@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") {

Просмотреть файл

@ -6,7 +6,7 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch
Unsandboxed ppapi processes should skip zygote.
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 4493794a46154d870381de20b5cf49309c2102d2..733bb1b86c42e973a1dfea395749989859089024 100644
index bebe91496db1822031001f00194952e694018c10..e59de720fb4270f33c8abf34cb2d684610ec1285 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -111,6 +111,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate

Просмотреть файл

@ -9,10 +9,10 @@ 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 87792fc94a84ed3336c70d431516150a91ec5928..15a8243ca9cfeca6b4eef631881564e0ba07e50d 100644
index b21c2fa17d71a05a2b363cf31bbaaae82a3dc7aa..5659873ba2fc154eba45d55596c239b27912f509 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2783,6 +2783,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2882,6 +2882,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
params.main_frame_name);
@ -25,7 +25,7 @@ index 87792fc94a84ed3336c70d431516150a91ec5928..15a8243ca9cfeca6b4eef631881564e0
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2793,6 +2799,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2892,6 +2898,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}
@ -34,10 +34,10 @@ index 87792fc94a84ed3336c70d431516150a91ec5928..15a8243ca9cfeca6b4eef631881564e0
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 84c271d015931322c4c3a259dc3db64655502bdf..3b7b5facc0cd2454a83f9034d63add1e684f438c 100644
index 67006dfc4c4fab7494d54fee35ab72a38035d4ee..e4e70e4d378cf13eb00d7327b88e2501dcfc7f84 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -84,10 +84,13 @@ class BrowserContext;
@@ -85,10 +85,13 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@ -51,7 +51,7 @@ index 84c271d015931322c4c3a259dc3db64655502bdf..3b7b5facc0cd2454a83f9034d63add1e
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -220,6 +223,10 @@ class WebContents : public PageNavigator,
@@ -221,6 +224,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
network::mojom::WebSandboxFlags starting_sandbox_flags;

Просмотреть файл

@ -26,10 +26,10 @@ index 601633452b5f9afe64d98833057ac86de3a05650..529e597b572854cbf56bb45d9554549e
// 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 d5ebc982f6cda74fd9a661d288168d92bdf7ba9f..370db9d18e3c5f26d8913cbc74edf3a66a19744b 100644
index 074db7fba98fec0a31ee9474bf24647df3929a26..37a92ce1c7a17a2c1d141e71fe7ab97d47c241fc 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -924,6 +924,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -43,10 +43,10 @@ index d5ebc982f6cda74fd9a661d288168d92bdf7ba9f..370db9d18e3c5f26d8913cbc74edf3a6
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 4b739453cffc3ffc69536383adf9b0de3fe16b2a..a53ac812332257d775eded80c884b24ec68a5b89 100644
index 6ce06a917f95d662954c60c9144a59c004bd6c9c..e38a96a3b9665cc832fe9c24493a335888253996 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -200,6 +200,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -205,6 +205,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -55,10 +55,10 @@ index 4b739453cffc3ffc69536383adf9b0de3fe16b2a..a53ac812332257d775eded80c884b24e
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 34308ebf0478b148e72c1c858e7aff180fa47248..aa5135f77b66188b435a5727c0c00da6ed6db99e 100644
index 293b575414d01ed03e7de08175834dee98117d11..4e7767748d705c79ecd6d4cdf3982185e7bac3bd 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -715,6 +715,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -727,6 +727,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -67,7 +67,7 @@ index 34308ebf0478b148e72c1c858e7aff180fa47248..aa5135f77b66188b435a5727c0c00da6
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index f32e4fc35c6516c475f355086a1d3fb187ac6065..4381574047459ff8d88653e58ad8f3c088aaf138 100644
index 13420144484a55dab439cf32475b6681b783cc10..b277c8632e17cbb7afcc60fddd0edd757c6580fd 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -737,6 +737,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {

Просмотреть файл

@ -35,10 +35,10 @@ index f3dd10a3b30c89a02acc499279660d975a9a2de8..7a016ffc9bcad177c25bc2ce4c388616
// 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 370db9d18e3c5f26d8913cbc74edf3a66a19744b..ca91d53e5dcf609b4e16204bf2c3a071cec1070b 100644
index 37a92ce1c7a17a2c1d141e71fe7ab97d47c241fc..0880925d617745f36d39edde44f3a38ce220adb3 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -956,6 +956,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@ -52,10 +52,10 @@ index 370db9d18e3c5f26d8913cbc74edf3a66a19744b..ca91d53e5dcf609b4e16204bf2c3a071
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index a53ac812332257d775eded80c884b24ec68a5b89..e16fa74db4a1bf2c375d8dea0f4f7e9cdae3fc61 100644
index e38a96a3b9665cc832fe9c24493a335888253996..64c87952472dcab0db410ea7edb5fc4040d9b67b 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -200,6 +200,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -205,6 +205,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -65,10 +65,10 @@ index a53ac812332257d775eded80c884b24ec68a5b89..e16fa74db4a1bf2c375d8dea0f4f7e9c
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index aa5135f77b66188b435a5727c0c00da6ed6db99e..dd303df37def2053ffe253158a9e111704832cf8 100644
index 4e7767748d705c79ecd6d4cdf3982185e7bac3bd..987e4f730522af851e241083e01404f8a6a16c93 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -715,6 +715,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -727,6 +727,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

Просмотреть файл

@ -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 282a97a4c13d45cbc91190c7233927ddd96b1bc8..124e689e9ee13a4fd646de6ddaa014573d3fa40b 100644
index b15b553587ced022b91c0594380117c6bd877e57..408d7d0a9bf0dc3c031d0fe9f4ea016d0aec2504 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -505,7 +505,7 @@ config("internal_config") {
@@ -521,7 +521,7 @@ config("internal_config") {
":cppgc_header_features",
]
@ -21,7 +21,7 @@ index 282a97a4c13d45cbc91190c7233927ddd96b1bc8..124e689e9ee13a4fd646de6ddaa01457
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -5200,7 +5200,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5232,7 +5232,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index 282a97a4c13d45cbc91190c7233927ddd96b1bc8..124e689e9ee13a4fd646de6ddaa01457
deps = [
":v8_libbase",
@@ -5238,6 +5238,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -5270,6 +5270,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

Просмотреть файл

@ -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 d66859cdc46fe7a7905438687b3654d463b52b65..827e4ba01f391ca700026603a6c74f5a7e053ec1 100644
index e6c0d1efde22c28c2e2efa125912f000a83c5f58..f23047356bf46fa0075a225c4519b86aab9e1308 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8758,7 +8758,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8763,7 +8763,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@ -19,10 +19,10 @@ index d66859cdc46fe7a7905438687b3654d463b52b65..827e4ba01f391ca700026603a6c74f5a
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 51726fb85933cdc5341dcdc88b0d3410213e7818..57db36941b62a37b9e988dccaf3c5e3e9dcb1977 100644
index 8ef5e4dfd4ac743c542b002fde08d38eca876b82..0c2145b84a2c7519a0dd3dd87bed7799f539e1a1 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5829,9 +5829,9 @@ void Heap::DeinitSharedSpaces() {
@@ -5834,9 +5834,9 @@ void Heap::DeinitSharedSpaces() {
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 aee9d655d521cd72856c32be29b16b38fbb186f2..e3f5ded1f477fdb9c894854ed0601535dce3f818 100644
index 58f41e707ea385699330e185085c688cfa6a29d8..9f2b5437545dd6de90e95bc30ec06bed48723166 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -505,6 +505,10 @@ config("internal_config") {
@@ -521,6 +521,10 @@ config("internal_config") {
":cppgc_header_features",
]
@ -27,10 +27,10 @@ index aee9d655d521cd72856c32be29b16b38fbb186f2..e3f5ded1f477fdb9c894854ed0601535
defines += [ "BUILDING_V8_SHARED" ]
}
diff --git a/src/base/macros.h b/src/base/macros.h
index 49a06b87da5d4fa95ed52f5e0214ef4e9eba54f4..e878feb5c16b4b469de0a2c763681b5b63688bb7 100644
index 99ccd28a1db58d0fa938025dbf28c5490e04ca15..b36cf6a2b43741b7b72aaa6896787ce621d09d9c 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -388,13 +388,17 @@ bool is_inbounds(float_t v) {
@@ -381,13 +381,17 @@ bool is_inbounds(float_t v) {
#ifdef V8_OS_WIN
// Setup for Windows shared library export.

Просмотреть файл

@ -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 124e689e9ee13a4fd646de6ddaa014573d3fa40b..aee9d655d521cd72856c32be29b16b38fbb186f2 100644
index 408d7d0a9bf0dc3c031d0fe9f4ea016d0aec2504..58f41e707ea385699330e185085c688cfa6a29d8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -5212,7 +5212,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5244,7 +5244,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

Просмотреть файл

@ -14,7 +14,6 @@
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/optional.h"
#include "base/path_service.h"
#include "base/system/sys_info.h"
#include "chrome/browser/browser_process.h"
@ -57,6 +56,7 @@
#include "shell/common/node_includes.h"
#include "shell/common/options_switches.h"
#include "shell/common/platform_util.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/gfx/image/image.h"
#if defined(OS_WIN)
@ -912,7 +912,7 @@ void App::SetAppPath(const base::FilePath& app_path) {
#if !defined(OS_MAC)
void App::SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path) {
absl::optional<base::FilePath> custom_path) {
if (custom_path.has_value()) {
if (!custom_path->IsAbsolute()) {
thrower.ThrowError("Path must be absolute");
@ -965,7 +965,7 @@ base::FilePath App::GetPath(gin_helper::ErrorThrower thrower,
// If users try to get the logs path before setting a logs path,
// set the path to a sensible default and then try to get it again
if (!succeed && name == "logs") {
SetAppLogsPath(thrower, base::Optional<base::FilePath>());
SetAppLogsPath(thrower, absl::optional<base::FilePath>());
succeed = base::PathService::Get(key, &path);
}

Просмотреть файл

@ -175,7 +175,7 @@ class App : public ElectronBrowserClient::Delegate,
void ChildProcessDisconnected(int pid);
void SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path);
absl::optional<base::FilePath> custom_path);
// Get/Set the pre-defined path in PathService.
base::FilePath GetPath(gin_helper::ErrorThrower thrower,

Просмотреть файл

@ -18,7 +18,7 @@ namespace electron {
namespace api {
void App::SetAppLogsPath(gin_helper::ErrorThrower thrower,
base::Optional<base::FilePath> custom_path) {
absl::optional<base::FilePath> custom_path) {
if (custom_path.has_value()) {
if (!custom_path->IsAbsolute()) {
thrower.ThrowError("Path must be absolute");

Просмотреть файл

@ -893,7 +893,7 @@ bool BaseWindow::GetWindowButtonVisibility() const {
void BaseWindow::SetTrafficLightPosition(const gfx::Point& position) {
// For backward compatibility we treat (0, 0) as resetting to default.
if (position.IsOrigin())
window_->SetTrafficLightPosition(base::nullopt);
window_->SetTrafficLightPosition(absl::nullopt);
else
window_->SetTrafficLightPosition(position);
}

Просмотреть файл

@ -7,7 +7,6 @@
#include <utility>
#include "base/files/file_util.h"
#include "base/optional.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_config.h"
@ -18,6 +17,7 @@
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/promise.h"
#include "shell/common/node_includes.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
using content::TracingController;
@ -58,18 +58,18 @@ namespace {
using CompletionCallback = base::OnceCallback<void(const base::FilePath&)>;
base::Optional<base::FilePath> CreateTemporaryFileOnIO() {
absl::optional<base::FilePath> CreateTemporaryFileOnIO() {
base::FilePath temp_file_path;
if (!base::CreateTemporaryFile(&temp_file_path))
return base::nullopt;
return base::make_optional(std::move(temp_file_path));
return absl::nullopt;
return absl::make_optional(std::move(temp_file_path));
}
void StopTracing(gin_helper::Promise<base::FilePath> promise,
base::Optional<base::FilePath> file_path) {
absl::optional<base::FilePath> file_path) {
auto resolve_or_reject = base::AdaptCallbackForRepeating(base::BindOnce(
[](gin_helper::Promise<base::FilePath> promise,
const base::FilePath& path, base::Optional<std::string> error) {
const base::FilePath& path, absl::optional<std::string> error) {
if (error) {
promise.RejectWithErrorMessage(error.value());
} else {
@ -79,14 +79,14 @@ void StopTracing(gin_helper::Promise<base::FilePath> promise,
std::move(promise), *file_path));
if (file_path) {
auto endpoint = TracingController::CreateFileEndpoint(
*file_path, base::BindRepeating(resolve_or_reject, base::nullopt));
*file_path, base::BindRepeating(resolve_or_reject, absl::nullopt));
if (!TracingController::GetInstance()->StopTracing(endpoint)) {
resolve_or_reject.Run(base::make_optional(
resolve_or_reject.Run(absl::make_optional(
"Failed to stop tracing (was a trace in progress?)"));
}
} else {
resolve_or_reject.Run(
base::make_optional("Failed to create temporary file for trace data"));
absl::make_optional("Failed to create temporary file for trace data"));
}
}
@ -96,7 +96,7 @@ v8::Local<v8::Promise> StopRecording(gin_helper::Arguments* args) {
base::FilePath path;
if (args->GetNext(&path) && !path.empty()) {
StopTracing(std::move(promise), base::make_optional(path));
StopTracing(std::move(promise), absl::make_optional(path));
} else {
// use a temporary file.
base::ThreadPool::PostTaskAndReplyWithResult(

Просмотреть файл

@ -131,10 +131,10 @@ bool MatchesCookie(const base::Value& filter,
if ((str = filter.FindStringKey("domain")) &&
!MatchesDomain(*str, cookie.Domain()))
return false;
base::Optional<bool> secure_filter = filter.FindBoolKey("secure");
absl::optional<bool> secure_filter = filter.FindBoolKey("secure");
if (secure_filter && *secure_filter == cookie.IsSecure())
return false;
base::Optional<bool> session_filter = filter.FindBoolKey("session");
absl::optional<bool> session_filter = filter.FindBoolKey("session");
if (session_filter && *session_filter != !cookie.IsPersistent())
return false;
return true;
@ -162,7 +162,7 @@ void FilterCookieWithStatuses(
}
// Parse dictionary property to CanonicalCookie time correctly.
base::Time ParseTimeProperty(const base::Optional<double>& value) {
base::Time ParseTimeProperty(const absl::optional<double>& value) {
if (!value) // empty time means ignoring the parameter
return base::Time();
if (*value == 0) // FromDoubleT would convert 0 to empty Time

Просмотреть файл

@ -165,7 +165,7 @@ v8::Local<v8::Promise> Debugger::SendCommand(gin::Arguments* args) {
pending_requests_.emplace(request_id, std::move(promise));
request.SetInteger("id", request_id);
request.SetString("method", method);
if (!command_params.empty()) {
if (!command_params.DictEmpty()) {
request.Set("params",
base::Value::ToUniquePtrValue(command_params.Clone()));
}

Просмотреть файл

@ -6,6 +6,7 @@
#include <vector>
#include "base/containers/contains.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "gin/dictionary.h"

Просмотреть файл

@ -122,7 +122,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
}
pending_start_promise_ =
base::make_optional<gin_helper::Promise<void>>(args->isolate());
absl::make_optional<gin_helper::Promise<void>>(args->isolate());
v8::Local<v8::Promise> handle = pending_start_promise_->GetHandle();
auto command_line_string =

Просмотреть файл

@ -6,12 +6,12 @@
#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
#include "base/callback.h"
#include "base/optional.h"
#include "base/values.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "services/network/public/mojom/net_log.mojom.h"
#include "shell/common/gin_helper/promise.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace gin {
class Arguments;
@ -57,7 +57,7 @@ class NetLog : public gin::Wrappable<NetLog> {
network::mojom::NetLogExporterPtr net_log_exporter_;
base::Optional<gin_helper::Promise<void>> pending_start_promise_;
absl::optional<gin_helper::Promise<void>> pending_start_promise_;
scoped_refptr<base::TaskRunner> file_task_runner_;

Просмотреть файл

@ -264,7 +264,7 @@ void DownloadIdCallback(content::DownloadManager* download_manager,
uint32_t id) {
download_manager->CreateDownloadItem(
base::GenerateGUID(), id, path, path, url_chain, GURL(), GURL(), GURL(),
GURL(), base::nullopt, mime_type, mime_type, start_time, base::Time(),
GURL(), absl::nullopt, mime_type, mime_type, start_time, base::Time(),
etag, last_modified, offset, length, std::string(),
download::DownloadItem::INTERRUPTED,
download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,

Просмотреть файл

@ -64,7 +64,7 @@ gin::WrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
Tray::Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
base::Optional<UUID> guid)
absl::optional<UUID> guid)
: tray_icon_(TrayIcon::Create(guid)) {
SetImage(isolate, image);
tray_icon_->AddObserver(this);
@ -75,7 +75,7 @@ Tray::~Tray() = default;
// static
gin::Handle<Tray> Tray::New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
base::Optional<UUID> guid,
absl::optional<UUID> guid,
gin::Arguments* args) {
if (!Browser::Get()->is_ready()) {
thrower.ThrowError("Cannot create Tray before app is ready");
@ -226,7 +226,7 @@ void Tray::SetToolTip(const std::string& tool_tip) {
}
void Tray::SetTitle(const std::string& title,
const base::Optional<gin_helper::Dictionary>& options,
const absl::optional<gin_helper::Dictionary>& options,
gin::Arguments* args) {
if (!CheckAlive())
return;

Просмотреть файл

@ -44,7 +44,7 @@ class Tray : public gin::Wrappable<Tray>,
// gin_helper::Constructible
static gin::Handle<Tray> New(gin_helper::ErrorThrower thrower,
v8::Local<v8::Value> image,
base::Optional<UUID> guid,
absl::optional<UUID> guid,
gin::Arguments* args);
static v8::Local<v8::ObjectTemplate> FillObjectTemplate(
v8::Isolate*,
@ -56,7 +56,7 @@ class Tray : public gin::Wrappable<Tray>,
private:
Tray(v8::Isolate* isolate,
v8::Local<v8::Value> image,
base::Optional<UUID> guid);
absl::optional<UUID> guid);
~Tray() override;
// TrayIconObserver:
@ -87,7 +87,7 @@ class Tray : public gin::Wrappable<Tray>,
void SetPressedImage(v8::Isolate* isolate, v8::Local<v8::Value> image);
void SetToolTip(const std::string& tool_tip);
void SetTitle(const std::string& title,
const base::Optional<gin_helper::Dictionary>& options,
const absl::optional<gin_helper::Dictionary>& options,
gin::Arguments* args);
std::string GetTitle();
void SetIgnoreDoubleClickEvents(bool ignore);

Просмотреть файл

@ -316,7 +316,7 @@ void SimpleURLLoaderWrapper::PinBodyGetter(v8::Local<v8::Value> body_getter) {
SimpleURLLoaderWrapper::~SimpleURLLoaderWrapper() = default;
void SimpleURLLoaderWrapper::OnAuthRequired(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
uint32_t request_id,
const GURL& url,
bool first_auth_attempt,
@ -337,7 +337,7 @@ void SimpleURLLoaderWrapper::OnAuthRequired(
gin::Arguments* args) {
std::u16string username_str, password_str;
if (!args->GetNext(&username_str) || !args->GetNext(&password_str)) {
auth_responder->OnAuthCredentials(base::nullopt);
auth_responder->OnAuthCredentials(absl::nullopt);
return;
}
auth_responder->OnAuthCredentials(

Просмотреть файл

@ -68,7 +68,7 @@ class SimpleURLLoaderWrapper
// network::mojom::URLLoaderNetworkServiceObserver:
void OnAuthRequired(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
uint32_t request_id,
const GURL& url,
bool first_auth_attempt,
@ -82,7 +82,7 @@ class SimpleURLLoaderWrapper
bool fatal,
OnSSLCertificateErrorCallback response) override;
void OnCertificateRequested(
const base::Optional<base::UnguessableToken>& window_id,
const absl::optional<base::UnguessableToken>& window_id,
const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
mojo::PendingRemote<network::mojom::ClientCertificateResponder>
client_cert_responder) override {}

Просмотреть файл

@ -16,7 +16,6 @@
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/no_destructor.h"
#include "base/optional.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/current_thread.h"
#include "base/task/post_task.h"
@ -122,6 +121,7 @@
#include "shell/common/process_util.h"
#include "shell/common/v8_value_serializer.h"
#include "storage/browser/file_system/isolated_context.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h"
@ -385,7 +385,7 @@ void OnCapturePageDone(gin_helper::Promise<gfx::Image> promise,
promise.Resolve(gfx::Image::CreateFrom1xBitmap(bitmap));
}
base::Optional<base::TimeDelta> GetCursorBlinkInterval() {
absl::optional<base::TimeDelta> GetCursorBlinkInterval() {
#if defined(OS_MAC)
base::TimeDelta interval;
if (ui::TextInsertionCaretBlinkPeriod(&interval))
@ -401,7 +401,7 @@ base::Optional<base::TimeDelta> GetCursorBlinkInterval() {
: base::TimeDelta::FromMilliseconds(system_msec);
}
#endif
return base::nullopt;
return absl::nullopt;
}
#if BUILDFLAG(ENABLE_PRINTING)

Просмотреть файл

@ -182,7 +182,7 @@ void WebFrameMain::OnRendererConnectionError() {
void WebFrameMain::PostMessage(v8::Isolate* isolate,
const std::string& channel,
v8::Local<v8::Value> message_value,
base::Optional<v8::Local<v8::Value>> transfer) {
absl::optional<v8::Local<v8::Value>> transfer) {
blink::TransferableMessage transferable_message;
if (!electron::SerializeV8Value(isolate, message_value,
&transferable_message)) {

Просмотреть файл

@ -12,6 +12,7 @@
#include "base/process/process.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/pinnable.h"
#include "third_party/blink/public/mojom/page/page_visibility_state.mojom-forward.h"
@ -87,7 +88,7 @@ class WebFrameMain : public gin::Wrappable<WebFrameMain>,
void PostMessage(v8::Isolate* isolate,
const std::string& channel,
v8::Local<v8::Value> message_value,
base::Optional<v8::Local<v8::Value>> transfer);
absl::optional<v8::Local<v8::Value>> transfer);
int FrameTreeNodeID() const;
std::string Name() const;

Просмотреть файл

@ -7,7 +7,7 @@
#include <memory>
#include <utility>
#include "base/optional.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#if defined(OS_WIN)
#include <windows.h>
@ -34,14 +34,14 @@ mach_port_t TaskForPid(pid_t pid) {
return task;
}
base::Optional<mach_task_basic_info_data_t> GetTaskInfo(mach_port_t task) {
absl::optional<mach_task_basic_info_data_t> GetTaskInfo(mach_port_t task) {
if (task == MACH_PORT_NULL)
return base::nullopt;
return absl::nullopt;
mach_task_basic_info_data_t info = {};
mach_msg_type_number_t count = MACH_TASK_BASIC_INFO_COUNT;
kern_return_t kr = task_info(task, MACH_TASK_BASIC_INFO,
reinterpret_cast<task_info_t>(&info), &count);
return (kr == KERN_SUCCESS) ? base::make_optional(info) : base::nullopt;
return (kr == KERN_SUCCESS) ? absl::make_optional(info) : absl::nullopt;
}
} // namespace

Просмотреть файл

@ -67,7 +67,7 @@ void BadgeManager::BindServiceWorkerReceiver(
std::move(context));
}
std::string BadgeManager::GetBadgeString(base::Optional<int> badge_content) {
std::string BadgeManager::GetBadgeString(absl::optional<int> badge_content) {
if (!badge_content)
return "";
@ -87,9 +87,9 @@ void BadgeManager::SetBadge(blink::mojom::BadgeValuePtr mojo_value) {
return;
}
base::Optional<int> value =
mojo_value->is_flag() ? base::nullopt
: base::make_optional(mojo_value->get_number());
absl::optional<int> value =
mojo_value->is_flag() ? absl::nullopt
: absl::make_optional(mojo_value->get_number());
electron::Browser::Get()->SetBadgeCount(value);
}

Просмотреть файл

@ -9,9 +9,9 @@
#include <string>
#include "base/macros.h"
#include "base/optional.h"
#include "components/keyed_service/core/keyed_service.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/mojom/badging/badging.mojom.h"
#include "url/gurl.h"
@ -41,7 +41,7 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService {
mojo::PendingReceiver<blink::mojom::BadgeService> receiver);
// Determines the text to put on the badge based on some badge_content.
static std::string GetBadgeString(base::Optional<int> badge_content);
static std::string GetBadgeString(absl::optional<int> badge_content);
private:
// The BindingContext of a mojo request. Allows mojo calls to be tied back

Просмотреть файл

@ -109,7 +109,7 @@ class Browser : public WindowListObserver {
#endif
// Set/Get the badge count.
bool SetBadgeCount(base::Optional<int> count);
bool SetBadgeCount(absl::optional<int> count);
int GetBadgeCount();
#if defined(OS_WIN)
@ -368,7 +368,7 @@ class Browser : public WindowListObserver {
#if defined(OS_WIN)
void UpdateBadgeContents(HWND hwnd,
const base::Optional<std::string>& badge_content,
const absl::optional<std::string>& badge_content,
const std::string& badge_alt_string);
// In charge of running taskbar related APIs.

Просмотреть файл

@ -51,7 +51,7 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) {
return process.WaitForExit(exit_code);
}
base::Optional<std::string> GetXdgAppOutput(
absl::optional<std::string> GetXdgAppOutput(
const std::vector<std::string>& argv) {
std::string reply;
int success_code;
@ -60,9 +60,9 @@ base::Optional<std::string> GetXdgAppOutput(
&success_code);
if (!ran_ok || success_code != EXIT_SUCCESS)
return base::Optional<std::string>();
return absl::optional<std::string>();
return base::make_optional(reply);
return absl::make_optional(reply);
}
bool SetDefaultWebClient(const std::string& protocol) {
@ -128,7 +128,7 @@ std::u16string Browser::GetApplicationNameForProtocol(const GURL& url) {
return base::ASCIIToUTF16(GetXdgAppOutput(argv).value_or(std::string()));
}
bool Browser::SetBadgeCount(base::Optional<int> count) {
bool Browser::SetBadgeCount(absl::optional<int> count) {
if (IsUnityRunning() && count.has_value()) {
unity::SetDownloadCount(count.value());
badge_count_ = count.value();

Просмотреть файл

@ -218,7 +218,7 @@ std::u16string Browser::GetApplicationNameForProtocol(const GURL& url) {
return app_display_name;
}
bool Browser::SetBadgeCount(base::Optional<int> count) {
bool Browser::SetBadgeCount(absl::optional<int> count) {
DockSetBadgeText(!count.has_value() || count.value() != 0
? badging::BadgeManager::GetBadgeString(count)
: "");

Просмотреть файл

@ -591,10 +591,10 @@ v8::Local<v8::Promise> Browser::GetApplicationInfoForProtocol(
return handle;
}
bool Browser::SetBadgeCount(base::Optional<int> count) {
base::Optional<std::string> badge_content;
bool Browser::SetBadgeCount(absl::optional<int> count) {
absl::optional<std::string> badge_content;
if (count.has_value() && count.value() == 0) {
badge_content = base::nullopt;
badge_content = absl::nullopt;
} else {
badge_content = badging::BadgeManager::GetBadgeString(count);
}
@ -635,7 +635,7 @@ bool Browser::SetBadgeCount(base::Optional<int> count) {
void Browser::UpdateBadgeContents(
HWND hwnd,
const base::Optional<std::string>& badge_content,
const absl::optional<std::string>& badge_content,
const std::string& badge_alt_string) {
SkBitmap badge;
if (badge_content) {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше