chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792)

* chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd

* chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484

* chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5

* chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9

* update disable-redraw-lock.patch

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

* update desktop_media_list.patch

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

* update notification_provenance.patch

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

* update printing.patch

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

* update verbose_generate_bpad_syms.patch

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

* update patch metadata

* remove printing_compositor manifests

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

* update for URLLoaderFactoryType enum

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

* remove gin string16 converter

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

* ClearCompositorFrame() has been removed

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

* message_loop -> message_loop_current

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

* include resource_response header

* pdf compositor no longer uses service manager

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

* chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1

* pane focus fns aren't pure virtual anymore

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

* fix: make std::hash value-non-const

broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202

* update swiftshader in zip_manifests

https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911

* address feedback from @deepak1556

* don't enable kLegacyWindowsDWriteFontFallback

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

* chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e

* update printing.patch

remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182

* convert CookieChangeListener to new Mojo types

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

* rename ui::ClipboardType -> ui::ClipboardBuffer

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

* logging::LoggingSettings log_file -> log_file_path

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

* roll DEPS to latest lkgr

* fix: override GetFontLookupTableCacheDir()

When Chromium goes to use its fallback font table creation code paths,
it creates the cache directory it uses by calling
GetFontLookupTableCacheDir() with a path that doesn't exist in Electron.
To ensure that a legitimate file path is created, we need to override it
with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA.

* chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155

* update pthread_fchdir patch

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

* update printing patch

* update cookie usage and fn signatures

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

* chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e

* remove fix_make_std_hash_value-non-const.patch

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

* Convert enum to enum class for FocusManager::FocusChangeReason

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

* roll DEPS to latest lkgr

* update dom_storage_limits.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1767556
This commit is contained in:
Electron Bot 2019-08-23 21:14:23 -04:00 коммит произвёл Robo
Родитель c89debd19a
Коммит b7d25ccb77
85 изменённых файлов: 314 добавлений и 444 удалений

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

@ -300,10 +300,6 @@ source_set("manifests") {
"//printing/buildflags",
"//services/service_manager/public/cpp",
]
if (enable_basic_printing) {
deps += [ "//components/services/pdf_compositor/public/cpp:manifest" ]
}
}
npm_action("electron_version_args") {

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

@ -10,7 +10,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'956a430350ccbeb16cf544f79c1990f1eae4d4fe',
'62327c655093c821aa0fcfc6db53f5fd943e08c7',
'node_version':
'v12.9.0',
'nan_version':

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

@ -162,16 +162,18 @@ static_library("chrome") {
"//chrome/browser/printing/printing_message_filter.cc",
"//chrome/browser/printing/printing_message_filter.h",
]
public_deps += [
"//chrome/services/printing:lib",
"//components/printing/browser",
"//components/printing/renderer",
"//components/services/pdf_compositor/public/cpp:factory",
"//components/services/pdf_compositor",
"//components/services/pdf_compositor/public/cpp",
"//components/services/pdf_compositor/public/mojom",
]
deps += [
"//components/printing/common",
"//components/services/pdf_compositor",
"//printing",
]

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

@ -484,7 +484,6 @@ filenames = {
"shell/common/gin_converters/net_converter.cc",
"shell/common/gin_converters/net_converter.h",
"shell/common/gin_converters/std_converter.h",
"shell/common/gin_converters/string16_converter.h",
"shell/common/gin_converters/value_converter_gin_adapter.h",
"shell/common/gin_util.h",
"shell/common/heap_snapshot.cc",

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

@ -72,6 +72,5 @@ put_back_deleted_colors_for_autofill.patch
build_win_disable_zc_twophase.patch
disable_color_correct_rendering.patch
add_contentgpuclient_precreatemessageloop_callback.patch
fix_vc_incompatible_inline_calls.patch
picture-in-picture.patch
disable_compositor_recycling.patch

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

@ -1,12 +1,13 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Milan Burda <milan.burda@gmail.com>
Date: Thu, 11 Apr 2019 14:49:20 +0200
Subject: Add ContentGpuClient::PreCreateMessageLoop() callback
Subject: add_contentgpuclient_precreatemessageloop_callback.patch
This adds a ContentGpuClient::PreCreateMessageLoop() callback.
Invoke in GpuMain after SetErrorMode, before starting the message loop.
Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 46d92835eadd6429ea0c6a53c5a39ff04f1c2634..1b99a1e601f4226280cdf1382af555b4d61b92fa 100644

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

@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
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 e44b0d054d61914b43f4a3c36fa2578f452e1797..8b46714d15db976968ad084e7941ab503e11e65d 100644
index 7ca876bc7f2afa192167f0689690d73d5a420c60..d58085e0b14241d666f533cb23dd89159c27d8b2 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -644,6 +644,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -642,6 +642,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, WTF::ArrayBufferContents::kDontInitialize);
}
@ -70,10 +70,10 @@ index ac76d127b96b80c8260a7e2cda0b669cd98787ad..dcab64586700a8740262aede8dba2755
Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
index 929468d9d4885953576b777785609e9b54d5ebd0..ee35b4782b9797278209280c2a031e5f3d5ce6c6 100644
index ee7c89a4950d6b3c97a810c41a62fee7e372018d..c2b60f20a72cca46d05af369f33d9c19395b34ef 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
@@ -135,6 +135,7 @@ class WTF_EXPORT ArrayBufferContents {
@@ -140,6 +140,7 @@ class WTF_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

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

@ -1,12 +1,13 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Heilig Benedek <benecene@gmail.com>
Date: Wed, 30 Jan 2019 17:04:33 +0100
Subject: don't call into chrome internals for autofill popup size calculations
Subject: autofill_size_calculation.patch
The default GetWindowBounds calls into chrome internal functions to
find out the size of the window - this can be overridden but even
then some methods call into the original. Let's just return an empty
gfx::Rect and do the actual job in the subclass.
We don't want to call into chrome internals for autofill popup size
calculations. The default GetWindowBounds calls into chrome internal
functions to find out the size of the window - this can be overridden
but even then some methods call into the original. Let's just return
an empty gfx::Rect and do the actual job in the subclass.
diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc
index 25e2cfce4999bdf6a94d61aae4558470d18f89ed..c9880bcd639eb59ae52c38dbdabbd86ebac3b530 100644

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

@ -10,7 +10,7 @@ to fix electron/electron#13787. The backport landed in Chromium 67 but the
DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index b6622fd132cc1b46127a2157b28c2fd2ab63e40d..1a3196aa5737e35237fd467260973fdf260587c4 100644
index c0ec993ca6d96c5f95eb7b918ca9c37d9defff43..2522add8f9b1e3ada14fcc5c09d161b0820f4418 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -205,11 +205,10 @@ void LocalWindowProxy::Initialize() {

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

@ -14,7 +14,7 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index f4e7059fa98be4470cf20c26fd7260a442b25585..8eefe09f6ebbc02e3bca3d111c3b47d509a7a2a4 100644
index 488d9238eec29fd90540881d895f86d8597300be..b9cbd011d8ab5f86128590b2b98a517a5ad04c4e 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -334,10 +334,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {

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

@ -19,10 +19,10 @@ index a781a44399a31f048419311d2317229c912752c2..131c0dcb125b00215e3ad469c11c4b47
// that the script evaluated to with callback. Script execution can be
// suspend.
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 050494ce5d2389b81fab27506f8ff2204126eb6b..93632d57953a69be01ae5b6b9777d8a6b417b3f3 100644
index 85481bb0178d707bb52a4766521cdd8f740b0497..e3d4e5284c13383db47153adb5f8e3d9fce64dbf 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
@@ -866,6 +866,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -874,6 +874,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}

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

@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Tue, 23 Apr 2019 09:51:43 -0700
Subject: build: add electron tracing category
Subject: build_add_electron_tracing_category.patch
All TRACE events in Chromium use a static assert to ensure that the
categories in use are known / declared. This patch is required for us
to introduce a new Electron category.
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 b50d4123e44ddee34af0b07bfe5d067c4ccc5809..3e2c639a067fb76848783f35ec112a380da2353e 100644

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

@ -1,14 +1,14 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Tue, 16 Jul 2019 14:38:52 -0700
Subject: build: Temporarily disable /Zc:twoPhase when libcxx is not used on
windows.
Subject: build_win_disable_zc_twophase.patch
This is to workaround the bug in crbug.com/969698#c10
Temporarily disable /Zc:twoPhase when libcxx is not used on
Windows. This is to workaround the bug in crbug.com/969698#c10
until fixes have landed in upstream.
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 8406c060c4e61282433ad40a52744fd7ea80366b..0bb1b871be97fe8275e17669ed0bcd77d9645f9b 100644
index edb193a5f3ac04b1ea017d3744a5ac1383fc055b..459368d9885f26f80c6bbef452a3be0706cb7c13 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -2,6 +2,7 @@
@ -19,7 +19,7 @@ index 8406c060c4e61282433ad40a52744fd7ea80366b..0bb1b871be97fe8275e17669ed0bcd77
import("//build/config/chrome_build.gni")
import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
@@ -67,9 +68,13 @@ config("compiler") {
@@ -61,9 +62,13 @@ config("compiler") {
"/FS", # Preserve previous PDB behavior.
"/bigobj", # Some of our files are bigger than the regular limits.
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.

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

@ -5,10 +5,10 @@ Subject: can_create_window.patch
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 269bffc6ebfcf926718aed78f0c1d65e0c21b8b4..98069a4d2e2ab2cf1d880392ece8578c5317a6ef 100644
index c6381fe498311421d2568b6d91b33539eb72cb0b..90b2457b49cb9c68a0dd269e8e8f64a44cae80cf 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3871,6 +3871,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3885,6 +3885,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,
@ -17,10 +17,10 @@ index 269bffc6ebfcf926718aed78f0c1d65e0c21b8b4..98069a4d2e2ab2cf1d880392ece8578c
&no_javascript_access);
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 380029a373ce17816824c18803ed68380276eaa1..3a846621febecab61a26b31753fdd1d63958ec47 100644
index e227f780d720a80a13699f475757142571094cd1..6984f69e6f9a0d3058b0054df8a3aa9d46f14dbd 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -303,6 +303,10 @@ struct CreateNewWindowParams {
@@ -299,6 +299,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@ -32,10 +32,10 @@ index 380029a373ce17816824c18803ed68380276eaa1..3a846621febecab61a26b31753fdd1d6
// 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 d9f7d1d1aed10c7cd8e7c2938d1fb824b2dce96d..4d4710e8c5382ac9391bb693dc1fd42258efd181 100644
index 1c904cd011b7a5ca9592a994cf4ba0be025eef55..15081967b0a29316ab82746ca6fe7d188a9efc58 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -475,6 +475,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -484,6 +484,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -45,10 +45,10 @@ index d9f7d1d1aed10c7cd8e7c2938d1fb824b2dce96d..4d4710e8c5382ac9391bb693dc1fd422
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 02a0dbcbc2df521079519ecd5464ecd251fdcaec..897c2c1435a8c1a495aa84c928c360d74218bfa7 100644
index 07dc81e27ae92e4e7a872134dcdc6a3ba2e08ec5..678b25401338a624dc37a11c45331d65082934e9 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -177,6 +177,7 @@ class RenderFrameHost;
@@ -178,6 +178,7 @@ class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
class ResourceContext;
@ -56,7 +56,7 @@ index 02a0dbcbc2df521079519ecd5464ecd251fdcaec..897c2c1435a8c1a495aa84c928c360d7
class SerialDelegate;
class SiteInstance;
class SpeechRecognitionManagerDelegate;
@@ -759,6 +760,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -767,6 +768,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -66,7 +66,7 @@ index 02a0dbcbc2df521079519ecd5464ecd251fdcaec..897c2c1435a8c1a495aa84c928c360d7
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 31790be7369a450dec9c2c9a53d0b1a80ee4c41e..e7f22166a777b05f28a78e51934bfc1eb5ea99c8 100644
index a8a2d29739aabb0bd80cb77e28c46de57afe2b10..e3fa35b439e0f945e9e6a95587561fedd1ef4a2c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -75,6 +75,7 @@
@ -77,7 +77,7 @@ index 31790be7369a450dec9c2c9a53d0b1a80ee4c41e..e7f22166a777b05f28a78e51934bfc1e
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/media/webrtc/rtc_peer_connection_handler.h"
@@ -1358,6 +1359,8 @@ WebView* RenderViewImpl::CreateView(
@@ -1346,6 +1347,8 @@ WebView* RenderViewImpl::CreateView(
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@ -87,10 +87,10 @@ index 31790be7369a450dec9c2c9a53d0b1a80ee4c41e..e7f22166a777b05f28a78e51934bfc1e
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
index 4c639ff453f778bee39726231c920fa6e0b65134..3367f6982e047dcc3654ed20e21b74dbb90dc9cc 100644
index 1a159e8d2877e5b1c6778b68aec5b36fb88214fd..f9111b3e20fb7607faa4bb605be1ff4c385e40d6 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.cc
+++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
@@ -305,6 +305,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -313,6 +313,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -100,7 +100,7 @@ index 4c639ff453f778bee39726231c920fa6e0b65134..3367f6982e047dcc3654ed20e21b74db
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
index 8fe2e1d0b24f42ba7b2c7e40db78a3ed1d6f8341..7e6459e68ad3611b128d7f7f7604b77a66c40435 100644
index 1a714946de9f0dceaec008e93928d2c414ef01da..34423135e85b3ed7a54c9f22f6674f9c4026a67c 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.h
+++ b/content/shell/browser/web_test/web_test_content_browser_client.h
@@ -67,6 +67,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {

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

@ -1,9 +1,9 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <jeremya@chromium.org>
Date: Wed, 10 Oct 2018 15:07:34 -0700
Subject: define Command::IsMediaKey on mac
Subject: command-ismediakey.patch
the definition is copied from //chrome/common/extensions/command.cc,
define Command::IsMediaKey on mac; copied from //chrome/common/extensions/command.cc,
which also defines a bunch of other stuff that depends on extensions.
since we only need IsMediaKey, and we don't want the extensions stuff
(and aren't compiling command.cc), it's safe to duplicate the

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

@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 5acff0fbb0babb3fd46d6ec716910f3c97bc73dc..561a5dcb6bbca381875f4765b52fc0df2d5f6d4b 100644
index 61324582c2dca5e1e5a75c0793034307b648cc98..c73c1e26c2f01713952840fadbd7e8975bcb9843 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1492,7 +1492,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1496,7 +1496,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;

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

@ -46,7 +46,7 @@ index 4bc8bd4c68015dd684702a6afbce74b36160e5a1..55dc200a73ef09b17c0e52d622f86956
// navigation. Now we know that the renderer has updated its state accordingly
// and it is safe to also clear the browser side history.
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 82bdc4eccf06b7c636dd48cfffebe2606c2cff38..c4385984ebc23bc0a89e7e6ae7d42715a707177d 100644
index 87a82009c929ff73d3d9fe5b51907b9b4147f78f..32d2316d7553b672a28e84f9433c85d1be213623 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -729,9 +729,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,

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

@ -36,7 +36,7 @@ index 8e02a8a95eb07516162eacdf5b361231d3a02975..3497b85428a52c6019cfb5d30229071f
virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
};
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
index 983a8303b11527cdab449d03485653b8c27102de..1362161da462be4eb70f9e698eb274c1890ac0ab 100644
index 7346429314858b4ce7e5caaea7c3328ca22b1b02..fd98c0eb68f04f9f3bdbe8c77cfeb523d685ba87 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -21,6 +21,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@ -94,9 +94,9 @@ index 983a8303b11527cdab449d03485653b8c27102de..1362161da462be4eb70f9e698eb274c1
void DesktopMediaListBase::ScheduleNextRefresh() {
+ if (!observer_->ShouldScheduleNextRefresh(this))
+ return;
base::PostDelayedTaskWithTraits(FROM_HERE, {BrowserThread::UI},
base::BindOnce(&DesktopMediaListBase::Refresh,
weak_factory_.GetWeakPtr()),
base::PostDelayedTask(FROM_HERE, {BrowserThread::UI},
base::BindOnce(&DesktopMediaListBase::Refresh,
weak_factory_.GetWeakPtr()),
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index 29ef83096f7a7c69c67e9ad1bee2c45723e58f3f..ec228a826b298eb590f15c843e3346460ae13321 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
@ -133,7 +133,7 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5
protected:
virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index dca0ffdfb9fda6ecf45b428cb253e10f8799a6c3..8d09e13073c580ca89e76976a8acc65f4b421868 100644
index b2005c70acbc1c05c59bb2059b190ab78fb63a68..1a7188e2df76672d66da3206d4448df35a065754 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -8,14 +8,15 @@

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

@ -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 c578a96ba41f1a75d8a1ab80321b48fa72ad84ab..7f9405b7f484ef05d222581d222d104f20aa1de1 100644
index 578b8414531f10ed1fe9d1590336a43ba8dd299f..82e1491988dc31573ae8b15bf6df16fabda1616e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -331,6 +331,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@ -49,12 +49,12 @@ index c578a96ba41f1a75d8a1ab80321b48fa72ad84ab..7f9405b7f484ef05d222581d222d104f
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 3bccc5ccdcfecd4a407fab48d70b8fccd0072f60..d726e974e83eee02489fc0669ef31f00ee75a572 100644
index 57bf68676b697fa2d17c66f08b98d57809d4d20c..86ee2d878f2f310db2f50be05035f087ddb375ba 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -194,6 +194,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
using TouchIDs = std::set<DWORD>;
enum class DwmFrameState { OFF, ON };
enum class DwmFrameState { kOff, kOn };
+ bool HasNativeFrame();
+

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

@ -1,9 +1,10 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Birunthan Mohanathas <birunthan@mohanathas.com>
Date: Fri, 30 Nov 2018 12:44:12 +0200
Subject: Add --disable-color-correct-rendering switch
Subject: disable_color_correct_rendering.patch
In Electron 2.0, `--disable-features=ColorCorrectRendering` could be
This adds a --disable-color-correct-rendering switch. In Electron 2.0,
`--disable-features=ColorCorrectRendering` could be
used to make the app use the display color space (e.g. P3 on Macs)
instead of color correcting to sRGB. Because color correct rendering is
always enabled on Chromium 62 and later and because
@ -65,7 +66,7 @@ index f17aa1fa451f1b99d7f083e07edd49b11f7639e4..09f7c5d6a92d89c199b296771a8ff60c
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
#if defined(OS_MACOSX)
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index bc58f3ea501540cbbba465cd8b751b99df45ab3a..e0ee85b9319938c285eb7f19f1b010b408019081 100644
index 58717216158d62dd2826007fa3ddb4f39a5eb4d1..b8c0fcbd2aadd7c75c90baf39c1166404c4209b0 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -81,6 +81,9 @@
@ -175,7 +176,7 @@ index bc58f3ea501540cbbba465cd8b751b99df45ab3a..e0ee85b9319938c285eb7f19f1b010b4
gfx::ColorSpace adjusted_color_space = src_color_space;
float sdr_white_level = current_frame()->sdr_white_level;
@@ -3553,7 +3560,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
@@ -3550,7 +3557,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
*overlay_texture = FindOrCreateOverlayTexture(
params.quad->render_pass_id, iosurface_width, iosurface_height,
@ -184,7 +185,7 @@ index bc58f3ea501540cbbba465cd8b751b99df45ab3a..e0ee85b9319938c285eb7f19f1b010b4
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -3771,8 +3778,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -3768,8 +3775,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@ -195,7 +196,7 @@ index bc58f3ea501540cbbba465cd8b751b99df45ab3a..e0ee85b9319938c285eb7f19f1b010b4
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -3932,3 +3939,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
@@ -3929,3 +3936,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
}
} // namespace viz
@ -214,10 +215,10 @@ index 157fbbc34a2217f58f3e5931e1d56d6db3b876cd..68bd4a84e6fe68a4741fcedc50fb4723
service_manager::switches::kGpuSandboxAllowSysVShm,
service_manager::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 44ebf7ec0549dadd9621339260c92cbc424b096c..235d382c88327b7a09679b745c28622d78ce12b6 100644
index 6302948343ee810a9d35a70be0c91a1ffbfb7647..6607c71fa295cda32c5ac00aafe642a103703a0e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -216,6 +216,7 @@
@@ -215,6 +215,7 @@
#include "ui/base/ui_base_switches.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/display/display_switches.h"
@ -225,7 +226,7 @@ index 44ebf7ec0549dadd9621339260c92cbc424b096c..235d382c88327b7a09679b745c28622d
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/url_constants.h"
@@ -2894,6 +2895,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -2917,6 +2918,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[] = {
@ -234,10 +235,10 @@ index 44ebf7ec0549dadd9621339260c92cbc424b096c..235d382c88327b7a09679b745c28622d
network::switches::kExplicitlyAllowedPorts,
service_manager::switches::kDisableInProcessStackTraces,
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 91428916eaf20743f54d33df3b7930f52d24e709..879a48448ea9a0c62a1e2e070531be90e49e19ac 100644
index 2f53bc7d22c175a41e71fcbf46b8ce2636e529e3..0eb3d2922453014e90a8f91e2f72aee3145f8cc6 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2840,6 +2840,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
@@ -2836,6 +2836,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);

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

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nitish Sakhawalkar <nitsakh@icloud.com>
Date: Mon, 13 May 2019 15:48:36 -0700
Subject: Disable custom libcxx on windows
Subject: disable_custom_libcxx_on_windows.patch
diff --git a/build/config/c++/c++.gni b/build/config/c++/c++.gni

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

@ -5,10 +5,10 @@ Subject: disable_hidden.patch
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index f9d900c686f6e265c029d281ab04bc37c803fcc5..4e115c09f034cfb6913c97c719b855126ab78624 100644
index 3925586d55cb79a26b231781a821c510dfe17bd4..1ccff96eccde8dbff2b972d53c05486fb160c5db 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -676,6 +676,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -675,6 +675,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@ -19,7 +19,7 @@ index f9d900c686f6e265c029d281ab04bc37c803fcc5..4e115c09f034cfb6913c97c719b85512
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index e81662ef6b24eb03656a6f1b11b619906edda505..de56061588bb5a26b3ced56a56f56e56900fe10d 100644
index ef6276238004ff6e12de90d03be1f720c1ac266c..b8d981a45edb22a60cc439e881a4bc81854b35cd 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -183,6 +183,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl

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

@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
See https://github.com/electron/electron/issues/10754
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index b6d4e4d4f642e5043f07bd48435b8c22c52c3a75..b83f0fc7c90f64cc4ce5fce99f2741d736d7ddb7 100644
index 88883a942c20494c9ee406da09e223ddce6307c4..27468bd09b573f6a7ca8edf86cbc5f272689376e 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4090,7 +4090,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
@@ -4117,7 +4117,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
"frame that never had a user gesture since its load. "
"https://www.chromestatus.com/feature/5082396709879808";
Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

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

@ -31,23 +31,6 @@ With that in mind, an acceptable alternative to disabling the limit at compile-t
for a given `BrowserWindow` via a `webPreferences` option,
similar to [`nodeIntegration`](https://electronjs.org/docs/tutorial/security#2-disable-nodejs-integration-for-remote-content).
diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
index fd088fb170bead6452ded14016f21f0c29659e03..b90b6cf9132d16bc3b2076c3fa313916e2b5ea7d 100644
--- a/content/common/dom_storage/dom_storage_map.cc
+++ b/content/common/dom_storage/dom_storage_map.cc
@@ -185,10 +185,12 @@ bool DOMStorageMap::SetItemInternal(MapType* map_type,
size_t new_item_size = size_in_storage(key, value);
size_t new_storage_used = storage_used_ - old_item_size + new_item_size;
+#if 0
// Only check quota if the size is increasing, this allows
// shrinking changes to pre-existing files that are over budget.
if (new_item_size > old_item_size && new_storage_used > quota_)
return false;
+#endif
(*map_type)[key] = value;
ResetKeyIterator();
diff --git a/content/common/dom_storage/dom_storage_types.h b/content/common/dom_storage/dom_storage_types.h
index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06dca03ada 100644
--- a/content/common/dom_storage/dom_storage_types.h
@ -61,7 +44,7 @@ index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06
// In the browser process we allow some overage to
diff --git a/third_party/blink/renderer/modules/storage/cached_storage_area.cc b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
index 4b976b74490234cd9ad5ac7a0a63708b6edbbae3..183ed46369dc0f0026c53521d19209011d2d0eea 100644
index d91fdc2a7d52307126bc04d44167edadb8c743a8..630acfca527aaec44742d45e47ce29d7754e3385 100644
--- a/third_party/blink/renderer/modules/storage/cached_storage_area.cc
+++ b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
@@ -107,11 +107,13 @@ bool CachedStorageArea::SetItem(const String& key,

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

@ -8,7 +8,7 @@ this but it is not a blocker for releasing Electron. This patch removes
the hard fail on dylib resolve failure from dump_syms
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
index 937548cc0303d67402f42a6910cfc57bf0e53d64..dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d 100755
index cdd374c33a3edc12db9c9496a4ca765d2ba0ab5d..db04d39f8d263dc2b3b67b7f84470f557b519cfa 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
@@ -175,7 +175,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path):

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

@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68.
Remove the patch during the Chromium 69 upgrade.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index f985824f021e14c7bb6a0996afd796bc53820f86..4c7c61676602a825cc604324779fa7c51f7f0826 100644
index 4575cc246a5306f3fc245a0d296b81a4c0f5ae32..af8723a635530df4f14c13461feb737dcd1e7a54 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1722,7 +1722,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
@@ -1726,7 +1726,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
"graphics/paint/drawing_display_item_test.cc",
"graphics/paint/drawing_recorder_test.cc",
"graphics/paint/float_clip_rect_test.cc",

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

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Heilig Benedek <benecene@gmail.com>
Date: Wed, 20 Mar 2019 20:30:44 +0100
Subject: feat: offscreen rendering with viz compositor
Subject: feat_offscreen_rendering_with_viz_compositor.patch
diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc

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

@ -1,13 +1,13 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Tue, 28 May 2019 18:12:17 -0700
Subject: fix: breakpad symbol generation on linux arm
Subject: fix_breakpad_symbol_generation_on_linux_arm.patch
Fixes broken Linux ARM breakpad symbol generation by patching
out an `ldd`-related call that was throwing.
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
index 4249d7b26f9037b60a40e073f56037f9ff036138..0ad9ff9b9bc7dd535655b37013270ad504aa6a34 100755
index edb3fa5c125fae7858a1f36495410baf47d58484..05a1385e13d282a63975143cbc6e157984bbd992 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
@@ -67,7 +67,8 @@ def GetSharedLibraryDependenciesLinux(binary, options):

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

@ -1,8 +1,9 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Mon, 4 Mar 2019 14:43:36 -0800
Subject: fix: disable usage of abort_report_np in MAS builds
Subject: fix_disable_usage_of_abort_report_np_in_mas_builds.patch
Disable usage of abort_report_np in MAS builds.
diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
index 4eebcea13d17093a685cc79b8a8f61fb3894c71b..d704dced154f1d5db097e566a9c681438f94475d 100644

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

@ -1,26 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Mon, 4 Mar 2019 14:46:48 -0800
Subject: fix: disable usage of pthread_fchdir_np and pthread_chdir_np in MAS
builds
Subject:
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_MAS.patch
Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index c6d5cbbd5417a1b18a6cf94a681de6c671089e35..92d683619e8de505d5172a8ae09e6e67f28da96f 100644
index 1119fb3f97b1..b0efe96063b9 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -25,10 +25,12 @@
@@ -26,8 +26,10 @@ extern "C" {
// descriptor. libpthread only exposes a syscall wrapper starting in
// macOS 10.12, but the system call dates back to macOS 10.5. On older OSes,
// the syscall is issued directly.
+#if !defined(MAS_BUILD)
extern "C" {
int pthread_chdir_np(const char*) API_AVAILABLE(macosx(10.12));
int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12));
int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12));
}
+#endif
namespace base {
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
API_AVAILABLE(macosx(10.14));
@@ -95,21 +97,29 @@ class PosixSpawnFileActions {
};
@ -51,3 +51,17 @@ index c6d5cbbd5417a1b18a6cf94a681de6c671089e35..92d683619e8de505d5172a8ae09e6e67
}
struct GetAppOutputOptions {
@@ -238,11 +238,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
file_actions.Inherit(STDERR_FILENO);
}
+#if 0
if (options.disclaim_responsibility) {
if (__builtin_available(macOS 10.14, *)) {
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
}
}
+#endif
std::vector<char*> argv_cstr;
argv_cstr.reserve(argv.size() + 1);

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

@ -1,8 +1,10 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Mon, 4 Mar 2019 14:51:45 -0800
Subject: fix: disable usage of SetApplicationIsDaemon and
_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
Subject: fix_disable_usage_of_setapplicationisdaemon_and.patch
Disable usage of SetApplicationIsDaemon and
_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
index 9b0759ab820ddb0e2a9e609b88bbc1673607c4e3..2392fd01736550f404304df324da9d81dfb3d446 100644

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

@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 14 Aug 2019 15:36:05 -0700
Subject: fix: vc++ incompatible inline calls
Using const container elements like
const std::vector<const std::string> a = {"a"};
will fail when building without libc++ on: 'The C++ Standard
forbids containers of const elements because
allocator<const T> is ill-formed."
This fixes the issue by changing the container elements to non-const.
diff --git a/chrome/test/chromedriver/webauthn_commands.cc b/chrome/test/chromedriver/webauthn_commands.cc
index b0d4d62bc5003682523382600f8f6c815fdf089c..1f36721b50dc9a5e5fe85e044fc921bb1d0c6666 100644
--- a/chrome/test/chromedriver/webauthn_commands.cc
+++ b/chrome/test/chromedriver/webauthn_commands.cc
@@ -36,7 +36,7 @@ base::DictionaryValue MapParams(
// Converts the string |keys| in |params| from base64url to base64. Returns a
// status error if conversion of one of the keys failed.
Status ConvertBase64UrlToBase64(base::Value* params,
- const std::vector<const std::string> keys) {
+ const std::vector<std::string> keys) {
for (const std::string key : keys) {
base::Value* maybe_value = params->FindKey(key);
if (!maybe_value)
@@ -60,7 +60,7 @@ Status ConvertBase64UrlToBase64(base::Value* params,
// Converts the string |keys| in |params| from base64 to base64url.
void ConvertBase64ToBase64Url(base::Value* params,
- const std::vector<const std::string> keys) {
+ const std::vector<std::string> keys) {
for (const std::string key : keys) {
std::string* maybe_value = params->FindStringKey(key);
if (!maybe_value)

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

@ -186,7 +186,7 @@ index 1edb9fd6b0c383f291735dd1a952fcb7b17cc87f..23967f040eb346be265faa2a92562e1f
size_t GetRelatedActiveContentsCount() override;
bool RequiresDedicatedProcess() override;
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 4d4710e8c5382ac9391bb693dc1fd42258efd181..45cf6657ea2055c45ff14669a0e09efc84efd133 100644
index 15081967b0a29316ab82746ca6fe7d188a9efc58..2f894fdcc72f9e31e62f660e2eaff686b0bde95a 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -44,6 +44,21 @@
@ -212,10 +212,10 @@ index 4d4710e8c5382ac9391bb693dc1fd42258efd181..45cf6657ea2055c45ff14669a0e09efc
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 897c2c1435a8c1a495aa84c928c360d74218bfa7..8b2b21f2ca7306751e123ed31198a2c5c38a4b5c 100644
index 678b25401338a624dc37a11c45331d65082934e9..bed09d49f1f8ca3a14a5306144faf4ae4d1f7de9 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -204,8 +204,45 @@ struct WebPreferences;
@@ -205,8 +205,45 @@ struct WebPreferences;
// the observer interfaces.)
class CONTENT_EXPORT ContentBrowserClient {
public:

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

@ -38,7 +38,7 @@ index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a7e81072194c00baa0aa3159a6bfe374
// is concerned.
@property(nonatomic, readonly) NSString* subrole;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 241f5a41afce70835e12b16fb64192663b0d8580..5e026cb0627970620f5994dc783e1fa989401ed3 100644
index eb17b696e5c299acda8c48d5f962df8bd7742632..7cdfe8e899ea84edd0f2a87ec3ad9fc150834055 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -219,6 +219,7 @@
@ -159,7 +159,7 @@ index 241f5a41afce70835e12b16fb64192663b0d8580..5e026cb0627970620f5994dc783e1fa9
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -2855,6 +2870,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2854,6 +2869,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return CreateTextMarker(root->CreatePositionAt(index));
}
@ -167,7 +167,7 @@ index 241f5a41afce70835e12b16fb64192663b0d8580..5e026cb0627970620f5994dc783e1fa9
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2888,6 +2904,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2887,6 +2903,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -175,7 +175,7 @@ index 241f5a41afce70835e12b16fb64192663b0d8580..5e026cb0627970620f5994dc783e1fa9
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -2968,6 +2985,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
@@ -2967,6 +2984,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
return @(child->GetIndexInParent());
}
@ -184,7 +184,7 @@ index 241f5a41afce70835e12b16fb64192663b0d8580..5e026cb0627970620f5994dc783e1fa9
return nil;
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 790b79d9f67fae56ae1b30307f72a4022f35c854..ba99f5d222735cec8be17426e3ac3553ae656f77 100644
index 851da832bd30e05974317601712f309b2d542ab6..dd6d4c50468ec5f3364213e43b9336f13b153a19 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -493,6 +493,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@ -236,7 +236,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
} // namespace
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index b6bea74d9f9c2fcfba381477895e4c15741318fc..4a02e5659e85c507d480d7fb9b63ee10bad1fe85 100644
index 8e4a469b6f0675dc7b82543d5758f0c2ec226809..2fcfb6edb5f57bd25756257b77361d25768f9abf 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -36,6 +36,7 @@
@ -310,10 +310,10 @@ index 7ec6dab821b542cb0096e7f8875ba21703463087..3e26c9dd0a296b8d9c99ca1ee9d9faba
}
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index ee2d5721425c86124de6396b77a564d55e89a212..954812b9dda506b16483c37e9ed938716aa560d1 100644
index 2e0f06b0c1e4b1670bfe8145b3c5abb178b47d62..2f9483283a789a69d7e85536620daa2e35ee9155 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -244,6 +244,7 @@ class DnsConfigServicePosix::Watcher {
@@ -246,6 +246,7 @@ class DnsConfigServicePosix::Watcher {
bool Watch() {
bool success = true;
@ -321,7 +321,7 @@ index ee2d5721425c86124de6396b77a564d55e89a212..954812b9dda506b16483c37e9ed93871
if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged,
base::Unretained(this)))) {
LOG(ERROR) << "DNS config watch failed to start.";
@@ -265,6 +266,7 @@ class DnsConfigServicePosix::Watcher {
@@ -267,6 +268,7 @@ class DnsConfigServicePosix::Watcher {
DNS_CONFIG_WATCH_MAX);
}
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)

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

@ -1,14 +1,14 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Wed, 8 May 2019 17:25:55 -0700
Subject: network service: allow remote certificate verification logic
Subject: network_service_allow_remote_certificate_verification_logic.patch
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 05f062d5d98195571aca579f4451f25ff6da15bf..9c8bd7affcf4e2017c0f661e22155825398b50c7 100644
index 41e3a4960bfa4909c54b1d3db214fa943bff65b6..781053c8650d98ee39d39e9057159f9a9c923789 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -90,6 +90,11 @@
@@ -91,6 +91,11 @@
#include "services/network/url_loader.h"
#include "services/network/url_request_context_builder_mojo.h"
@ -20,7 +20,7 @@ index 05f062d5d98195571aca579f4451f25ff6da15bf..9c8bd7affcf4e2017c0f661e22155825
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -318,6 +323,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
@@ -319,6 +324,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
} // namespace
@ -96,7 +96,7 @@ index 05f062d5d98195571aca579f4451f25ff6da15bf..9c8bd7affcf4e2017c0f661e22155825
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
constexpr bool NetworkContext::enable_resource_scheduler_;
@@ -645,6 +719,12 @@ void NetworkContext::SetClient(mojom::NetworkContextClientPtr client) {
@@ -650,6 +724,12 @@ void NetworkContext::SetClient(mojom::NetworkContextClientPtr client) {
client_ = std::move(client);
}
@ -109,7 +109,7 @@ index 05f062d5d98195571aca579f4451f25ff6da15bf..9c8bd7affcf4e2017c0f661e22155825
void NetworkContext::CreateURLLoaderFactory(
mojom::URLLoaderFactoryRequest request,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -1720,12 +1800,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1727,12 +1807,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
cert_net_fetcher_, /*system_trust_store_provider=*/nullptr)));
}
#endif
@ -134,7 +134,7 @@ index 05f062d5d98195571aca579f4451f25ff6da15bf..9c8bd7affcf4e2017c0f661e22155825
std::unique_ptr<net::NetworkDelegate> network_delegate =
std::make_unique<NetworkServiceNetworkDelegate>(this);
diff --git a/services/network/network_context.h b/services/network/network_context.h
index bae29f0850644a63668fb9a5a99b619239635af1..cffd9a9869beb6fa5ab258cc063ecb9233fc90f5 100644
index 12806873427b070beed2ec3a2a02c58791aa126d..b64485726b76b5a2939a33b9dd3a193d4fff8f6d 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -80,6 +80,7 @@ class DomainReliabilityMonitor;
@ -153,7 +153,7 @@ index bae29f0850644a63668fb9a5a99b619239635af1..cffd9a9869beb6fa5ab258cc063ecb92
void CreateURLLoaderFactory(mojom::URLLoaderFactoryRequest request,
mojom::URLLoaderFactoryParamsPtr params) override;
void ResetURLLoaderFactories() override;
@@ -553,6 +555,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -556,6 +558,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
#endif
@ -163,10 +163,10 @@ index bae29f0850644a63668fb9a5a99b619239635af1..cffd9a9869beb6fa5ab258cc063ecb92
// CertNetFetcher is not used by the current platform.
scoped_refptr<net::CertNetFetcherImpl> cert_net_fetcher_;
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 39e583e4481af613f0af97c7a06a0a43f1dd1cfc..bdf12bbbdd7ea7d9dd041f460f79d4ed20062e13 100644
index 59c05e850bba0c30871fb40f898e9f0b9ce7af36..cd617733773b81aa2e57176c46f392a6a124b7c9 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -161,6 +161,17 @@ interface TrustedURLLoaderHeaderClient {
@@ -162,6 +162,17 @@ interface TrustedURLLoaderHeaderClient {
OnLoaderCreated(int32 request_id, TrustedHeaderClient& header_client);
};
@ -184,7 +184,7 @@ index 39e583e4481af613f0af97c7a06a0a43f1dd1cfc..bdf12bbbdd7ea7d9dd041f460f79d4ed
// Parameters for constructing a network context.
struct NetworkContextParams {
// Name used by memory tools to identify the context.
@@ -576,6 +587,9 @@ interface NetworkContext {
@@ -587,6 +598,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(NetworkContextClient client);

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

@ -1,9 +1,10 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <jeremya@chromium.org>
Date: Fri, 5 Oct 2018 14:22:06 -0700
Subject: pass RenderProcessHost through to PlatformNotificationService
Subject: notification_provenance.patch
this is so Electron can identify which renderer a notification came from
Pass RenderProcessHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
index a717d9f3539dc0fe86b743c6e29e4311b8b5cec3..1351217319c57be414e6c66f8a01f71fe46d2c04 100644
@ -107,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
index 95bed38ac589bd55550704d16fa817610aead6f9..664b7dca4e9c2a09680855e9bc3864c8bd8ac4d5 100644
index 63e8a6a260c0a63d4eee365330352b3112878384..2d20c32e631bc7edf51f02d7d10e8fbbf1516f90 100644
--- a/content/browser/renderer_interface_binders.cc
+++ b/content/browser/renderer_interface_binders.cc
@@ -201,7 +201,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@@ -200,7 +200,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
RenderProcessHost* host, const url::Origin& origin) {
static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
->GetPlatformNotificationContext()
@ -118,7 +119,7 @@ index 95bed38ac589bd55550704d16fa817610aead6f9..664b7dca4e9c2a09680855e9bc3864c8
+ ->CreateService(host, origin, std::move(request));
}));
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&BackgroundFetchServiceImpl::CreateForWorker));
base::BindRepeating(&QuotaDispatcherHost::CreateForWorker));
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
index ca61088079c4150fcf389504ddcf26bcf6bf69cd..d9c034c39890eef1fe3d95c6d7c0ae68eb711a89 100644
--- a/content/public/browser/platform_notification_service.h

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

@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index d4dc099ca7f49d9541b2891f0efdf069d3cebf19..dab9401485cca4f1d58ad4d511e5ce697890a625 100644
index 9c77f6422edbb42da34abb4320e0d5103cca5eea..8419b1ce6ed543b150c31d41dc8575e98c203427 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -466,7 +466,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
@@ -477,7 +477,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
std::string document_url = document_url_var.AsString();
base::StringPiece document_url_piece(document_url);
is_print_preview_ = IsPrintPreviewUrl(document_url_piece);

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

@ -1,8 +1,9 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Fri, 12 Apr 2019 12:47:57 -0700
Subject: patch the ensure_gn_version.py script to work on mac CI
Subject: patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
This patches the ensure_gn_version_py script to work on macOS CI.
This script is temporary until https://crbug.com/944667 is resolved. We need to
patch it because on mac CI, we check out the source code on Linux, which
confuses the script.

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

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Fri, 7 Jun 2019 13:59:37 -0700
Subject: fix: printing
Subject: printing.patch
Add changeset that was previously applied to sources in chromium_src. The
majority of changes originally come from these PRs:
@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 72a0c8cd0f1be0f7713c01ce28323619f09fcc20..b78da10cb607f0f7ce0e97a620908b55f0901c0c 100644
index 13f9d7af3ae796ecec3a9189aa59f4b20171fd7a..9c35b294340cce070a9f428dac6aa587c93ccc6c 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -21,12 +21,12 @@
@ -57,11 +57,11 @@ index 72a0c8cd0f1be0f7713c01ce28323619f09fcc20..b78da10cb607f0f7ce0e97a620908b55
+ JobEventDetails::USER_INIT_CANCELED, 0,
+ base::RetainedRef(document_)));
+ }
std::move(callback).Run(printing_context_->settings(), result);
std::move(callback).Run(printing_context_->TakeAndResetSettings(), result);
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e807d266e2 100644
index 97079241f54b876c6863097ab523daed4884f410..628a3892a6f5de1247313b64a00cdae2a8557c57 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -27,10 +27,7 @@
@ -146,7 +146,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
}
void PrintViewManagerBase::NavigationStopped() {
@@ -342,7 +347,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
@@ -347,7 +352,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
PrintManager::OnPrintingFailed(cookie);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@ -155,7 +155,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
#endif
ReleasePrinterQuery();
@@ -440,9 +445,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
@@ -445,9 +450,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
content::NotificationService::NoDetails());
break;
}
@ -171,7 +171,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
NOTREACHED();
break;
}
@@ -537,8 +546,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -542,8 +551,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
DCHECK(!quit_inner_loop_);
DCHECK(query);
@ -180,7 +180,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
// We can't print if there is no renderer.
if (!web_contents()->GetRenderViewHost() ||
@@ -549,8 +556,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -554,8 +561,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
DCHECK(!print_job_);
print_job_ = base::MakeRefCounted<PrintJob>();
print_job_->Initialize(std::move(query), RenderSourceName(), number_pages_);
@ -189,7 +189,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
printing_succeeded_ = false;
return true;
}
@@ -599,6 +604,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -604,6 +609,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@ -203,7 +203,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
if (!print_job_)
return;
@@ -608,8 +620,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -613,8 +625,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
rfh->Send(msg.release());
}
@ -215,7 +215,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
// Don't close the worker thread.
print_job_ = nullptr;
}
@@ -679,6 +692,9 @@ bool PrintViewManagerBase::PrintNowInternal(
@@ -684,6 +697,9 @@ bool PrintViewManagerBase::PrintNowInternal(
// Don't print / print preview interstitials or crashed tabs.
if (web_contents()->ShowingInterstitialPage() || web_contents()->IsCrashed())
return false;
@ -226,7 +226,7 @@ index 046cb140b10187e8c2850d990afc4c7a77283ae4..ada5a3d237cd64127412e4ec775a63e8
}
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index dd12f557535feea98991d6563e6c7e82b58d6498..5fa7cc4d82f55058f33ca05e687b062c45578f62 100644
index 49d3f53ec30e9c9c86f8399511a7086afa4342e1..ea5791daf2f3941b5da8ecae28f5b3eb661858e2 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -33,6 +33,8 @@ class PrintJob;
@ -249,7 +249,7 @@ index dd12f557535feea98991d6563e6c7e82b58d6498..5fa7cc4d82f55058f33ca05e687b062c
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in |print_data| with settings specified in
@@ -196,9 +200,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -198,9 +202,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_;
@ -266,10 +266,10 @@ index dd12f557535feea98991d6563e6c7e82b58d6498..5fa7cc4d82f55058f33ca05e687b062c
// This means we are _blocking_ until all the necessary pages have been
// rendered or the print settings are being loaded.
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3bae1c84c31 100644
index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2eb48262ce 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -21,6 +21,7 @@
@@ -22,6 +22,7 @@
#include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
#include "components/printing/browser/print_manager_utils.h"
#include "components/printing/common/print_messages.h"
@ -277,7 +277,7 @@ index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3ba
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -89,20 +90,23 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) {
@@ -90,20 +91,23 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) {
g_test_delegate = delegate;
}
@ -304,7 +304,7 @@ index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3ba
}
PrintingMessageFilter::~PrintingMessageFilter() {
@@ -137,11 +141,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
@@ -138,11 +142,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@ -318,7 +318,7 @@ index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3ba
std::unique_ptr<PrinterQuery> printer_query = queue_->PopPrinterQuery(0);
if (!printer_query) {
printer_query =
@@ -227,11 +233,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
@@ -228,11 +234,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
base::Value job_settings,
IPC::Message* reply_msg) {
@ -332,7 +332,7 @@ index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3ba
std::unique_ptr<PrinterQuery> printer_query =
queue_->PopPrinterQuery(document_cookie);
if (!printer_query) {
@@ -257,7 +265,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
@@ -258,7 +266,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
std::unique_ptr<PrinterQuery> printer_query,
IPC::Message* reply_msg) {
PrintMsg_PrintPages_Params params;
@ -343,7 +343,7 @@ index 355324f069bcccead875cc591c20e456d20a6f5b..fe889df2a0acf271b667813ef430a3ba
params.Reset();
} else {
RenderParamsFromPrintSettings(printer_query->settings(), &params.params);
@@ -295,7 +305,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
@@ -296,7 +306,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids,
bool* cancel) {
@ -378,7 +378,7 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
// content::BrowserMessageFilter:
bool OnMessageReceived(const IPC::Message& message) override;
diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h
index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..331ac71d925c056d3b7577123251514c35f30fde 100644
index a134a000bd3ccb229a26b3e2cb3425f91a85618e..fd768d372ac15be9b0553fd7d98ce5e27ed19f5a 100644
--- a/components/printing/common/print_messages.h
+++ b/components/printing/common/print_messages.h
@@ -368,7 +368,9 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
@ -393,7 +393,7 @@ index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..331ac71d925c056d3b7577123251514c
// Like PrintMsg_PrintPages, but using the print preview document's frame/node.
IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index 1a65567cb5c5f98b60d05679700c5eb91d49a229..612766fe63166b047e4f0385f219f6615023fcb6 100644
index a7780f1beabca9d7335333357fe7cf9f1fcb0d3c..8351ed13f30372dc5e0dcd5b39d9a6947384f8e4 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -37,6 +37,7 @@
@ -498,7 +498,7 @@ index 1a65567cb5c5f98b60d05679700c5eb91d49a229..612766fe63166b047e4f0385f219f661
// Check if |this| is still valid.
if (!self)
return;
@@ -1868,10 +1882,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
@@ -1870,10 +1884,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
return printed_pages;
}
@ -525,7 +525,7 @@ index 1a65567cb5c5f98b60d05679700c5eb91d49a229..612766fe63166b047e4f0385f219f661
// Check if the printer returned any settings, if the settings is empty, we
// can safely assume there are no printer drivers configured. So we safely
// terminate.
@@ -1891,12 +1918,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -1893,12 +1920,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@ -605,23 +605,23 @@ index 17c363ff9aa2e2262cacd0c9baea3820334bf67b..5b02461c2e9afe254405ddacd904e4bd
settings->set_color(static_cast<ColorModel>(color.value()));
settings->set_scale_factor(static_cast<double>(scale_factor.value()) / 100.0);
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
index 78e3c3b2e1bea0f3626838eab14267847a556470..b1c16e6eb1d0d9c0a8b700d9faf408d602f962ea 100644
index cd5c27c87df175676504a06b4e1904f6b836dc90..c4f6acf66bc69f1e7db633aa5b3b03a913ffb666 100644
--- a/printing/printing_context.cc
+++ b/printing/printing_context.cc
@@ -77,8 +77,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
@@ -93,8 +93,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
PrintingContext::Result PrintingContext::UpdatePrintSettings(
base::Value job_settings) {
- ResetSettings();
-
if (!PrintSettingsFromJobSettings(job_settings, &settings_)) {
if (!PrintSettingsFromJobSettings(job_settings, settings_.get())) {
NOTREACHED();
return OnError();
diff --git a/printing/printing_context.h b/printing/printing_context.h
index 9ccc1a6680bcedd452cade7f7531924ace7876cf..4e1c330c01a1d6d1ba702337f16d8f8a70cd76f5 100644
index 6a5a7c90ef5b..a033c58076ff 100644
--- a/printing/printing_context.h
+++ b/printing/printing_context.h
@@ -129,12 +129,12 @@ class PRINTING_EXPORT PrintingContext {
@@ -131,12 +131,12 @@ class PRINTING_EXPORT PrintingContext {
int job_id() const { return job_id_; }

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

@ -1,17 +1,17 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@github.com>
Date: Thu, 20 Jun 2019 16:49:25 -0400
Subject: put back deleted colors for autofill
Subject: put_back_deleted_colors_for_autofill.patch
https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer
needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor
our autofill implementation to work like chromium.
our autofill implementation to work like Chromium's.
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk.cc b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
index 4edc178d601f764721b8c13b639f6ed073417c43..15c1375b193d71a2ab195d09b22b0969b738395b 100644
index b77b8a53b0246b05e3c45e74eaf2b5c44c6dad88..7af171f6cd5d76e87e2fca32f5dbcc34d7e0a974 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
@@ -280,6 +280,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
@@ -279,6 +279,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
case ui::NativeTheme::kColorId_TableHeaderSeparator:
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
@ -40,7 +40,7 @@ index 4edc178d601f764721b8c13b639f6ed073417c43..15c1375b193d71a2ab195d09b22b0969
// TODO(thomasanderson): Render GtkSpinner directly.
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index 8bd17ec4a9340881694c1aded2c19769d0867edb..bc02c137279dbb672984a59f0a3b546ce5e39012 100644
index af391345a4c893e3fbde4f750af429a0567188d2..febfb06f18b6f51e6ebcc0c59e2a81b259e97997 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -56,6 +56,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
@ -58,7 +58,7 @@ index 8bd17ec4a9340881694c1aded2c19769d0867edb..bc02c137279dbb672984a59f0a3b546c
// FocusableBorder
case NativeTheme::kColorId_FocusedBorderColor:
return SkColorSetA(gfx::kGoogleBlue300, 0x66);
@@ -360,6 +368,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
@@ -357,6 +365,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
case NativeTheme::kColorId_UnfocusedBorderColor:
return SkColorSetA(SK_ColorBLACK, 0x66);
@ -78,10 +78,10 @@ index 8bd17ec4a9340881694c1aded2c19769d0867edb..bc02c137279dbb672984a59f0a3b546c
case NativeTheme::kColorId_ThrobberSpinningColor:
return gfx::kGoogleBlue600;
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index d12315d778468333b41308e664d78f0b1ad0391e..8ecad2a7560c124f2a5b412a6d7ed9e60616aa34 100644
index 3604105e43ee1866a8517c52ed05205b3ed10b56..70389e0245993faa2c17e9deefeb000280ef2368 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -387,6 +387,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -389,6 +389,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
kColorId_TableHeaderText,
kColorId_TableHeaderBackground,
kColorId_TableHeaderSeparator,

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

@ -25,7 +25,7 @@ index f41270e262784602c90b79b7aefbcd1a7af43dd8..a28ea7ee72fbf596b2b1d10cacaad406
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 1381c94013e5d9881f131fcab1926698f6b1fe9f..feeb351e2ba929abe82b9a4fe4b5b6982e925156 100644
index 41288f633262f49ed7fb174c1af4e1834061c940..7fac11ee38f50165a0089473de5be601b1edf040 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -24,9 +24,11 @@
@ -62,7 +62,7 @@ index 1381c94013e5d9881f131fcab1926698f6b1fe9f..feeb351e2ba929abe82b9a4fe4b5b698
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -353,6 +360,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -348,6 +355,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

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

@ -5,7 +5,7 @@ Subject: render_widget_host_view_mac.patch
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 5d8727b36c015c5136a3a24c463821ff6ae46994..fa73828627fcea54d12fd6eb6c489248bf2af8d7 100644
index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653de1c70c7 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,11 @@ void ExtractUnderlines(NSAttributedString* string,
@ -66,7 +66,7 @@ index 5d8727b36c015c5136a3a24c463821ff6ae46994..fa73828627fcea54d12fd6eb6c489248
return validAttributesForMarkedText_.get();
}
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 66edee6f3dd734b86f6c63b037a19937e5b8ca86..d98f25ac7748b82c77e47d318437ae3de4ea6d42 100644
index f52e0750f337dde0a1f3e7d6d36bac8a62094316..0aac157ae84f975acd6a944c63194bf2ed233188 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -63,6 +63,7 @@

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

@ -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 cc6c2943fb92226341276071cbe15bfb9a6f13bc..8547a9208814eedb9cb94de3f16f233e2c8ed0bc 100644
index a9814f1349d886c0ec1968fa9bf4e2695c475307..e54ad878e0815c0210f8627816ae1be3151bfb34 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1626,7 +1626,7 @@ if (is_chrome_branded && !is_android) {
@@ -1624,7 +1624,7 @@ if (is_chrome_branded && !is_android) {
}
}
@ -64,7 +64,7 @@ index cc6c2943fb92226341276071cbe15bfb9a6f13bc..8547a9208814eedb9cb94de3f16f233e
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1650,6 +1650,12 @@ if (!is_android) {
@@ -1648,6 +1648,12 @@ if (!is_android) {
}
}

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

@ -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 5cb02a6e1375542aab3ad1d9593cd0c8c9371f0e..975c11860584ba094b2bf49cb726011627ddf006 100644
index cc9e8ad658a018bef04a2f3f40288543ab243443..eb1a89bba7f5d81ebd324bc7b5cf61914ef3ce32 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1510,7 +1510,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
@@ -1539,7 +1539,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

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

@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch
Allows populating security tab info for devtools in Electron.
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
index 76036ce8f4e09e99141940bb72c0424bce556c43..7e63568010a6646df62aab2f418d659f9ec9eee3 100644
index 26ec105bf873bd0e802c2c7e65e5e82f2abcfd85..b5e94e434ad7c22de2b59ae1bd0640d55da690a2 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -13,16 +13,20 @@
@ -86,7 +86,7 @@ index 76036ce8f4e09e99141940bb72c0424bce556c43..7e63568010a6646df62aab2f418d659f
safe_browsing::SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
if (!sb_service)
@@ -242,6 +252,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -254,6 +264,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
break;
}
}

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

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Wed, 28 Nov 2018 13:20:27 -0800
Subject: support mixed-sandbox with zygote
Subject: support_mixed_sandbox_with_zygote.patch
On Linux, Chromium launches all new renderer processes via a "zygote"
process which has the sandbox pre-initialized (see
@ -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 c91eb3b8daec0684b09ab5026b54a315a0032fc6..44ebf7ec0549dadd9621339260c92cbc424b096c 100644
index 20d0b4a801bdbe0300f878f369fc9017fc8aea3f..6302948343ee810a9d35a70be0c91a1ffbfb7647 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -372,6 +372,10 @@ class RendererSandboxedProcessLauncherDelegate
@@ -378,6 +378,10 @@ class RendererSandboxedProcessLauncherDelegate
: public SandboxedProcessLauncherDelegate {
public:
RendererSandboxedProcessLauncherDelegate() {}
@ -36,7 +36,7 @@ index c91eb3b8daec0684b09ab5026b54a315a0032fc6..44ebf7ec0549dadd9621339260c92cbc
~RendererSandboxedProcessLauncherDelegate() override {}
@@ -391,6 +395,9 @@ class RendererSandboxedProcessLauncherDelegate
@@ -397,6 +401,9 @@ class RendererSandboxedProcessLauncherDelegate
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
service_manager::ZygoteHandle GetZygote() override {
@ -46,7 +46,7 @@ index c91eb3b8daec0684b09ab5026b54a315a0032fc6..44ebf7ec0549dadd9621339260c92cbc
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
base::CommandLine::StringType renderer_prefix =
@@ -404,6 +411,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -410,6 +417,11 @@ class RendererSandboxedProcessLauncherDelegate
service_manager::SandboxType GetSandboxType() override {
return service_manager::SANDBOX_TYPE_RENDERER;
}
@ -58,7 +58,7 @@ index c91eb3b8daec0684b09ab5026b54a315a0032fc6..44ebf7ec0549dadd9621339260c92cbc
};
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
@@ -1732,11 +1744,18 @@ bool RenderProcessHostImpl::Init() {
@@ -1746,11 +1758,18 @@ bool RenderProcessHostImpl::Init() {
cmd_line->PrependWrapper(renderer_prefix);
AppendRendererCommandLine(cmd_line.get());

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

@ -1,14 +1,15 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Tue, 16 Apr 2019 11:25:08 -0700
Subject: unsandboxed ppapi processes skip zygote
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 9510a7f9aafeb5b5b73967bcfd760dbc6d5ff5c7..a15dd6087aa92d019e34ec456735111a71c6fb57 100644
index 301349f721145f3fdbf8624e276a0c414ffa14bd..dddc9f959fcf2e6036f3de01738d9ad3eea457a9 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -123,6 +123,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
@@ -128,6 +128,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
service_manager::ZygoteHandle GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();

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

@ -7,7 +7,7 @@ Temporarily add additional debugging statements to
generate_breakpad_symbols.py to determine why it is hanging.
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9ff036138 100755
index db04d39f8d263dc2b3b67b7f84470f557b519cfa..edb3fa5c125fae7858a1f36495410baf47d58484 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
@@ -60,7 +60,10 @@ def Resolve(path, exe_path, loader_path, rpaths):
@ -41,7 +41,7 @@ index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9
elif options.platform == 'android':
deps = GetSharedLibraryDependenciesAndroid(binary)
elif options.platform == 'darwin':
@@ -257,7 +263,8 @@ def CreateSymbolDir(options, output_dir):
@@ -257,7 +263,8 @@ def CreateSymbolDir(options, output_dir, relative_hash_dir):
def GenerateSymbols(options, binaries):
"""Dumps the symbols of binary and places them in the given directory."""
@ -80,5 +80,5 @@ index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9
+ with print_lock:
+ print "Got symbol_info for %s." % (potential_symbol_file)
if symbol_info == binary_info:
CreateSymbolDir(options, output_dir)
CreateSymbolDir(options, output_dir, binary_info.hash)
shutil.copyfile(potential_symbol_file, output_path)

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

@ -5,7 +5,7 @@ Subject: web_contents.patch
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9cc3c1e1d9ef317a41b404ba96d23e669a855d85..112dfea30665ffa28c3b5f35bdad5d8a925b5656 100644
index 30c4165bdb6af4cbab48954570c55cbe60cb598d..337c2bade32055f813009e0dbd33621499a921bf 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2136,6 +2136,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@ -92,7 +92,7 @@ index ecaf30bcb7b916a92a69641dd7b96a3633d407c0..0af625928ca6227a21cd4263a14a42b7
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget(
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 0bdb9e8b3339ee39d2904bec2a03d30b212e7dbf..958e8a80edcf9465166bc64d11d3517bc8a23ad1 100644
index 4ff447d0615d0e14995581ca07bba5118750c29a..818e357453e9b14a62b1b461bb41f85fc74e033d 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -76,9 +76,12 @@ class BrowserPluginGuestDelegate;

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

@ -21,10 +21,10 @@ index 76d775b20307a3c9a779489e754c6849a0f21d64..533a1621e82461d8611ba1d8f2ed2fc5
// 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 fd7f9057d03c36b26391c7bac7af951283b8c2bf..6fe8dbb4b0ea8791a8640ed42148546aab3d5a96 100644
index a61bc92743c4bdf0b011c451cfc341cb4442a4bb..191e9aa21d2b766e2cc696bdf7963b15baf787d3 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -919,6 +919,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -923,6 +923,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -50,10 +50,10 @@ index fb807df3f015c6d9a3a18608301b2781596415de..a08e9fb3a30bf401b204c206ef9f2aa2
const blink::WebString& header_name) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 14cc7b5a6a7c0af10529139fe56dc0991a459a03..afcefc79e0dc261472497fb6a965de3196113eb6 100644
index 814efddb679051d2bd916ee565d117669c254751..f2ac53df9091a7d5b4ca6b0e5b724a1f058f04e8 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -660,6 +660,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -677,6 +677,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -62,10 +62,10 @@ index 14cc7b5a6a7c0af10529139fe56dc0991a459a03..afcefc79e0dc261472497fb6a965de31
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 21ecd0a151fddddab129ed21f4c6b5dae0c843cf..2cf6f0110824b76933d616f3747c4bf51ac34cde 100644
index 391a9d1099ac3226c6c0d42e74e672f958e5a58b..3d66c80a190a533fade36d452f8093116a0d6c1b 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -651,6 +651,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -658,6 +658,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
nested_runner_->QuitNow();
}

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

@ -13,7 +13,7 @@ LINUX_BINARIES_TO_STRIP = [
'libEGL.so',
'swiftshader/libGLESv2.so',
'swiftshader/libEGL.so',
'swiftshader/libvulkan.so'
'swiftshader/libvk_swiftshader.so'
]
def strip_binaries(directory, target_cpu):

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

@ -67,6 +67,6 @@ resources/default_app.asar
snapshot_blob.bin
swiftshader/libEGL.so
swiftshader/libGLESv2.so
swiftshader/libvulkan.so
swiftshader/libvk_swiftshader.so
v8_context_snapshot.bin
version

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

@ -67,6 +67,6 @@ resources/default_app.asar
snapshot_blob.bin
swiftshader/libEGL.so
swiftshader/libGLESv2.so
swiftshader/libvulkan.so
swiftshader/libvk_swiftshader.so
v8_context_snapshot.bin
version

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

@ -67,6 +67,6 @@ resources/default_app.asar
snapshot_blob.bin
swiftshader/libEGL.so
swiftshader/libGLESv2.so
swiftshader/libvulkan.so
swiftshader/libvk_swiftshader.so
v8_context_snapshot.bin
version

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

@ -67,6 +67,6 @@ resources/default_app.asar
snapshot_blob.bin
swiftshader/libEGL.so
swiftshader/libGLESv2.so
swiftshader/libvulkan.so
swiftshader/libvk_swiftshader.so
v8_context_snapshot.bin
version

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

@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@ -16,6 +17,7 @@
#include "content/public/common/pepper_plugin_info.h"
#include "electron/buildflags/buildflags.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "shell/browser/atom_paths.h"
#include "shell/common/options_switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"

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

@ -9,6 +9,7 @@
#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "content/public/common/content_client.h"
namespace electron {

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

@ -9,33 +9,12 @@
#include "printing/buildflags/buildflags.h"
#include "services/service_manager/public/cpp/manifest_builder.h"
#if BUILDFLAG(ENABLE_PRINTING)
#include "components/services/pdf_compositor/public/cpp/manifest.h"
#endif
namespace {
// TODO(https://crbug.com/781334): Remove these helpers and just update the
// manifest definitions to be marked out-of-process. This is here only to avoid
// extra churn when transitioning away from content_packaged_services.
service_manager::Manifest MakeOutOfProcess(
const service_manager::Manifest& manifest) {
// cpplint.py emits a false positive [build/include_what_you_use]
service_manager::Manifest copy(manifest); // NOLINT
copy.options.execution_mode =
service_manager::Manifest::ExecutionMode::kOutOfProcessBuiltin;
return copy;
}
} // namespace
const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
static base::NoDestructor<service_manager::Manifest> manifest{
service_manager::ManifestBuilder()
.WithDisplayName("Electron (browser process)")
.RequireCapability("device", "device:geolocation_control")
.RequireCapability("chrome_printing", "converter")
.RequireCapability("pdf_compositor", "compositor")
.ExposeInterfaceFilterCapability_Deprecated(
"navigation:frame", "renderer",
service_manager::Manifest::InterfaceList<
@ -43,13 +22,3 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
.Build()};
return *manifest;
}
const std::vector<service_manager::Manifest>&
GetElectronBuiltinServiceManifests() {
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
#if BUILDFLAG(ENABLE_PRINTING)
MakeOutOfProcess(printing::GetPdfCompositorManifest()),
#endif
}};
return *manifests;
}

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

@ -10,7 +10,5 @@
#include "services/service_manager/public/cpp/manifest.h"
const service_manager::Manifest& GetElectronContentBrowserOverlayManifest();
const std::vector<service_manager::Manifest>&
GetElectronBuiltinServiceManifests();
#endif // SHELL_APP_MANIFESTS_H_

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

@ -122,10 +122,11 @@ bool MatchesCookie(const base::Value& filter,
// Remove cookies from |list| not matching |filter|, and pass it to |callback|.
void FilterCookies(const base::Value& filter,
util::Promise<net::CookieList> promise,
const net::CookieList& list,
const net::CookieStatusList& list,
const net::CookieStatusList& excluded_list) {
net::CookieList result;
for (const auto& cookie : list) {
net::CookieList stripped_cookies = net::cookie_util::StripStatuses(list);
for (const auto& cookie : stripped_cookies) {
if (MatchesCookie(filter, cookie))
result.push_back(cookie);
}
@ -184,22 +185,13 @@ v8::Local<v8::Promise> Cookies::Get(const base::DictionaryValue& filter) {
browser_context_.get());
auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
if (url.is_empty()) {
// GetAllCookies has a different callback signature than GetCookieList, but
// can be treated as the same, just returning no excluded cookies.
// |AddCookieStatusList| takes a |GetCookieListCallback| and returns a
// callback that calls the input callback with an empty excluded list.
manager->GetAllCookies(
net::cookie_util::AddCookieStatusList(std::move(callback)));
} else {
net::CookieOptions options;
options.set_include_httponly();
options.set_same_site_cookie_context(
net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
options.set_do_not_update_access_time();
net::CookieOptions options;
options.set_include_httponly();
options.set_same_site_cookie_context(
net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
options.set_do_not_update_access_time();
manager->GetCookieList(url, options, std::move(callback));
}
manager->GetCookieList(url, options, std::move(callback));
return handle;
}

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

@ -8,7 +8,7 @@
#include <utility>
#include "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/strings/sys_string_conversions.h"
#include "base/task/post_task.h"
#include "content/public/browser/browser_task_traits.h"

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

@ -9,7 +9,7 @@
#include <string>
#include <utility>
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/no_destructor.h"
#include "base/optional.h"
#include "base/strings/utf_string_conversions.h"
@ -1674,6 +1674,8 @@ void WebContents::Print(mate::Arguments* args) {
settings.SetString(printing::kSettingHeaderFooterTitle, header);
settings.SetString(printing::kSettingHeaderFooterURL, footer);
} else {
settings.SetBoolean(printing::kSettingHeaderFooterEnabled, false);
}
// We don't want to allow the user to enable these settings

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

@ -769,11 +769,6 @@ AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
return base::nullopt;
}
std::vector<service_manager::Manifest>
AtomBrowserClient::GetExtraServiceManifests() {
return GetElectronBuiltinServiceManifests();
}
std::unique_ptr<content::BrowserMainParts>
AtomBrowserClient::CreateBrowserMainParts(
const content::MainFunctionParams& params) {
@ -983,8 +978,7 @@ bool AtomBrowserClient::WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame_host,
int render_process_id,
bool is_navigation,
bool is_download,
URLLoaderFactoryType type,
const url::Origin& request_initiator,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
@ -1080,6 +1074,13 @@ std::string AtomBrowserClient::GetApplicationLocale() {
return *g_application_locale;
}
base::FilePath AtomBrowserClient::GetFontLookupTableCacheDir() {
base::FilePath user_data_dir;
base::PathService::Get(DIR_USER_DATA, &user_data_dir);
DCHECK(!user_data_dir.empty());
return user_data_dir.Append(FILE_PATH_LITERAL("FontLookupTableCache"));
}
bool AtomBrowserClient::ShouldEnableStrictSiteIsolation() {
// Enable site isolation. It is off by default in Chromium <= 69.
return true;

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

@ -11,6 +11,7 @@
#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host_observer.h"
@ -60,6 +61,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
// content::ContentBrowserClient:
std::string GetApplicationLocale() override;
base::FilePath GetFontLookupTableCacheDir() override;
// content::ContentBrowserClient:
bool ShouldEnableStrictSiteIsolation() override;
@ -148,7 +150,6 @@ class AtomBrowserClient : public content::ContentBrowserClient,
network::mojom::NetworkContext* GetSystemNetworkContext() override;
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
base::StringPiece name) override;
std::vector<service_manager::Manifest> GetExtraServiceManifests() override;
content::MediaObserver* GetMediaObserver() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
content::PlatformNotificationService* GetPlatformNotificationService(
@ -173,8 +174,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
int render_process_id,
bool is_navigation,
bool is_download,
URLLoaderFactoryType type,
const url::Origin& request_initiator,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,

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

@ -18,7 +18,7 @@ using content::BrowserThread;
namespace electron {
CookieChangeNotifier::CookieChangeNotifier(AtomBrowserContext* browser_context)
: browser_context_(browser_context), binding_(this) {
: browser_context_(browser_context), receiver_(this) {
StartListening();
}
@ -34,28 +34,26 @@ CookieChangeNotifier::RegisterCookieChangeCallback(
void CookieChangeNotifier::StartListening() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!binding_.is_bound());
DCHECK(!receiver_.is_bound());
network::mojom::CookieManager* cookie_manager =
content::BrowserContext::GetDefaultStoragePartition(browser_context_)
->GetCookieManagerForBrowserProcess();
// Cookie manager should be created whenever network context is created,
// if this fails then there is something wrong with our context creation
// cycle.
CHECK(cookie_manager);
network::mojom::CookieChangeListenerPtr listener_ptr;
binding_.Bind(mojo::MakeRequest(&listener_ptr));
binding_.set_connection_error_handler(base::BindOnce(
cookie_manager->AddGlobalChangeListener(receiver_.BindNewPipeAndPassRemote());
receiver_.set_disconnect_handler(base::BindOnce(
&CookieChangeNotifier::OnConnectionError, base::Unretained(this)));
cookie_manager->AddGlobalChangeListener(std::move(listener_ptr));
}
void CookieChangeNotifier::OnConnectionError() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
binding_.Close();
receiver_.reset();
StartListening();
}

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

@ -9,7 +9,7 @@
#include "base/callback_list.h"
#include "base/macros.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
namespace electron {
@ -38,7 +38,8 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
AtomBrowserContext* browser_context_;
base::CallbackList<void(const CookieDetails*)> cookie_change_sub_list_;
mojo::Binding<network::mojom::CookieChangeListener> binding_;
mojo::Receiver<network::mojom::CookieChangeListener> receiver_;
DISALLOW_COPY_AND_ASSIGN(CookieChangeNotifier);
};

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

@ -7,7 +7,7 @@
#include <string>
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/task/thread_pool/initialization_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/content_switches.h"

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

@ -5,7 +5,7 @@
#ifndef SHELL_BROWSER_MICROTASKS_RUNNER_H_
#define SHELL_BROWSER_MICROTASKS_RUNNER_H_
#include "base/message_loop/message_loop.h"
#include "base/task/task_observer.h"
namespace v8 {
class Isolate;
@ -19,11 +19,11 @@ namespace electron {
// Node follows the kExplicit MicrotasksPolicy, and we do the same in browser
// process. Hence, we need to have this task observer to flush the queued
// microtasks.
class MicrotasksRunner : public base::MessageLoop::TaskObserver {
class MicrotasksRunner : public base::TaskObserver {
public:
explicit MicrotasksRunner(v8::Isolate* isolate);
// base::MessageLoop::TaskObserver
// base::TaskObserver
void WillProcessTask(const base::PendingTask& pending_task) override;
void DidProcessTask(const base::PendingTask& pending_task) override;

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

@ -12,6 +12,7 @@
#include "mojo/public/cpp/bindings/binding_set.h"
#include "native_mate/dictionary.h"
#include "net/url_request/url_request_job_factory.h"
#include "services/network/public/cpp/resource_response.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
namespace electron {

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

@ -486,10 +486,6 @@ void OffScreenRenderWidgetHostView::SubmitCompositorFrame(
NOTREACHED();
}
void OffScreenRenderWidgetHostView::ClearCompositorFrame() {
NOTREACHED();
}
void OffScreenRenderWidgetHostView::ResetFallbackToFirstNavigationSurface() {
GetDelegatedFrameHost()->ResetFallbackToFirstNavigationSurface();
}

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

@ -122,7 +122,6 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) override;
void ClearCompositorFrame(void) override;
void ResetFallbackToFirstNavigationSurface() override;
void InitAsPopup(content::RenderWidgetHostView* rwhv,
const gfx::Rect& rect) override;

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

@ -7,7 +7,7 @@
#include <string>
#include <vector>
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/message_loop/message_pump_mac.h"
#include "base/strings/sys_string_conversions.h"
#include "base/task/post_task.h"

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

@ -150,11 +150,13 @@ bool MenuBar::AcceleratorPressed(const ui::Accelerator& accelerator) {
return true;
case ui::VKEY_HOME:
GetFocusManager()->SetFocusedViewWithReason(
GetFirstFocusableChild(), views::FocusManager::kReasonFocusTraversal);
GetFirstFocusableChild(),
views::FocusManager::FocusChangeReason::kFocusTraversal);
return true;
case ui::VKEY_END:
GetFocusManager()->SetFocusedViewWithReason(
GetLastFocusableChild(), views::FocusManager::kReasonFocusTraversal);
GetLastFocusableChild(),
views::FocusManager::FocusChangeReason::kFocusTraversal);
return true;
default: {
auto children = GetChildrenInZOrder();

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

@ -71,8 +71,6 @@ class MenuBar : public views::AccessiblePaneView,
// views::AccessiblePaneView:
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
bool SetPaneFocus(views::View* initial_focus) override;
void RemovePaneFocus() override;
protected:
// views::View:
@ -84,6 +82,9 @@ class MenuBar : public views::AccessiblePaneView,
const ui::Event* event) override;
void OnThemeChanged() override;
bool SetPaneFocus(views::View* initial_focus);
void RemovePaneFocus();
private:
friend class MenuBarColorUpdater;

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

@ -160,7 +160,8 @@ void RootView::RestoreFocus() {
View* last_focused_view = last_focused_view_tracker_->view();
if (last_focused_view) {
GetFocusManager()->SetFocusedViewWithReason(
last_focused_view, views::FocusManager::kReasonFocusRestore);
last_focused_view,
views::FocusManager::FocusChangeReason::kFocusRestore);
}
if (menu_bar_autohide_)
SetMenuBarVisibility(false);

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

@ -18,19 +18,20 @@ namespace electron {
namespace api {
ui::ClipboardType Clipboard::GetClipboardType(mate::Arguments* args) {
ui::ClipboardBuffer Clipboard::GetClipboardBuffer(mate::Arguments* args) {
std::string type;
if (args->GetNext(&type) && type == "selection")
return ui::ClipboardType::kSelection;
return ui::ClipboardBuffer::kSelection;
else
return ui::ClipboardType::kCopyPaste;
return ui::ClipboardBuffer::kCopyPaste;
}
std::vector<base::string16> Clipboard::AvailableFormats(mate::Arguments* args) {
std::vector<base::string16> format_types;
bool ignore;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadAvailableTypes(GetClipboardType(args), &format_types, &ignore);
clipboard->ReadAvailableTypes(GetClipboardBuffer(args), &format_types,
&ignore);
return format_types;
}
@ -38,7 +39,7 @@ bool Clipboard::Has(const std::string& format_string, mate::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
ui::ClipboardFormatType format(
ui::ClipboardFormatType::GetType(format_string));
return clipboard->IsFormatAvailable(format, GetClipboardType(args));
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args));
}
std::string Clipboard::Read(const std::string& format_string) {
@ -66,14 +67,14 @@ void Clipboard::WriteBuffer(const std::string& format,
return;
}
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteData(
ui::ClipboardFormatType::GetType(format).Serialize(),
std::string(node::Buffer::Data(buffer), node::Buffer::Length(buffer)));
}
void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
base::string16 text, html, bookmark;
gfx::Image image;
@ -99,7 +100,7 @@ void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
base::string16 Clipboard::ReadText(mate::Arguments* args) {
base::string16 data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
auto type = GetClipboardType(args);
auto type = GetClipboardBuffer(args);
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::GetPlainTextWType(),
type)) {
clipboard->ReadText(type, &data);
@ -113,19 +114,19 @@ base::string16 Clipboard::ReadText(mate::Arguments* args) {
}
void Clipboard::WriteText(const base::string16& text, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteText(text);
}
base::string16 Clipboard::ReadRTF(mate::Arguments* args) {
std::string data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadRTF(GetClipboardType(args), &data);
clipboard->ReadRTF(GetClipboardBuffer(args), &data);
return base::UTF8ToUTF16(data);
}
void Clipboard::WriteRTF(const std::string& text, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteRTF(text);
}
@ -136,13 +137,13 @@ base::string16 Clipboard::ReadHTML(mate::Arguments* args) {
uint32_t start;
uint32_t end;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadHTML(GetClipboardType(args), &html, &url, &start, &end);
clipboard->ReadHTML(GetClipboardBuffer(args), &html, &url, &start, &end);
data = html.substr(start, end - start);
return data;
}
void Clipboard::WriteHTML(const base::string16& html, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteHTML(html, std::string());
}
@ -160,18 +161,18 @@ v8::Local<v8::Value> Clipboard::ReadBookmark(mate::Arguments* args) {
void Clipboard::WriteBookmark(const base::string16& title,
const std::string& url,
mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteBookmark(title, url);
}
gfx::Image Clipboard::ReadImage(mate::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
SkBitmap bitmap = clipboard->ReadImage(GetClipboardType(args));
SkBitmap bitmap = clipboard->ReadImage(GetClipboardBuffer(args));
return gfx::Image::CreateFrom1xBitmap(bitmap);
}
void Clipboard::WriteImage(const gfx::Image& image, mate::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardType(args));
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
SkBitmap orig = image.AsBitmap();
SkBitmap bmp;
@ -189,7 +190,7 @@ base::string16 Clipboard::ReadFindText() {
#endif
void Clipboard::Clear(mate::Arguments* args) {
ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardType(args));
ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardBuffer(args));
}
} // namespace api

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

@ -19,7 +19,7 @@ namespace api {
class Clipboard {
public:
static ui::ClipboardType GetClipboardType(mate::Arguments* args);
static ui::ClipboardBuffer GetClipboardBuffer(mate::Arguments* args);
static std::vector<base::string16> AvailableFormats(mate::Arguments* args);
static bool Has(const std::string& format_string, mate::Arguments* args);
static void Clear(mate::Arguments* args);

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

@ -62,13 +62,13 @@ int Main(std::vector<char*>* args) {
base::FilePath operating_dir(
cmd_line->GetSwitchValueNative(crash_reporter::kCrashesDirectoryKey));
CreateCrashServiceDirectory(operating_dir);
base::FilePath log_file = operating_dir.Append(kStandardLogFile);
base::FilePath log_file_path = operating_dir.Append(kStandardLogFile);
// Logging to stderr (to help with debugging failures on the
// buildbots) and to a file.
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_ALL;
settings.log_file = log_file.value().c_str();
settings.log_file_path = log_file_path.value().c_str();
logging::InitLogging(settings);
// Logging with pid, tid and timestamp.
logging::SetLogItems(true, true, true, false);

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

@ -6,10 +6,9 @@
#define SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_
#include "base/files/file_path.h"
#include "shell/common/gin_converters/string16_converter.h"
#include "gin/converter.h"
namespace gin {
template <>
struct Converter<base::FilePath> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
@ -22,6 +21,12 @@ struct Converter<base::FilePath> {
if (val->IsNull())
return true;
v8::String::Value str(isolate, val);
if (str.length() == 0) {
*out = base::FilePath();
return true;
}
base::FilePath::StringType path;
if (Converter<base::FilePath::StringType>::FromV8(isolate, val, &path)) {
*out = base::FilePath(path);

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

@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
@ -23,7 +24,6 @@
#include "services/network/public/cpp/resource_request.h"
#include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_converters/string16_converter.h"
#include "shell/common/gin_converters/value_converter_gin_adapter.h"
#include "shell/common/node_includes.h"

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

@ -1,41 +0,0 @@
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_
#define SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_
#include "base/strings/string16.h"
#include "gin/converter.h"
namespace gin {
template <>
struct Converter<base::string16> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::string16& val) {
return v8::String::NewFromTwoByte(
isolate, reinterpret_cast<const uint16_t*>(val.data()),
v8::NewStringType::kNormal, val.size())
.ToLocalChecked();
}
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
base::string16* out) {
if (!val->IsString())
return false;
v8::String::Value s(isolate, val);
out->assign(reinterpret_cast<const base::char16*>(*s), s.length());
return true;
}
};
inline v8::Local<v8::String> StringToV8(v8::Isolate* isolate,
const base::string16& input) {
return ConvertToV8(isolate, input).As<v8::String>();
}
} // namespace gin
#endif // SHELL_COMMON_GIN_CONVERTERS_STRING16_CONVERTER_H_

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

@ -417,7 +417,7 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
std::vector<base::string16> types;
bool ignore;
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
ui::ClipboardType::kCopyPaste, &types, &ignore);
ui::ClipboardBuffer::kCopyPaste, &types, &ignore);
pasteFlag = !types.empty();
}
dict.Set("canPaste", pasteFlag);

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

@ -5,8 +5,8 @@
#ifndef SHELL_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
#define SHELL_COMMON_NATIVE_MATE_CONVERTERS_STRING16_CONVERTER_H_
#include "gin/converter.h"
#include "native_mate/converter.h"
#include "shell/common/gin_converters/string16_converter.h"
namespace mate {

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

@ -20,7 +20,7 @@
#include "services/service_manager/sandbox/switches.h"
#if BUILDFLAG(ENABLE_PRINTING)
#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h"
#include "components/services/pdf_compositor/pdf_compositor_impl.h"
#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
#if defined(OS_WIN)
@ -36,13 +36,6 @@ namespace electron {
namespace {
void RunServiceAsyncThenTerminateProcess(
std::unique_ptr<service_manager::Service> service) {
service_manager::Service::RunAsyncUntilTermination(
std::move(service),
base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
}
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
auto RunPrintingService(
mojo::PendingReceiver<printing::mojom::PrintingService> receiver) {
@ -50,6 +43,15 @@ auto RunPrintingService(
}
#endif
#if BUILDFLAG(ENABLE_PRINTING)
auto RunPdfCompositor(
mojo::PendingReceiver<printing::mojom::PdfCompositor> receiver) {
return std::make_unique<printing::PdfCompositorImpl>(
std::move(receiver), true /* initialize_environment */,
content::UtilityThread::Get()->GetIOTaskRunner());
}
#endif
auto RunProxyResolver(
mojo::PendingReceiver<proxy_resolver::mojom::ProxyResolverFactory>
receiver) {
@ -114,22 +116,13 @@ bool AtomContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
return false;
}
bool AtomContentUtilityClient::HandleServiceRequest(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) {
auto service = MaybeCreateMainThreadService(service_name, std::move(request));
if (service) {
RunServiceAsyncThenTerminateProcess(std::move(service));
return true;
}
return false;
}
mojo::ServiceFactory* AtomContentUtilityClient::GetMainThreadServiceFactory() {
static base::NoDestructor<mojo::ServiceFactory> factory {
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
RunPrintingService
#if BUILDFLAG(ENABLE_PRINTING)
RunPdfCompositor,
#if defined(OS_WIN)
RunPrintingService
#endif
#endif
};
return factory.get();
@ -140,17 +133,4 @@ mojo::ServiceFactory* AtomContentUtilityClient::GetIOThreadServiceFactory() {
return factory.get();
}
std::unique_ptr<service_manager::Service>
AtomContentUtilityClient::MaybeCreateMainThreadService(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) {
#if BUILDFLAG(ENABLE_PRINTING)
if (service_name == printing::mojom::kServiceName) {
return printing::CreatePdfCompositorService(std::move(request));
}
#endif
return nullptr;
}
} // namespace electron

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

@ -26,16 +26,10 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
void UtilityThreadStarted() override;
bool OnMessageReceived(const IPC::Message& message) override;
bool HandleServiceRequest(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) override;
mojo::ServiceFactory* GetMainThreadServiceFactory() override;
mojo::ServiceFactory* GetIOThreadServiceFactory() override;
private:
std::unique_ptr<service_manager::Service> MaybeCreateMainThreadService(
const std::string& service_name,
service_manager::mojom::ServiceRequest request);
#if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
std::unique_ptr<printing::PrintingHandler> printing_handler_;
#endif