chore: bump chromium to 580fe983e138952553cd6af11ee8b (master) (#23379)
* chore: bump chromium in DEPS to 5ce64b91b4d6a78c97480059f15ff6469fc0918e * chore: bump chromium in DEPS to e74c73d0000f81b3f40a513176c8d024bba57d28 * chore: bump chromium in DEPS to 501640e650d4657ba63db65fa257e4a899168de7 * chore: bump chromium in DEPS to 00db20e1bc3d77706723a87ada3c1c647a1c37b7 * chore: update patches * refactor: AddNewContents now takes a target_url Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2167732 * chore: SetHostCleanupFinalizationGroupCallback has been removed from V8 * refactor: use WebInputEvent::Namespace types directly Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2160523 * refactor: FollowRedirect takes in cors exempt headers now Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2129787 * refactor: printing::DuplexMode moved to mojo Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2162388 * refactor: use MessagePortDescriptor instead of raw mojo::MessagePipeHandles Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1952124 * chore: update patches * chore: bump chromium in DEPS to f1537676d613f3567cfb43adf577b3847fba4bc3 * chore: update patches * refactor: service_manager::BinderMapWithContext merged into mojo::BinderMap Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2174654 * chore: unused argument removed from ReadAvailableTypes in ui::Clipboard Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2173666 * chore: bump chromium in DEPS to 949888433ab935dd6125c107226a4c9d6da9bf48 * chore: update patches * update patches * chore: update sysroots * chore: bump chromium in DEPS to eaac5b5035fe189b6706e1637122e37134206059 * chore: bump chromium in DEPS to 258b54b903d33dab963adf59016691e6537f8b70 * build: update patches * refactor: cursor.mojom and cursor_types.mojom moved to //ui/base/cursor/mojom Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172874 * chore: DesktopWindowTreeHostLinux becomes DesktopWindowTreeHostPlatform Refs: * refactor: LogErrorEventDescription moved from ui to x11 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2164245 * chore: update patches * chore: bump chromium in DEPS to bd06abcfe807d4461683479237cdd920dafa52ca * chore: bump chromium in DEPS to 1afb0891e56f1e79d204db43ca053a46d0974511 * chore: bump chromium in DEPS to 5cb0f794bf7f155bf8c0a241b94e01c9d90c2744 * chore: bump chromium in DEPS to 37327ba3303234e1a3cd3310ca11a68e81b95123 * update patches * remove ClientSideDetectionService from browser_process Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2175320 * refactor: shuttle cursor changed event to WebContentsObserver Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 * chore: bump chromium in DEPS to 1d97904bb6936e106df13705208b73e47367c2b9 * avoid IPC crash introduced earlier in the roll Refs:b67334e781 (diff-607f4e8f7c5686aa09af98c783925babR128)
* remove WebContentsView::SizeContents Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2188931 * chore: bump chromium in DEPS to 87066d1db0546a9de33952ba964e1e42f76f1dae * update patches * adapt to //content creating NetworkContexts https://chromium-review.googlesource.com/c/chromium/src/+/2195196 * WIP temporarily ignore mojo-ified PrintHostMsg_PrintPreviewFailed Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2195343 * add checkout_pgo_profiles to DEPS * chore: bump chromium in DEPS to a095318bec1dedf580d676f408eaeefdbd9956b1 * add blink's execution_context to electron_lib deps Refs:b67334e781
#, https://chromium-review.googlesource.com/c/chromium/src/+/1952124 * update patches * update patches * refactor: use newly mojo-ified PrintPreviewFailed Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2195343 Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: update patches * chore: remove NOTIFICATION_EXTENSIONS_READY_DEPRECATED Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2199874 * avoid a call to Profile::FromBrowserContext in printing Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2195757 * chore: bump chromium in DEPS to 8f5c6a46861a991e12ffd80554b6bd41a11b0b65 * chore: bump chromium in DEPS to ab66134739ff3b6bdb8de53bbc58a97d1b7b5d8a * chore: bump chromium in DEPS to dd08df9f6c8d6198f0a7b931ca9e845e27dae033 * chore: update patches * [printing] Mojofy PrintHostMsg_PrintPreviewCancelled https://chromium-review.googlesource.com/c/chromium/src/+/2198331 * [printing] Mojofy PrintHostMsg_PrintPreviewInvalidPrinterSettings https://chromium-review.googlesource.com/c/chromium/src/+/2200556 * [printing] Mojofy PrintHostMsg_DidPrepareDocumentForPreview https://chromium-review.googlesource.com/c/chromium/src/+/2201496 * fix: inherit base network context params * fix: use message handle api specific to embedders * update patches * chore: update v8 headers * fixup! avoid a call to Profile::FromBrowserContext in printing * chore: bump chromium in DEPS to f198bc3276828d992b6202d75a9da6a8363164ea * chore: update patches * Remove cors_exempt_headers.h https://chromium-review.googlesource.com/c/chromium/src/+/2203759 * Supply speech recognition sandbox from service_sandbox_type.h https://chromium-review.googlesource.com/c/chromium/src/+/2206918 * [content] Remove unused methods from WebContents https://chromium-review.googlesource.com/c/chromium/src/+/2199113 * [XProto] Replace XAtom with x11::Atom https://chromium-review.googlesource.com/c/chromium/src/+/2202789 * chore: bump chromium in DEPS to 5df37fabaaed09f3ea511f4ef49203d8ebee7b68 * [UI] Support secondary labels in dropdown menus https://chromium-review.googlesource.com/c/chromium/src/+/2208976 * chore: update patches * refactor: GetSublabelAt => GetSecondaryLabelAt * Revert "[printing] Mojofy PrintHostMsg_DidPrepareDocumentForPreview" This reverts commit 44ed0892a0c81716229638f17253bbb2cf8f037d. https://chromium-review.googlesource.com/c/chromium/src/+/2208778 * Unnest CanonicalCookie::CookieInclusionStatus https://chromium-review.googlesource.com/c/chromium/src/+/2203171 * update print-to-pdf.html with latest html data https://bugs.chromium.org/p/chromium/issues/detail?id=1085667 * chore: bump chromium in DEPS to 5dfa8d5f706580fe983e138952553cd6af11ee8b * fix crash in x server when setting window icon * chore: update patches * Use a normal return value for WebContentsView::GetContainerBounds. https://chromium-review.googlesource.com/c/chromium/src/+/2212481 * fix build on windows * chore: bump chromium in DEPS to 9d15054f4cba060901e43deecf74002f11f47be3 * chore: update patches * [printing] Mojofy PrintHostMsg_CheckForCancel https://chromium-review.googlesource.com/c/chromium/src/+/2212181 Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Andy Locascio <andy@slack-corp.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
parent
2b39111e30
commit
dc72f74020
128 changed files with 3519 additions and 2749 deletions
4
DEPS
4
DEPS
|
@ -5,6 +5,7 @@ gclient_gn_args = [
|
|||
'checkout_android_native_support',
|
||||
'checkout_libaom',
|
||||
'checkout_nacl',
|
||||
'checkout_pgo_profiles',
|
||||
'checkout_oculus_sdk',
|
||||
'checkout_openxr',
|
||||
'checkout_google_benchmark'
|
||||
|
@ -12,7 +13,7 @@ gclient_gn_args = [
|
|||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'17da1064b910f4170320ff37e971064916aed1dc',
|
||||
'9d15054f4cba060901e43deecf74002f11f47be3',
|
||||
'node_version':
|
||||
'v12.16.3',
|
||||
'nan_version':
|
||||
|
@ -42,6 +43,7 @@ vars = {
|
|||
'checkout_chromium': True,
|
||||
'checkout_node': True,
|
||||
'checkout_nan': True,
|
||||
'checkout_pgo_profiles': True,
|
||||
|
||||
# It's only needed to parse the native tests configurations.
|
||||
'checkout_pyyaml': False,
|
||||
|
|
|
@ -72,6 +72,7 @@ static_library("chrome") {
|
|||
]
|
||||
deps = [
|
||||
"//chrome/browser:resource_prefetch_predictor_proto",
|
||||
"//chrome/services/speech:buildflags",
|
||||
"//components/feature_engagement:buildflags",
|
||||
"//components/optimization_guide/proto:optimization_guide_proto",
|
||||
]
|
||||
|
|
|
@ -66,7 +66,6 @@ disable_compositor_recycling.patch
|
|||
allow_new_privileges_in_unsandboxed_child_processes.patch
|
||||
expose_setuseragent_on_networkcontext.patch
|
||||
feat_add_set_theme_source_to_allow_apps_to.patch
|
||||
revert_cleanup_remove_menu_subtitles_sublabels.patch
|
||||
add_webmessageportconverter_entangleandinjectmessageportchannel.patch
|
||||
revert_remove_contentrendererclient_shouldfork.patch
|
||||
ignore_rc_check.patch
|
||||
|
@ -89,10 +88,13 @@ feat_add_onclose_to_messageport.patch
|
|||
fix_account_for_print_preview_disabled_when_printing_to_pdf.patch
|
||||
web_contents.patch
|
||||
ui_gtk_public_header.patch
|
||||
crash_allow_embedder_to_set_crash_upload_url.patch
|
||||
refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
|
||||
crash_allow_setting_more_options.patch
|
||||
breakpad_treat_node_processes_as_browser_processes.patch
|
||||
upload_list_add_loadsync_method.patch
|
||||
breakpad_allow_getting_string_values_for_crash_keys.patch
|
||||
crash_allow_disabling_compression_on_linux.patch
|
||||
fix_hunspell_crash.patch
|
||||
allow_setting_secondary_label_via_simplemenumodel.patch
|
||||
fix_xserver_crash_when_using_xwindow_setxwindowicons.patch
|
||||
disable_unnecessary_ischromefirstrun_check.patch
|
||||
disable_dcheck_that_fails_with_software_compositing.patch
|
||||
|
|
|
@ -10,18 +10,18 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
|||
3. Ctrl-Shift-= should show as Ctrl-+
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index 291bdeec97bec510f7c86a8e8bccab22b7d5d8ac..926a705c23bd5adbfc0fe178c44617086b946a80 100644
|
||||
index 7f26ef86fe967663a50bb556b49a37e1d10d5462..c83431034b9ddf0084f2ee2fc2538e4fb5aa0f0c 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/logging.h"
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/string_util.h"
|
||||
+#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
@@ -22,9 +23,7 @@
|
||||
@@ -23,9 +24,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@ index 291bdeec97bec510f7c86a8e8bccab22b7d5d8ac..926a705c23bd5adbfc0fe178c4461708
|
|||
|
||||
#if defined(OS_CHROMEOS)
|
||||
#include "ui/base/ui_base_features.h"
|
||||
@@ -220,7 +219,15 @@ base::string16 Accelerator::GetShortcutText() const {
|
||||
@@ -204,7 +203,15 @@ base::string16 Accelerator::GetShortcutText() const {
|
||||
shortcut = KeyCodeToName();
|
||||
#endif
|
||||
|
||||
|
@ -47,7 +47,7 @@ index 291bdeec97bec510f7c86a8e8bccab22b7d5d8ac..926a705c23bd5adbfc0fe178c4461708
|
|||
#if defined(OS_WIN)
|
||||
// Our fallback is to try translate the key code to a regular character
|
||||
// unless it is one of digits (VK_0 to VK_9). Some keyboard
|
||||
@@ -229,21 +236,14 @@ base::string16 Accelerator::GetShortcutText() const {
|
||||
@@ -213,21 +220,14 @@ base::string16 Accelerator::GetShortcutText() const {
|
||||
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
|
||||
// default zoom level), we leave VK_[0-9] alone without translation.
|
||||
wchar_t key;
|
||||
|
@ -75,7 +75,7 @@ index 291bdeec97bec510f7c86a8e8bccab22b7d5d8ac..926a705c23bd5adbfc0fe178c4461708
|
|||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -426,7 +426,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
|
||||
@@ -410,7 +410,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
|
||||
// more information.
|
||||
if (IsCtrlDown())
|
||||
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);
|
||||
|
|
|
@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
|||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 4ba4a1505651f9e63c4476322a12762e46ac9c6b..39e81a63d549c690a040dd463d0300de01abf419 100644
|
||||
index 4f34ae087e6e537869fe95858f943025ee32c82d..b1c939bd735ad6ed6a435258ef50c7a7ebf76481 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -247,6 +247,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
@@ -255,6 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
|
@ -24,8 +24,8 @@ index 4ba4a1505651f9e63c4476322a12762e46ac9c6b..39e81a63d549c690a040dd463d0300de
|
|||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -363,7 +367,6 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
}));
|
||||
@@ -373,7 +377,6 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
}
|
||||
#endif
|
||||
|
||||
- auto* client = GetContentClient()->gpu();
|
||||
|
|
|
@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
|||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 68822e9c91633d9433c52bdf3484f6c660eb7917..c14a7b2a1897f805f072d8156765f909f1410001 100644
|
||||
index 831a3574055881f31a3e7dbc98c0525b47af5dcb..9626f181ee471fec68af7ddfc968f2d852698b74 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -114,6 +114,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
|
@ -23,10 +23,10 @@ index 68822e9c91633d9433c52bdf3484f6c660eb7917..c14a7b2a1897f805f072d8156765f909
|
|||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 1ca9dc1dab20fb1ca4d461fbe3068323ee6b9b44..95e9039217f44dcaf770ffea2979976e79d276ab 100644
|
||||
index c01f9074c4896d7d67609efa86d5a0e995fa974c..95cec369e38dada721cbf26fe244461171d748f8 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4865,6 +4865,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4807,6 +4807,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ index 1ca9dc1dab20fb1ca4d461fbe3068323ee6b9b44..95e9039217f44dcaf770ffea2979976e
|
|||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index b839ead18e704d6e3cbb9ee62882438ca91d4823..f54218f24522ee2d28462e127b52d8ba4d529330 100644
|
||||
index 2d34029a192ad9680d445ae6c5394f1fbfc7e894..9f21385919593cfb1314d9fb659e4b5a3326bf44 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -751,6 +751,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
|
@ -53,10 +53,10 @@ index b839ead18e704d6e3cbb9ee62882438ca91d4823..f54218f24522ee2d28462e127b52d8ba
|
|||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index e07795d6a2726738e743f38dff795a98663eb71c..d7be6078425928c0e9577d8401e328e5ed2bef0c 100644
|
||||
index 5ab90fc0fb34c9bc5920b7d7efcb8819fed358c0..0a86dc4fc70e6c16e4cb27d6512ae5f589cd1125 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -551,6 +551,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -548,6 +548,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
|
@ -67,7 +67,7 @@ index e07795d6a2726738e743f38dff795a98663eb71c..d7be6078425928c0e9577d8401e328e5
|
|||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
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 81457a2e2b5723aa2ff218b4e410d55d7b7f14f8..a62f6c58bb0aaac836edfd87ab2a6f61045059dc 100644
|
||||
index 1841d4bea144e2fe0fb69839d52ff2ba4aa6b551..64c5eb7d0da7684531b044de9d6d114fc897786e 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
|
||||
@@ -201,6 +201,7 @@ void LocalWindowProxy::Initialize() {
|
||||
|
@ -79,10 +79,10 @@ index 81457a2e2b5723aa2ff218b4e410d55d7b7f14f8..a62f6c58bb0aaac836edfd87ab2a6f61
|
|||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
index 9bcd5333f0a097a2fcfec60152cfbaace0e3c1da..21bd2c2c05fa32de9442877dbb0261066d2d59a3 100644
|
||||
index 8639eecc68c75c311af8ae00c8e028b63624a986..e66039442fbd4d3a456a724afe5eb28314459dc5 100644
|
||||
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
|
||||
@@ -345,6 +345,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -348,6 +348,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ index 9bcd5333f0a097a2fcfec60152cfbaace0e3c1da..21bd2c2c05fa32de9442877dbb026106
|
|||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
index 5c554a74f4d3aca91d5a1428f0b1e871764a98b3..aeb930d769c9dbfeb97ca42b4e000ca5c79c49a6 100644
|
||||
index 2dd3d3d0d036cce2ad49be52915e00c6872eca43..b7c0f955a3388f2c7758d2058d3077e2ba4e8496 100644
|
||||
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
|
||||
@@ -78,6 +78,8 @@ class LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
@ -110,10 +110,10 @@ index 5c554a74f4d3aca91d5a1428f0b1e871764a98b3..aeb930d769c9dbfeb97ca42b4e000ca5
|
|||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index f7cbcbc3ded7362a5fa19b0b50808e88d23838e0..cbcc0996690c63c0e0af500ac229cccbdf047b7c 100644
|
||||
index b9a8d9bce7a02a6f46b91697efd4a32d62638f57..99d6bbdf43748adabf2084310abe458383a25f77 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -291,6 +291,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -297,6 +297,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
|
@ -123,10 +123,10 @@ index f7cbcbc3ded7362a5fa19b0b50808e88d23838e0..cbcc0996690c63c0e0af500ac229cccb
|
|||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index 605166b7950a37f7d85d9a71af8c042bcbcefc8d..a1ac286dd231436e86c24c9aa65300a534d641de 100644
|
||||
index 7f060dbe946a6df2d4e4f376512679390edadc07..435882fafb3e08b94424e812ee825e7a042dfef3 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -334,6 +334,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
|
|
@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement
|
|||
Realloc on the v8 side and correspondingly in gin.
|
||||
|
||||
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
|
||||
index b94a71ef856f92404e16544e22ebbadf57cff363..b15685f6907bcafeb1acd62bfe76f0713dea27f3 100644
|
||||
index 891a2e316f6c9eeda9670aaf5201ed57e5f7ba49..00ea3682f491175c6f9bea727de120f5f0de3dac 100644
|
||||
--- a/gin/array_buffer.cc
|
||||
+++ b/gin/array_buffer.cc
|
||||
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
|
||||
|
@ -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 696a6170a584c1bb71c8ad253963d9f64395a13e..9677aa931cd543adfc1e9844d6afee8dcb0f4c2d 100644
|
||||
index fa88b2bd0233a4c5ff35a26d10e20fa1b91e33b2..21504ce01403d20067c8439c0c61ee0d71de84a5 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -661,6 +661,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
@@ -672,6 +672,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
size, ArrayBufferContents::kDontInitialize);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ WebContents, and cancels the authentication if there's no WebContents
|
|||
available, which there isn't in the case of the 'net' module.
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 18c3c5312be05333e6ed19ad53bb6296be5db4b7..21299b9959c3f9f44c419d769b0aaff59b1d89f7 100644
|
||||
index 6ec25efe5bb2819df27d0ba8fc0646f2b80668a8..06ec91de21cb51e0fba363fd54e7bb3a56b8e391 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -161,6 +161,25 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
|
||||
@@ -198,6 +198,25 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
+interface TrustedAuthClient {
|
||||
|
@ -39,7 +39,7 @@ index 18c3c5312be05333e6ed19ad53bb6296be5db4b7..21299b9959c3f9f44c419d769b0aaff5
|
|||
interface CertVerifierClient {
|
||||
Verify(
|
||||
int32 default_error,
|
||||
@@ -605,6 +624,8 @@ struct URLLoaderFactoryParams {
|
||||
@@ -645,6 +664,8 @@ struct URLLoaderFactoryParams {
|
||||
// impact because of the extra process hops, so use should be minimized.
|
||||
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
|
||||
|
||||
|
@ -49,18 +49,18 @@ index 18c3c5312be05333e6ed19ad53bb6296be5db4b7..21299b9959c3f9f44c419d769b0aaff5
|
|||
// the per-context allow patterns that is managed via NetworkContext
|
||||
// interface. This still respects the per-context block lists.
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index a180f3fe9af9411dec7a6e49da5ee4ef3f7b00f5..92ecdeca6962697d6ca13ff3ad4de8c2d7d1aa8a 100644
|
||||
index 39c382067febf8c317ceca3569555b12cb060f18..8ea8397c55882827f6ff3e9807dc13c6df5301d3 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -442,6 +442,7 @@ URLLoader::URLLoader(
|
||||
@@ -436,6 +436,7 @@ URLLoader::URLLoader(
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
|
||||
mojom::OriginPolicyManager* origin_policy_manager,
|
||||
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory)
|
||||
: url_request_context_(url_request_context),
|
||||
@@ -498,6 +499,11 @@ URLLoader::URLLoader(
|
||||
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
|
||||
mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer)
|
||||
@@ -495,6 +496,11 @@ URLLoader::URLLoader(
|
||||
header_client_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ index a180f3fe9af9411dec7a6e49da5ee4ef3f7b00f5..92ecdeca6962697d6ca13ff3ad4de8c2
|
|||
if (want_raw_headers_) {
|
||||
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
|
||||
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
|
||||
@@ -978,7 +984,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
|
||||
@@ -990,7 +996,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
|
||||
|
||||
void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
const net::AuthChallengeInfo& auth_info) {
|
||||
|
@ -81,7 +81,7 @@ index a180f3fe9af9411dec7a6e49da5ee4ef3f7b00f5..92ecdeca6962697d6ca13ff3ad4de8c2
|
|||
OnAuthCredentials(base::nullopt);
|
||||
return;
|
||||
}
|
||||
@@ -994,11 +1000,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -1006,11 +1012,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
if (url_request->response_headers())
|
||||
head->headers = url_request->response_headers();
|
||||
head->auth_challenge_info = auth_info;
|
||||
|
@ -108,18 +108,18 @@ index a180f3fe9af9411dec7a6e49da5ee4ef3f7b00f5..92ecdeca6962697d6ca13ff3ad4de8c2
|
|||
auth_challenge_responder_receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 4e95817834afd7b9d3a3284a5924646ff784e636..e26a90754565a548d72a74b2936f15ab5c71debb 100644
|
||||
index c8c09642661ca9a3c42e2c928bfd221b40830744..b202db0ccf6d40c534aa8d320291e8a85653a2ce 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -112,6 +112,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -115,6 +115,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
|
||||
mojom::OriginPolicyManager* origin_policy_manager,
|
||||
std::unique_ptr<TrustTokenRequestHelperFactory>
|
||||
trust_token_helper_factory);
|
||||
@@ -443,6 +444,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
trust_token_helper_factory,
|
||||
@@ -453,6 +454,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
base::Optional<base::UnguessableToken> fetch_window_id_;
|
||||
|
||||
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
|
||||
|
@ -128,30 +128,30 @@ index 4e95817834afd7b9d3a3284a5924646ff784e636..e26a90754565a548d72a74b2936f15ab
|
|||
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
|
||||
|
||||
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
|
||||
index 1c43785d9b2c19dd4129f030e3ec9475a9bb4b31..730635d7f18bf95100558c37a1d38304a22f650d 100644
|
||||
index c8f02a3760f938c772c9e81afff8b37e49a73cbd..7e5bb5d1384488de2dee3672f933eba643dc14f7 100644
|
||||
--- a/services/network/url_loader_factory.cc
|
||||
+++ b/services/network/url_loader_factory.cc
|
||||
@@ -68,6 +68,7 @@ URLLoaderFactory::URLLoaderFactory(
|
||||
@@ -75,6 +75,7 @@ URLLoaderFactory::URLLoaderFactory(
|
||||
resource_scheduler_client_(std::move(resource_scheduler_client)),
|
||||
header_client_(std::move(params_->header_client)),
|
||||
coep_reporter_(std::move(params_->coep_reporter)),
|
||||
+ auth_client_(std::move(params_->auth_client)),
|
||||
cors_url_loader_factory_(cors_url_loader_factory) {
|
||||
cors_url_loader_factory_(cors_url_loader_factory),
|
||||
cookie_observer_(std::move(params_->cookie_observer)) {
|
||||
DCHECK(context);
|
||||
DCHECK_NE(mojom::kInvalidProcessId, params_->process_id);
|
||||
@@ -230,6 +231,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
|
||||
@@ -270,6 +271,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
|
||||
std::move(keepalive_statistics_recorder),
|
||||
std::move(network_usage_accumulator),
|
||||
header_client_.is_bound() ? header_client_.get() : nullptr,
|
||||
+ auth_client_.is_bound() ? auth_client_.get() : nullptr,
|
||||
context_->origin_policy_manager(),
|
||||
url_request.trust_token_params
|
||||
? std::make_unique<TrustTokenRequestHelperFactory>(
|
||||
context_->origin_policy_manager(), std::move(trust_token_factory),
|
||||
std::move(cookie_observer));
|
||||
|
||||
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h
|
||||
index 1a623585035487de061ba6476914992ea2f7ac88..caa19dcd4b99296e50f8e22bfc92a70ba14473d1 100644
|
||||
index 8b29b67a5b0663778df3169e09bf818e6bbcec3f..e504fa3d41066907a3fbc41e69daac968415dfa6 100644
|
||||
--- a/services/network/url_loader_factory.h
|
||||
+++ b/services/network/url_loader_factory.h
|
||||
@@ -74,6 +74,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
|
||||
@@ -75,6 +75,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
|
||||
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client_;
|
||||
mojo::Remote<mojom::TrustedURLLoaderHeaderClient> header_client_;
|
||||
mojo::Remote<mojom::CrossOriginEmbedderPolicyReporter> coep_reporter_;
|
||||
|
|
|
@ -20,15 +20,15 @@ least harm in the interim by removing the check that prevents more than
|
|||
one tracker from existing at a time.
|
||||
|
||||
diff --git a/ui/gfx/x/x11_error_tracker.cc b/ui/gfx/x/x11_error_tracker.cc
|
||||
index af031de356c5e0938fd3b84a494e48dc9a0e0476..2a5c18dc473a4f88fc0427bec69142917159bbd9 100644
|
||||
index 6592ae0483884815697358040123eed5ee657816..d6862673c0b5a61db550c084291787ad1549db69 100644
|
||||
--- a/ui/gfx/x/x11_error_tracker.cc
|
||||
+++ b/ui/gfx/x/x11_error_tracker.cc
|
||||
@@ -24,7 +24,7 @@ namespace gfx {
|
||||
X11ErrorTracker::X11ErrorTracker() {
|
||||
// This is a non-exhaustive check for incorrect usage. It disallows nested
|
||||
// X11ErrorTracker instances on the same thread.
|
||||
- DCHECK(g_handler == NULL);
|
||||
+ // DCHECK(g_handler == NULL);
|
||||
- DCHECK(g_handler == nullptr);
|
||||
+ // DCHECK(g_handler == nullptr);
|
||||
g_handler = this;
|
||||
XSync(GetXDisplay(), False);
|
||||
old_handler_ = XSetErrorHandler(X11ErrorHandler);
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Thu, 21 May 2020 13:58:01 -0700
|
||||
Subject: Allow setting secondary label via SimpleMenuModel
|
||||
|
||||
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
|
||||
|
||||
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
|
||||
index 88053e9d501413d18b6a6ae36b76668431db7ee9..481a04c4835d246cfa20edfc4f1dd10ce93fcdb8 100644
|
||||
--- a/ui/base/models/simple_menu_model.cc
|
||||
+++ b/ui/base/models/simple_menu_model.cc
|
||||
@@ -49,6 +49,11 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
return base::string16();
|
||||
}
|
||||
|
||||
+base::string16 SimpleMenuModel::Delegate::GetSecondaryLabelForCommandId(
|
||||
+ int command_id) const {
|
||||
+ return base::string16();
|
||||
+}
|
||||
+
|
||||
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
|
||||
int command_id) const {
|
||||
return ImageModel();
|
||||
@@ -291,6 +296,11 @@ void SimpleMenuModel::SetLabel(int index, const base::string16& label) {
|
||||
MenuItemsChanged();
|
||||
}
|
||||
|
||||
+void SimpleMenuModel::SetSecondaryLabel(int index, const base::string16& secondary_label) {
|
||||
+ items_[ValidateItemIndex(index)].secondary_label = secondary_label;
|
||||
+ MenuItemsChanged();
|
||||
+}
|
||||
+
|
||||
void SimpleMenuModel::SetMinorText(int index,
|
||||
const base::string16& minor_text) {
|
||||
items_[ValidateItemIndex(index)].minor_text = minor_text;
|
||||
@@ -364,6 +374,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
|
||||
return items_[ValidateItemIndex(index)].label;
|
||||
}
|
||||
|
||||
+base::string16 SimpleMenuModel::GetSecondaryLabelAt(int index) const {
|
||||
+ if (IsItemDynamicAt(index))
|
||||
+ return delegate_->GetSecondaryLabelForCommandId(GetCommandIdAt(index));
|
||||
+ return items_[ValidateItemIndex(index)].secondary_label;
|
||||
+}
|
||||
+
|
||||
base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index 92975ff7dc5c5ca217717da6faa0042467076005..84cf58456cd8a879dbf5940737713027057546cd 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -44,6 +44,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
// Some command ids have labels and icons that change over time.
|
||||
virtual bool IsItemForCommandIdDynamic(int command_id) const;
|
||||
virtual base::string16 GetLabelForCommandId(int command_id) const;
|
||||
+ virtual base::string16 GetSecondaryLabelForCommandId(int command_id) const;
|
||||
// Gets the icon for the item with the specified id.
|
||||
virtual ImageModel GetIconForCommandId(int command_id) const;
|
||||
|
||||
@@ -147,6 +148,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
// Sets the label for the item at |index|.
|
||||
void SetLabel(int index, const base::string16& label);
|
||||
|
||||
+ // Sets the secondary_label for the item at |index|.
|
||||
+ void SetSecondaryLabel(int index, const base::string16& secondary_label);
|
||||
+
|
||||
// Sets the minor text for the item at |index|.
|
||||
void SetMinorText(int index, const base::string16& minor_text);
|
||||
|
||||
@@ -173,6 +177,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
|
||||
int GetCommandIdAt(int index) const override;
|
||||
base::string16 GetLabelAt(int index) const override;
|
||||
+ base::string16 GetSecondaryLabelAt(int index) const override;
|
||||
base::string16 GetMinorTextAt(int index) const override;
|
||||
ImageModel GetMinorIconAt(int index) const override;
|
||||
bool IsItemDynamicAt(int index) const override;
|
||||
@@ -207,6 +212,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
int command_id = 0;
|
||||
ItemType type = TYPE_COMMAND;
|
||||
base::string16 label;
|
||||
+ base::string16 secondary_label;
|
||||
base::string16 minor_text;
|
||||
ImageModel minor_icon;
|
||||
ImageModel icon;
|
|
@ -6,7 +6,7 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
|
|||
This allows file:// URLs in workers to have a CSP.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
||||
index dc1858e41ce77fcb3cd9f828cc70ef9e09a23d15..8e1ffef4b630b4981cd37bd669b1187240bca280 100644
|
||||
index c8a4f02e69491345a6353e557b6bbdc34bb2999a..982995c8bf4632a2970c90780f3c2da3f244634e 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
||||
@@ -323,7 +323,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
|
||||
|
|
|
@ -14,10 +14,10 @@ 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 89028fddac1f32a619a3d0b9216932515ef0ed86..c1ba8ffd313256001c99ad605906c11cd06274e9 100644
|
||||
index edaeb74fd7c8cd93fd72dd547bf028415ca891f4..d7be295d1113bf2376c8353fa767578d49cd8cde 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -469,10 +469,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -528,10 +528,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
CHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
|
@ -28,7 +28,7 @@ index 89028fddac1f32a619a3d0b9216932515ef0ed86..c1ba8ffd313256001c99ad605906c11c
|
|||
if (!Client())
|
||||
return;
|
||||
|
||||
@@ -490,6 +486,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -549,6 +545,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
// Notify ScriptController that the frame is closing, since its cleanup ends
|
||||
// up calling back to LocalFrameClient via WindowProxy.
|
||||
GetScriptController().ClearForClose();
|
||||
|
|
|
@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
|
|||
otherwise not available in the Blink API.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index 8231ed74df9c031a594eb1be607b171a78531010..c5621d9e7dc4f1c2a0c79a1d07e833874378b950 100644
|
||||
index 63d2e8e3489d58f8163ae551ebda6bc718367c5c..628bb9667a6fc4830dfbb6711f59b83bff364bec 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -335,6 +335,9 @@ class WebLocalFrame : public WebFrame {
|
||||
@@ -337,6 +337,9 @@ class WebLocalFrame : public WebFrame {
|
||||
// be calling this API.
|
||||
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
|
||||
|
||||
|
@ -21,10 +21,10 @@ index 8231ed74df9c031a594eb1be607b171a78531010..c5621d9e7dc4f1c2a0c79a1d07e83387
|
|||
// 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 f8e90a17ca7cec06613b396a4e8351381772b692..008737d979c82bd1b07144a21f1c39de48c210a2 100644
|
||||
index 8ec99c1f8a5f3327b04ac1682861adc0c325a554..da8858ade5c52301393db79a4b19796aded032f3 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
|
||||
@@ -923,6 +923,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
@@ -945,6 +945,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ index f8e90a17ca7cec06613b396a4e8351381772b692..008737d979c82bd1b07144a21f1c39de
|
|||
return BindingSecurity::ShouldAllowAccessToFrame(
|
||||
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index c80168558ff46553667f70f9fa82bf19ce5ecbce..1bc72e14acd253615c73571ac82e9970f5b91196 100644
|
||||
index 9997c78cd84282c4bf4ddb3235b2195f4eda1cb4..1e52665009df85961c5685fc62bced18c06ce927 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -161,6 +161,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -159,6 +159,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
int argc,
|
||||
v8::Local<v8::Value> argv[]) override;
|
||||
v8::Local<v8::Context> MainWorldScriptContext() const override;
|
||||
|
|
|
@ -8,13 +8,13 @@ categories in use are known / declared. This patch is required for us
|
|||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 97fe778a121a1fd3658db8c00d621a72c12e82d2..661a0ee2deff4dc1c4180ade161c9ff17cfc0226 100644
|
||||
index d02299e1fa84ee99930a4079e1494672be1d8a60..4b3ceec51304913f3ee9172a2c533f159ed81bd5 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -74,6 +74,7 @@
|
||||
@@ -73,6 +73,7 @@
|
||||
X("drmcursor") \
|
||||
X("dwrite") \
|
||||
X("DXVA Decoding") \
|
||||
X("EarlyJava") \
|
||||
+ X("electron") \
|
||||
X("evdev") \
|
||||
X("event") \
|
||||
|
|
|
@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
|||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index baee2af78cd679e458c336786326957b6ea32440..5aa26ca8eb3d5128cc217950fe8bba27b44c26b6 100644
|
||||
index fd47808a5a1e51dcca00ac7daff7107e3dfa17e4..f30eeb4f36c86431df1c965273eb188490db4ac0 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -4363,6 +4363,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -4654,6 +4654,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
|
@ -21,10 +21,10 @@ index baee2af78cd679e458c336786326957b6ea32440..5aa26ca8eb3d5128cc217950fe8bba27
|
|||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6883f29361bab9a78ba93da92e7bd234f62e2f8f..6a18c7085f102d475bd36925106e86c56812accc 100644
|
||||
index a9c62d7efd00fea602cced369f64fb81c068b8cc..c017455770707877008e2df07e65c391068bdb8c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2962,9 +2962,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -2955,9 +2955,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
|
||||
if (delegate_) {
|
||||
|
@ -38,10 +38,10 @@ index 6883f29361bab9a78ba93da92e7bd234f62e2f8f..6a18c7085f102d475bd36925106e86c5
|
|||
|
||||
for (auto& observer : observers_) {
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index ce836b666eaca4312b01dec1cb012bbcb23b9050..9009a8b7a23e170ab0fbf81a6d157e18fa4e1769 100644
|
||||
index b6113c360f9e033440c3043a128531704778fe9c..9732b9ad4562b503041e19f2763d697e6c191e1c 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -305,6 +305,10 @@ struct CreateNewWindowParams {
|
||||
@@ -302,6 +302,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// The window features to use for the new window.
|
||||
blink.mojom.WindowFeatures features;
|
||||
|
@ -53,10 +53,10 @@ index ce836b666eaca4312b01dec1cb012bbcb23b9050..9009a8b7a23e170ab0fbf81a6d157e18
|
|||
|
||||
// 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 5990228237b99f382ba235a4bc59068ab12168de..c9fc489ded15dc3cfcdd71c86707e6e86a7e6ba3 100644
|
||||
index ba197ce381396608ab8603d27752b1bfe30e8e84..3c743a74321d54e36248d7b6201d9fdf5b749af6 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -508,6 +508,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -524,6 +524,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -66,10 +66,10 @@ index 5990228237b99f382ba235a4bc59068ab12168de..c9fc489ded15dc3cfcdd71c86707e6e8
|
|||
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 7c7a70b95873ed089e311cc0917ad32d8e465a4e..2d8d316f948fbc25fd4b1aa899b38ba2607e24a1 100644
|
||||
index d6c203ab546dde5106383c4d357d52c88965c467..491d6e7260dd329f312916c2f4aaba0aa177cc6a 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -144,6 +144,7 @@ class NetworkService;
|
||||
@@ -146,6 +146,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
|
@ -77,7 +77,7 @@ index 7c7a70b95873ed089e311cc0917ad32d8e465a4e..2d8d316f948fbc25fd4b1aa899b38ba2
|
|||
} // namespace network
|
||||
|
||||
namespace rappor {
|
||||
@@ -831,6 +832,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -845,6 +846,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -87,7 +87,7 @@ index 7c7a70b95873ed089e311cc0917ad32d8e465a4e..2d8d316f948fbc25fd4b1aa899b38ba2
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 17281521f8109279fe68e11abc2fcec41cfdf9c0..83b951dcf55b54661c8f855a8e10984d262c91b2 100644
|
||||
index 6017278cc0fa8d029477e7ef46a9c0cacae438be..18161c8f836134e470333381a16425e3347ea867 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -26,6 +26,17 @@ namespace content {
|
||||
|
@ -109,7 +109,7 @@ index 17281521f8109279fe68e11abc2fcec41cfdf9c0..83b951dcf55b54661c8f855a8e10984d
|
|||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index d10b0f458416044f0b5eaeac4160ac26a2857d94..4e3a846a3825216e1a77e17fd8e03331c6fb927b 100644
|
||||
index 7757c7720406aa9915a2a413b939be968c3cd988..7b329848850638941a7d8564dfe3786ae6f489ff 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
|
@ -119,8 +119,8 @@ index d10b0f458416044f0b5eaeac4160ac26a2857d94..4e3a846a3825216e1a77e17fd8e03331
|
|||
+#include "content/common/frame.mojom.h"
|
||||
#include "content/public/browser/bluetooth_chooser.h"
|
||||
#include "content/public/browser/bluetooth_scanning_prompt.h"
|
||||
#include "content/public/browser/invalidate_type.h"
|
||||
@@ -327,6 +328,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
#include "content/public/browser/eye_dropper.h"
|
||||
@@ -331,6 +332,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const std::string& partition_id,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
|
@ -135,7 +135,7 @@ index d10b0f458416044f0b5eaeac4160ac26a2857d94..4e3a846a3825216e1a77e17fd8e03331
|
|||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 2a33016a5e54bbabfa8c534b954f6c72822ca70d..ea7084056f13c60bcc3ba8bd4991a924b6153ee2 100644
|
||||
index 20ec8fc88cba99266ca9cf5f22f2565a762a97b3..00333d9aa46d643bf65db07cfac7a3a8959a14a3 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -68,6 +68,7 @@
|
||||
|
@ -146,7 +146,7 @@ index 2a33016a5e54bbabfa8c534b954f6c72822ca70d..ea7084056f13c60bcc3ba8bd4991a924
|
|||
#include "content/renderer/media/audio/audio_device_factory.h"
|
||||
#include "content/renderer/render_frame_impl.h"
|
||||
#include "content/renderer/render_frame_proxy.h"
|
||||
@@ -1245,6 +1246,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
@@ -1250,6 +1251,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
}
|
||||
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
|
||||
|
||||
|
@ -158,10 +158,10 @@ index 2a33016a5e54bbabfa8c534b954f6c72822ca70d..ea7084056f13c60bcc3ba8bd4991a924
|
|||
// 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 a10476afec548da09e44c1ea565c0ca7c9f902db..2b9d7fe3f57fa50036e8fc2e33daaae94ccbdcda 100644
|
||||
index f963cc714c49c90b66195e84b4fdda9b1f38ad28..c6e10685403a1f6dd3f326b001d9ee5e2e351e67 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
|
||||
@@ -395,6 +395,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -401,6 +401,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -171,10 +171,10 @@ index a10476afec548da09e44c1ea565c0ca7c9f902db..2b9d7fe3f57fa50036e8fc2e33daaae9
|
|||
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 b59e7c255d90996dec1f02170ffa4e1d3ec2a0c6..56db656bd2b19ca2ae90ace6c813a719a6266217 100644
|
||||
index 45b6bbbd41bbe19a39edb83b6ced844cb4c97244..90b5c696f4cc6b77d1377a628c9d8166c773bb60 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
|
||||
@@ -78,6 +78,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -79,6 +79,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -206,10 +206,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
|
|||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 8029e46e91697d6a8c1349519d2c6e68bfb443a5..4b75b3e28938e092bc575117bc6ed5c7607baf74 100644
|
||||
index 1d5c3315671f0c414572ee0610fe6ac399b6e1e8..ee2c97cd344ea5f6e3aadd34304d290dbf5d2587 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -1768,6 +1768,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -1874,6 +1874,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
}
|
||||
|
||||
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);
|
||||
|
|
|
@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
|
|||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index f853ba4924c5730cc9b0eafc2d15dbf3c1341542..9bb35ad9a3918d5fea8d66eb7f29c50058c87afc 100644
|
||||
index c404e7a7171288e9f169fe2c80a35c53b7f27949..f846309e2139507cba9ba927d4eb401e4b2e2ec1 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -5313,6 +5313,7 @@ jumbo_static_library("browser") {
|
||||
@@ -5388,6 +5388,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
|
|
|
@ -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 a4044d94e4cd420edecc98482f0d1cb4b8707039..036b9b5001d053bc8dab781b9c30c37a019f7a1e 100644
|
||||
index d014ef7e1d8d10d049efb4687dac55191355a5d8..51b0ed369be74cec504abf6e933917fdf7a62aad 100644
|
||||
--- a/content/browser/browser_main_loop.cc
|
||||
+++ b/content/browser/browser_main_loop.cc
|
||||
@@ -1491,7 +1491,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
@@ -1488,7 +1488,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
NOTREACHED();
|
||||
#else
|
||||
base::RunLoop run_loop;
|
||||
|
|
|
@ -1,192 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Wed, 13 May 2020 19:06:23 +0000
|
||||
Subject: allow embedder to set crash upload url
|
||||
|
||||
Currently //components/crash hard-codes the crash report URL to be a
|
||||
Google-specific target. This CL adds a hook which allows embedders to override
|
||||
this URL. Without it, this module isn't usable for non-Google embedders.
|
||||
|
||||
Change-Id: I1251c3ef164f04de63cf8c66165180e897a91d78
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2194585
|
||||
Commit-Queue: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#768385}
|
||||
|
||||
diff --git a/components/crash/core/app/BUILD.gn b/components/crash/core/app/BUILD.gn
|
||||
index bb11c401ca7939ca04e90fd13f1b335bf5b60598..af031a027ee3e19e57e9c4d9a133127a3a637003 100644
|
||||
--- a/components/crash/core/app/BUILD.gn
|
||||
+++ b/components/crash/core/app/BUILD.gn
|
||||
@@ -22,7 +22,10 @@ source_set("lib") {
|
||||
"crash_reporter_client.h",
|
||||
]
|
||||
|
||||
- deps = [ "//base" ]
|
||||
+ deps = [
|
||||
+ "//base",
|
||||
+ "//build:branding_buildflags",
|
||||
+ ]
|
||||
}
|
||||
|
||||
source_set("crashpad_handler_main") {
|
||||
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
|
||||
index 192b0a7f137f311abb6a991f997e11f5eba52256..8ca43e2a8a104c3edf4087df5490fd47cd18f9a4 100644
|
||||
--- a/components/crash/core/app/breakpad_linux.cc
|
||||
+++ b/components/crash/core/app/breakpad_linux.cc
|
||||
@@ -103,7 +103,11 @@ namespace {
|
||||
// while we do have functions to deal with uint64_t's.
|
||||
uint64_t g_crash_loop_before_time = 0;
|
||||
#else
|
||||
-const char kUploadURL[] = "https://clients2.google.com/cr/report";
|
||||
+char* g_upload_url = nullptr;
|
||||
+void SetUploadURL(const std::string& url) {
|
||||
+ DCHECK(!g_upload_url);
|
||||
+ g_upload_url = strdup(url.c_str());
|
||||
+}
|
||||
#endif
|
||||
|
||||
bool g_is_crash_reporter_enabled = false;
|
||||
@@ -1400,16 +1404,16 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
|
||||
static const char kWgetBinary[] = "/usr/bin/wget";
|
||||
const char* args[] = {
|
||||
- kWgetBinary,
|
||||
- header_content_encoding,
|
||||
- header_content_type,
|
||||
- post_file,
|
||||
- kUploadURL,
|
||||
- "--timeout=10", // Set a timeout so we don't hang forever.
|
||||
- "--tries=1", // Don't retry if the upload fails.
|
||||
- "-O", // Output reply to the file descriptor path.
|
||||
- status_fd_path,
|
||||
- nullptr,
|
||||
+ kWgetBinary,
|
||||
+ header_content_encoding,
|
||||
+ header_content_type,
|
||||
+ post_file,
|
||||
+ g_upload_url,
|
||||
+ "--timeout=10", // Set a timeout so we don't hang forever.
|
||||
+ "--tries=1", // Don't retry if the upload fails.
|
||||
+ "-O", // Output reply to the file descriptor path.
|
||||
+ status_fd_path,
|
||||
+ nullptr,
|
||||
};
|
||||
static const char msg[] = "Cannot upload crash dump: cannot exec "
|
||||
"/usr/bin/wget\n";
|
||||
@@ -2037,6 +2041,10 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
#endif
|
||||
process_type.empty();
|
||||
|
||||
+#if !defined(OS_CHROMEOS)
|
||||
+ SetUploadURL(GetCrashReporterClient()->GetUploadUrl());
|
||||
+#endif
|
||||
+
|
||||
if (is_browser_process) {
|
||||
bool enable_breakpad = GetCrashReporterClient()->GetCollectStatsConsent() ||
|
||||
GetCrashReporterClient()->IsRunningUnattended();
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
|
||||
index e778f68af30f8c071d1360d06b553cc957160c5b..0ef0f00e4320b2ab1584621df5b3b8081c65a788 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.cc
|
||||
+++ b/components/crash/core/app/crash_reporter_client.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "components/crash/core/app/crash_reporter_client.h"
|
||||
|
||||
+#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
// On Windows don't use FilePath and logging.h.
|
||||
@@ -22,6 +23,10 @@ namespace {
|
||||
|
||||
CrashReporterClient* g_client = nullptr;
|
||||
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD)
|
||||
+const char kDefaultUploadURL[] = "https://clients2.google.com/cr/report";
|
||||
+#endif
|
||||
+
|
||||
} // namespace
|
||||
|
||||
void SetCrashReporterClient(CrashReporterClient* client) {
|
||||
@@ -196,6 +201,16 @@ void CrashReporterClient::GetSanitizationInformation(
|
||||
}
|
||||
#endif
|
||||
|
||||
+std::string CrashReporterClient::GetUploadUrl() {
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD)
|
||||
+ // Only allow the possibility of report upload in official builds. This
|
||||
+ // crash server won't have symbols for any other build types.
|
||||
+ return kDefaultUploadURL;
|
||||
+#else
|
||||
+ return std::string();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
return false;
|
||||
}
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
|
||||
index 9cc78fc2584061d26fd1e83b3ebf5ada0a12c138..ad4bbbc5de3feb8441ba613009452c920d925820 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.h
|
||||
+++ b/components/crash/core/app/crash_reporter_client.h
|
||||
@@ -194,6 +194,9 @@ class CrashReporterClient {
|
||||
bool* sanitize_stacks);
|
||||
#endif
|
||||
|
||||
+ // Returns the URL target for crash report uploads.
|
||||
+ virtual std::string GetUploadUrl();
|
||||
+
|
||||
// This method should return true to configure a crash reporter capable of
|
||||
// monitoring itself for its own crashes to do so, even if self-monitoring
|
||||
// would be expensive. "Expensive" self-monitoring dedicates an additional
|
||||
diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc
|
||||
index 5d31d0926cd1732bdd1808c232c18fc6ff550c05..56a79e28dece162210613c842df0a34aaa66f91c 100644
|
||||
--- a/components/crash/core/app/crashpad_linux.cc
|
||||
+++ b/components/crash/core/app/crashpad_linux.cc
|
||||
@@ -120,9 +120,8 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
// to ChromeOS's /sbin/crash_reporter which in turn passes the dump to
|
||||
// crash_sender which handles the upload.
|
||||
std::string url;
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD) && \
|
||||
- !defined(OS_CHROMEOS)
|
||||
- url = "https://clients2.google.com/cr/report";
|
||||
+#if !defined(OS_CHROMEOS)
|
||||
+ url = crash_reporter_client->GetUploadUrl();
|
||||
#else
|
||||
url = std::string();
|
||||
#endif
|
||||
diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm
|
||||
index b579521d55860823722df2ee849f6b1628b3c950..c49d38082c41c7eb71ed2c701b06ed5b7eaa514a 100644
|
||||
--- a/components/crash/core/app/crashpad_mac.mm
|
||||
+++ b/components/crash/core/app/crashpad_mac.mm
|
||||
@@ -133,13 +133,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
crash_reporter_client->GetCrashDumpLocation(&database_path);
|
||||
crash_reporter_client->GetCrashMetricsLocation(&metrics_path);
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD)
|
||||
- // Only allow the possibility of report upload in official builds. This
|
||||
- // crash server won't have symbols for any other build types.
|
||||
- std::string url = "https://clients2.google.com/cr/report";
|
||||
-#else
|
||||
- std::string url;
|
||||
-#endif
|
||||
+ std::string url = crash_reporter_client->GetUploadUrl();
|
||||
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
|
||||
index 669f5bea844d75f0e5c34b58994f4cfb8e856af0..c199b467ffeb007f3098ccde6879fbd71e9ec9fd 100644
|
||||
--- a/components/crash/core/app/crashpad_win.cc
|
||||
+++ b/components/crash/core/app/crashpad_win.cc
|
||||
@@ -85,11 +85,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
std::map<std::string, std::string> process_annotations;
|
||||
GetPlatformCrashpadAnnotations(&process_annotations);
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
- std::string url = "https://clients2.google.com/cr/report";
|
||||
-#else
|
||||
- std::string url;
|
||||
-#endif
|
||||
+ std::string url = crash_reporter_client->GetUploadUrl();
|
||||
|
||||
// Allow the crash server to be overridden for testing. If the variable
|
||||
// isn't present in the environment then the default URL will remain.
|
|
@ -21,10 +21,10 @@ index 8ca43e2a8a104c3edf4087df5490fd47cd18f9a4..bb0c6aebb4fdb9b24de8292a3f1c8dc7
|
|||
uint64_t g_process_start_time = 0;
|
||||
pid_t g_pid = 0;
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
|
||||
index 0ef0f00e4320b2ab1584621df5b3b8081c65a788..bb30a0fdd797b80a345212828060a38f25d78e67 100644
|
||||
index 44e81b2f95f6332df16cfa00bdd26c7abbc733dc..9b3db694b920048735789d4db0f8670addd22b40 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.cc
|
||||
+++ b/components/crash/core/app/crash_reporter_client.cc
|
||||
@@ -153,6 +153,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
@@ -148,6 +148,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ index 0ef0f00e4320b2ab1584621df5b3b8081c65a788..bb30a0fdd797b80a345212828060a38f
|
|||
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
||||
return 100;
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
|
||||
index ad4bbbc5de3feb8441ba613009452c920d925820..c2dfc8fc897d901d237670e7c305fd263606bee7 100644
|
||||
index 05538423d0b9ad0d83e9326a58f8856e0403fed2..06d9f1e3b57db5cf33555eb5ad837f8d66aa8b3d 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.h
|
||||
+++ b/components/crash/core/app/crash_reporter_client.h
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -54,7 +54,7 @@ index ad4bbbc5de3feb8441ba613009452c920d925820..c2dfc8fc897d901d237670e7c305fd26
|
|||
#include <string>
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
@@ -153,6 +154,19 @@ class CrashReporterClient {
|
||||
@@ -150,6 +151,19 @@ class CrashReporterClient {
|
||||
// that case, |breakpad_enabled| is set to the value enforced by policies.
|
||||
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
|
||||
|
||||
|
@ -75,7 +75,7 @@ index ad4bbbc5de3feb8441ba613009452c920d925820..c2dfc8fc897d901d237670e7c305fd26
|
|||
// Used by WebView to sample crashes without generating the unwanted dumps. If
|
||||
// the returned value is less than 100, crash dumping will be sampled to that
|
||||
diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm
|
||||
index c49d38082c41c7eb71ed2c701b06ed5b7eaa514a..7d3a52951ac525640974e03b13f8827d465adf1d 100644
|
||||
index 0b594d053d7c7f2a8eae9a15e62daacab52ffa64..96210530f699a2331f57415beddc20ed19b9cb4b 100644
|
||||
--- a/components/crash/core/app/crashpad_mac.mm
|
||||
+++ b/components/crash/core/app/crashpad_mac.mm
|
||||
@@ -67,6 +67,8 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
|
||||
|
|
|
@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
|
|||
failing checks and allow the rest of the target to have them enabled.
|
||||
|
||||
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
index 16b7768fab7a43cf6ddf089fd9590bd333a766e3..b41519865e6babc829085880aadaaaea7e086e45 100644
|
||||
index ddb106d49ab6c175ada8bbc20bee1a00df236c73..aea2b686251738d686f249cd760ca40822b70cb4 100644
|
||||
--- a/content/browser/frame_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
@@ -1262,8 +1262,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -1289,8 +1289,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ index 16b7768fab7a43cf6ddf089fd9590bd333a766e3..b41519865e6babc829085880aadaaaea
|
|||
|
||||
if (rfh->GetParent()) {
|
||||
// All manual subframes would be did_create_new_entry and handled above, so
|
||||
@@ -1518,7 +1520,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
@@ -1545,7 +1547,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
||||
}
|
||||
|
||||
|
@ -46,10 +46,10 @@ index 16b7768fab7a43cf6ddf089fd9590bd333a766e3..b41519865e6babc829085880aadaaaea
|
|||
// 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 4362daa04e89ca8f47c5e07e998fc9f1ad4f4c5b..9ecdb2e13235396aee11ae1be7e539f8e932e3f6 100644
|
||||
index 9bfabd34eabcaf893b674e74e540f9258f1730bb..ea6e9f7b7161f9e3afa463fb8114479d3d10eb6b 100644
|
||||
--- a/ui/base/clipboard/clipboard_win.cc
|
||||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -776,10 +776,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
|
||||
@@ -773,10 +773,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
|
||||
|
||||
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
|
||||
UINT cf_format = format.ToFormatEtc().cfFormat;
|
||||
|
|
|
@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
|
|||
re-submitting the patch.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 67d7e8e69d8a9b8b34b82b83bdf688df4c17ed59..9f6b797ea0489fc87b33a36bbcaae84a2cbf05f3 100644
|
||||
index 474f742a909b0a425c6b1f3e93da211b4bcee919..16b9f816d56dbb6b6943cca6d6b3610afa322f4e 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -640,7 +640,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -634,7 +634,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -68,7 +68,7 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8
|
|||
// Re-initializes schemes for tests.
|
||||
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
|
||||
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
|
||||
index 6c27d324e6235051875b88c4bc5bd362d3907f3c..06c17d6673d280fabf5b47244e7f7f7ab374f9a3 100644
|
||||
index ed5b0e2c0b4d453560ee9e2e4a55780b409eeea9..46e29dca5d13691bcf9494c0f90b68d6219a75ef 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -37,6 +37,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() {
|
||||
|
@ -83,7 +83,7 @@ index 6c27d324e6235051875b88c4bc5bd362d3907f3c..06c17d6673d280fabf5b47244e7f7f7a
|
|||
return service_manager::ProcessType::kDefault;
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index f8590642a8d6807a15746e9e7673b5e76cbe0e14..7d8df731b6dd18a42ec4fc2b1bb08a6198da8ff8 100644
|
||||
index 2d9ee9fa20a9aba1de168cc86bfeea5eab71e6d3..4b163c3fa2ddd258b5527e0ccaf9fc9d2621ef75 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -77,6 +77,20 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
|
|
|
@ -111,7 +111,7 @@ index ad7f766a36b1b6b2a8bc0f96369f1aaadf6681f7..f6c6c14a0937430df62c9b9c1132c591
|
|||
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 224d52b83533543398757ca487f99b3e59897e21..eb50b0393ba532766867aeec5ddeab1a6acd0bc2 100644
|
||||
index c81645e60a2a31429051fdfbf29666a09fa19c61..b3a6ed705f2f8bbbe74ec7e84ab07dc64f231dfd 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -10,14 +10,15 @@
|
||||
|
@ -131,7 +131,7 @@ index 224d52b83533543398757ca487f99b3e59897e21..eb50b0393ba532766867aeec5ddeab1a
|
|||
#include "media/base/video_util.h"
|
||||
#include "third_party/libyuv/include/libyuv/scale_argb.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
@@ -221,6 +222,8 @@ void NativeDesktopMediaList::Worker::RefreshThumbnails(
|
||||
@@ -223,6 +224,8 @@ void NativeDesktopMediaList::Worker::RefreshThumbnails(
|
||||
FROM_HERE, {BrowserThread::UI},
|
||||
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
||||
media_list_));
|
||||
|
@ -139,4 +139,4 @@ index 224d52b83533543398757ca487f99b3e59897e21..eb50b0393ba532766867aeec5ddeab1a
|
|||
+ capturer_.reset();
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
bool NativeDesktopMediaList::Worker::IsCurrentFrameValid() const {
|
||||
|
|
|
@ -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 0328f536a10de1ff4b6fd0a70c1b80c260aa7b87..2bb93842c74feb1d3f33d4589b7a75ceff8858ef 100644
|
||||
index c981cfc6b0ace5a0c60aa04af05f9a9e3158231d..eb43285dfacd700451dacb3a04546790298026ea 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
@ -49,7 +49,7 @@ index 0328f536a10de1ff4b6fd0a70c1b80c260aa7b87..2bb93842c74feb1d3f33d4589b7a75ce
|
|||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index 4da6edd086c9df20af7cdcb5c6020cd61166fbea..81b300c2533a3aaa6e0c343405a6040351061e27 100644
|
||||
index a84076658b4e8e6817938fa889bcb11d5c68b354..fa1052eec362f090c59b98e7d6158b3849657afa 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -203,6 +203,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
|
|
|
@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
|
|||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
|
||||
index 95a901678c215220b9e88db768444d48e32f6dbd..841c809b0b50c8c34a9d9c972c511bd4fd57a7b0 100644
|
||||
index c2684645484c7e1b6a555ba31f6634496a4fec76..9250d3b772fdeb6eb943f6cddeb96200e0f819f4 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -100,6 +100,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
|
@ -66,10 +66,10 @@ index 0fc4813b2f76fe6154ebdc60ffabd278bed75653..7423c91d661adcf9e761b93ddbfa4ea8
|
|||
!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 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f00bfe2d8d 100644
|
||||
index 1efef99651721d7cdb159ef9fe1aea6c5fb299f0..efcdc1dbe7207f66862a7ab93f0f226c8d27ba2e 100644
|
||||
--- a/components/viz/service/display/gl_renderer.cc
|
||||
+++ b/components/viz/service/display/gl_renderer.cc
|
||||
@@ -84,6 +84,9 @@
|
||||
@@ -85,6 +85,9 @@
|
||||
|
||||
using gpu::gles2::GLES2Interface;
|
||||
|
||||
|
@ -79,7 +79,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
namespace viz {
|
||||
namespace {
|
||||
|
||||
@@ -582,8 +585,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
|
||||
@@ -583,8 +586,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
|
||||
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
|
||||
SetBlendEnabled(quad->ShouldDrawWithBlending());
|
||||
|
||||
|
@ -91,7 +91,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
// Use the full quad_rect for debug quads to not move the edges based on
|
||||
// partial swaps.
|
||||
@@ -1553,7 +1557,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
|
||||
@@ -1554,7 +1558,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
|
||||
params->use_color_matrix, tint_gl_composited_content_,
|
||||
params->apply_shader_based_rounded_corner &&
|
||||
ShouldApplyRoundedCorner(params->quad)),
|
||||
|
@ -101,7 +101,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
}
|
||||
|
||||
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
|
||||
@@ -2024,7 +2029,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
@@ -2025,7 +2030,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -111,7 +111,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
SetShaderColor(color, opacity);
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
SetShaderRoundedCorner(
|
||||
@@ -2179,7 +2185,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2180,7 +2186,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
: NON_PREMULTIPLIED_ALPHA,
|
||||
false, false, tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -121,7 +121,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2275,7 +2282,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2276,7 +2283,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -131,7 +131,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2377,7 +2385,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
@@ -2378,7 +2386,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
// The source color space should never be RGB.
|
||||
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
|
||||
|
||||
|
@ -141,7 +141,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
#if defined(OS_WIN)
|
||||
// Force sRGB output on Windows for overlay candidate video quads to match
|
||||
@@ -2541,7 +2550,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
@@ -2542,7 +2551,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
|
||||
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
|
@ -151,7 +151,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
|
||||
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
|
||||
@@ -2606,8 +2616,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
@@ -2607,8 +2617,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
|
||||
|
||||
// Bind the program to the GL state.
|
||||
|
@ -162,7 +162,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
SetShaderRoundedCorner(
|
||||
@@ -3346,7 +3356,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
|
||||
@@ -3347,7 +3357,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
|
||||
void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
const gfx::ColorSpace& src_color_space,
|
||||
const gfx::ColorSpace& dst_color_space) {
|
||||
|
@ -173,7 +173,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
// If the input color space is PQ, and it did not specify a white level,
|
||||
// override it with the frame's white level.
|
||||
@@ -3728,9 +3740,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
@@ -3729,9 +3741,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
|
||||
gfx::SizeF((*overlay_texture)->texture.size()));
|
||||
|
||||
@@ -3949,8 +3961,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
@@ -3950,8 +3962,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
|
||||
PrepareGeometry(SHARED_BINDING);
|
||||
|
||||
|
@ -197,17 +197,17 @@ index 085dbe8d7a92e541cbb92f08e9c01967b38262e0..31007e113e695ca9736d4927d088d2f0
|
|||
|
||||
gfx::Transform render_matrix;
|
||||
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
|
||||
@@ -4064,3 +4076,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
|
||||
@@ -4065,3 +4077,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
|
||||
}
|
||||
|
||||
} // namespace viz
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f5c556273 100644
|
||||
index ae8f3b65971935237d98893fcd266ce7d32a625b..75ee5e40bbef5448c7e33457ebc0f3d04698d379 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -209,6 +209,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -210,6 +210,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
|
@ -216,7 +216,7 @@ index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f
|
|||
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 618700cc99de3174b9de9bc26abcaac5880ec21e..aac0c3e5e19ee7bcf0de68a4f9f45c1cf46f9fad 100644
|
||||
index 11b18f08dbaba89a483908faef465adfb6bd4019..02b0fa9444c07396aee177b9a5d5bc1c6da5e081 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -230,6 +230,7 @@
|
||||
|
@ -227,7 +227,7 @@ index 618700cc99de3174b9de9bc26abcaac5880ec21e..aac0c3e5e19ee7bcf0de68a4f9f45c1c
|
|||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3213,6 +3214,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3252,6 +3253,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[] = {
|
||||
|
@ -236,10 +236,10 @@ index 618700cc99de3174b9de9bc26abcaac5880ec21e..aac0c3e5e19ee7bcf0de68a4f9f45c1c
|
|||
service_manager::switches::kDisableInProcessStackTraces,
|
||||
service_manager::switches::kDisableSeccompFilterSandbox,
|
||||
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
||||
index 75558f0658a3760ce9dcf550b1ac134e30c686d8..40dc39bdcd08032e7af821beeb13373fd1c613e9 100644
|
||||
index 56397e6a28846508730dfcfe6f0009f944ffd18d..9e8b76407029b3b768c94a16622bcf7df8bd50e2 100644
|
||||
--- a/content/renderer/render_widget.cc
|
||||
+++ b/content/renderer/render_widget.cc
|
||||
@@ -2586,6 +2586,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
|
||||
@@ -2548,6 +2548,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
|
@ -250,7 +250,7 @@ index 75558f0658a3760ce9dcf550b1ac134e30c686d8..40dc39bdcd08032e7af821beeb13373f
|
|||
// is what the renderer uses if its not threaded.
|
||||
settings.enable_checker_imaging =
|
||||
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75f1177cb9 100644
|
||||
index 570ac93ad8cffda1bf6a8a9847a8052c2daa0d1e..b9ff54463e950c39f282794191e55a721bc7a25a 100644
|
||||
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
@ -269,7 +269,7 @@ index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75
|
|||
|
||||
namespace blink {
|
||||
|
||||
@@ -89,6 +91,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
|
||||
@@ -88,6 +90,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
|
||||
}
|
||||
|
||||
gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
|
||||
|
@ -281,7 +281,7 @@ index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75
|
|||
gfx::ColorSpace::PrimaryID primary_id = GetPrimaryID(color_space_);
|
||||
|
||||
// TODO(ccameron): This needs to take into account whether or not this texture
|
||||
@@ -102,6 +109,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
|
||||
@@ -101,6 +108,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
|
||||
}
|
||||
|
||||
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
|
|||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 385b0dbeb7cbfb31ad0726051dc2e8fb4d7b16b2..9fe6d55cc0dbcc504cdf0eebe71899887de31b19 100644
|
||||
index 1cf61e86d97c5735836d7d0211b179300b46b454..1fc038fa999702c91a9126df61567ba4c8601dad 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() {
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Deepak Mohan <hop2deep@gmail.com>
|
||||
Date: Fri, 22 May 2020 17:58:16 -0700
|
||||
Subject: Disable DCHECK that fails with software compositing
|
||||
|
||||
Should be removed once https://bugs.chromium.org/p/chromium/issues/detail?id=1084625
|
||||
is addressed.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index eb43285dfacd700451dacb3a04546790298026ea..faa47e9ef7f388dc0bfa5cd3efb961e6339ce390 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -2407,13 +2407,13 @@ void HWNDMessageHandler::OnPaint(HDC dc) {
|
||||
RECT cr;
|
||||
if (GetClientRect(hwnd(), &cr)) {
|
||||
if (exposed_pixels_.height() > 0) {
|
||||
- DCHECK_GE(cr.bottom, exposed_pixels_.height());
|
||||
+ //DCHECK_GE(cr.bottom, exposed_pixels_.height());
|
||||
RECT rect = {cr.left, cr.bottom - exposed_pixels_.height(), cr.right,
|
||||
cr.bottom};
|
||||
FillRect(ps.hdc, &rect, brush);
|
||||
}
|
||||
if (exposed_pixels_.width() > 0) {
|
||||
- DCHECK_GE(cr.right, exposed_pixels_.width());
|
||||
+ //DCHECK_GE(cr.right, exposed_pixels_.width());
|
||||
RECT rect = {cr.right - exposed_pixels_.width(), cr.top, cr.right,
|
||||
cr.bottom - exposed_pixels_.height()};
|
||||
FillRect(ps.hdc, &rect, brush);
|
|
@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
|||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index a0bb67b269f03ed6fa322fd156e9eb358eed1437..8c2d75c20afd5832371b04f50c9fb1ec5d9e8dc5 100644
|
||||
index 073eeea86fd18d19320b13b701012cc3518bd4b4..77526d78e8113f7071fe269cbcdf63bb772db6e4 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -653,6 +653,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -646,6 +646,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
|
@ -20,10 +20,10 @@ index a0bb67b269f03ed6fa322fd156e9eb358eed1437..8c2d75c20afd5832371b04f50c9fb1ec
|
|||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 947fb6ba02cde74da8787ccec689cd184f98aefd..67722b63693d28c828435d60ca167b5cda0a57b4 100644
|
||||
index 16d5f4083e5674a561c9e4b0fedd23dd2876c8d0..eed9bac1384df3f1248dd49d092ace3765a6691e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -179,6 +179,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -180,6 +180,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// RenderWidgetHostImpl.
|
||||
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
||||
|
||||
|
@ -34,10 +34,10 @@ index 947fb6ba02cde74da8787ccec689cd184f98aefd..67722b63693d28c828435d60ca167b5c
|
|||
const base::TimeDelta& delay) {
|
||||
new_content_rendering_delay_ = delay;
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 12e1923fd2943af92aaf6f691d28212bdd2a73dd..3b66abb180df5f3da7c4fa8de77279620cbc4aa3 100644
|
||||
index 45ac5ece9e975b8213845d80a9a309a17eb1de03..e0157ea857cd4cb8984e983e8631f95db90f2fc2 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -641,7 +641,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
DCHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Deepak Mohan <hop2deep@gmail.com>
|
||||
Date: Fri, 22 May 2020 17:40:47 -0700
|
||||
Subject: Disable unnecessary IsChromeFirstRun check
|
||||
|
||||
https://crrev.com/c/2155167/18/chrome/browser/spellchecker/spellcheck_service.cc#586
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
index d353a024b8f18e8a02edd7bb9c8cdc76e1af1963..8aef24d488365398161a75790ad306e4b1fecb72 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/first_run/first_run.h"
|
||||
+#endif
|
||||
#include "chrome/browser/spellchecker/spellcheck_factory.h"
|
||||
#include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
|
||||
#include "components/language/core/browser/pref_names.h"
|
||||
@@ -566,7 +568,7 @@ void SpellcheckService::InitWindowsDictionaryLanguages(
|
||||
.empty());
|
||||
});
|
||||
|
||||
- if (first_run::IsChromeFirstRun()) {
|
||||
+ //if (first_run::IsChromeFirstRun()) {
|
||||
// Ensure that spellcheck is enabled for the first dialect of the
|
||||
// accepted languages if there is a Windows dictionary installed for
|
||||
// that dialect.
|
||||
@@ -606,7 +608,7 @@ void SpellcheckService::InitWindowsDictionaryLanguages(
|
||||
base::Value(first_user_language));
|
||||
prefs->Set(spellcheck::prefs::kSpellCheckDictionaries, user_dictionaries);
|
||||
}
|
||||
- }
|
||||
+ //}
|
||||
|
||||
// No need to call LoadHunspellDictionaries() as when the ListPrefUpdate
|
||||
// object goes out of scope, the preference change handler will do this.
|
|
@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
|
|||
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index b7c83cceb2297eddcb345e75a95b7744b08d2e6b..7dda5ce275aef7670406e3cb3b08bd6d14d188ef 100644
|
||||
index e62538f061cccddea14759ea5d92f14b539992fc..6e896ac16194b2a031d012a9ccd5b2726338800d 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1044,6 +1044,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1013,6 +1013,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ index b7c83cceb2297eddcb345e75a95b7744b08d2e6b..7dda5ce275aef7670406e3cb3b08bd6d
|
|||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index cff8a36b7703df31d0823efb2549f57d7c6c6907..ae9c7a0d6cd98f59892fd5b0fcb6a0307cd842fc 100644
|
||||
index 0b35920f4dbaf8fbaf8245c9ae976459c6baa7b8..ef5c5c05bb9b49b13a16421a8cc68fee46e187e8 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -242,6 +242,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
|
@ -63,10 +63,10 @@ index cff8a36b7703df31d0823efb2549f57d7c6c6907..ae9c7a0d6cd98f59892fd5b0fcb6a030
|
|||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if defined(OS_CHROMEOS)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index e834a5f9a4b6c698ad20e3b9cdc99e871e4035df..18c3c5312be05333e6ed19ad53bb6296be5db4b7 100644
|
||||
index 2b2033797906f36fa829008c65e3b66b6e06eaa2..6ec25efe5bb2819df27d0ba8fc0646f2b80668a8 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1026,6 +1026,9 @@ interface NetworkContext {
|
||||
@@ -1049,6 +1049,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
@ -77,10 +77,10 @@ index e834a5f9a4b6c698ad20e3b9cdc99e871e4035df..18c3c5312be05333e6ed19ad53bb6296
|
|||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index b2be49a841af089adb1c85eb87aa6c198a522001..eee74c88beffafcfba75bb76ad7c54154a57aa39 100644
|
||||
index eff66d994c5c416a672405226172e640b65278ff..34e8182ad2b33598d7c91a63202516c5b7e42257 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -104,6 +104,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -105,6 +105,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
|
|
@ -10,22 +10,22 @@ get this standardised, but in lieu of that, this makes MessagePort a
|
|||
whole bunch more useful!
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
index 3e71122bfbc87b481d620d67d01926690ae5270a..cd1abc51fa216215b5ab00d0a8b63638c24cbd57 100644
|
||||
index 9e9de51e37ee46266c647bd9c0c27e02a42bf5f1..d16727bed1a99b8171d0c7c5c5b7f38289ae9e55 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
@@ -149,6 +149,7 @@ void MessagePort::close() {
|
||||
Entangle(mojo::MessagePipe().handle0);
|
||||
@@ -158,6 +158,7 @@ void MessagePort::close() {
|
||||
Entangle(pipe.TakePort0());
|
||||
}
|
||||
closed_ = true;
|
||||
+ DispatchEvent(*Event::Create(event_type_names::kClose));
|
||||
}
|
||||
|
||||
void MessagePort::Entangle(mojo::ScopedMessagePipeHandle handle) {
|
||||
void MessagePort::Entangle(MessagePortDescriptor port) {
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
|
||||
index d24804499949c237462ee455e7cec93836debca9..53e61229e73e2343414aa1ac5c5ac1ff2d3db439 100644
|
||||
index d30195fc3cf96279426c7c23fa6f99f7cd193b26..95dc5b61a01452e64e5008e772367897445ca312 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.h
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.h
|
||||
@@ -119,6 +119,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
|
||||
@@ -121,6 +121,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
|
||||
return GetAttributeEventListener(event_type_names::kMessageerror);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
|||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index c0c55286676df02d1aae3afd15de745e9756dd3e..c791beb29543b84bcc0e1d7b464a0e0f4bc39cd4 100644
|
||||
index 1d9716fc42193fce05418817ab259e55c8c08cc9..90d8fea6dffef7f0f12ae7fe2cb23b5517794765 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -247,6 +247,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
|
||||
|
@ -26,10 +26,10 @@ index c0c55286676df02d1aae3afd15de745e9756dd3e..c791beb29543b84bcc0e1d7b464a0e0f
|
|||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 8c60a3f7ba7cd3caec127028422be32024ff586b..7bffe0caa4a55728e45f2371bb594c96855d1bc5 100644
|
||||
index fce4c73af25eea6a917031202ada54a62aca2545..8e54a2975b1e0eea49e0583fb2966d00c78aa747 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -363,6 +363,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -393,6 +393,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
ColorId color_id,
|
||||
ColorScheme color_scheme = ColorScheme::kDefault) const;
|
||||
|
||||
|
@ -52,7 +52,7 @@ index 8c60a3f7ba7cd3caec127028422be32024ff586b..7bffe0caa4a55728e45f2371bb594c96
|
|||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -497,6 +513,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -531,6 +547,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
PreferredColorScheme preferred_color_scheme_ =
|
||||
PreferredColorScheme::kNoPreference;
|
||||
|
||||
|
@ -62,10 +62,10 @@ index 8c60a3f7ba7cd3caec127028422be32024ff586b..7bffe0caa4a55728e45f2371bb594c96
|
|||
};
|
||||
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index f94a3ed2098d5f32ea0eb881be28d7a589b359a5..1bb8445ef2f68bdf1f2fc8a7a6f1cd0f4e0357d0 100644
|
||||
index 54730260ccb2ca56fd3fa26db631821de0e7d796..f94097fb5be82f7e9a3e09d2446c17534c513832 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -733,6 +733,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -734,6 +734,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
// ...unless --force-dark-mode was specified in which case caveat emptor.
|
||||
if (UsesHighContrastColors() && !IsForcedDarkMode())
|
||||
return false;
|
||||
|
|
|
@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change
|
|||
is entirely in //chrome.
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
index 25feeebf5367cec52c36cbfac4af71022c8716d2..653ef44ff095015ef25cc59bf42f9fbd9d907160 100644
|
||||
index ca546f2253b5b49b7c4580798ee173ffdaaa9e30..71cfbc3cd2b5d0de13862e7fa300b9d2a2a3e862 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -50,6 +50,9 @@ namespace {
|
||||
|
@ -22,7 +22,7 @@ index 25feeebf5367cec52c36cbfac4af71022c8716d2..653ef44ff095015ef25cc59bf42f9fbd
|
|||
// Close the file.
|
||||
void CloseDictionary(base::File file) {
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
@@ -248,6 +251,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) {
|
||||
@@ -270,6 +273,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) {
|
||||
g_download_url_for_testing.Get() = url;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ index 25feeebf5367cec52c36cbfac4af71022c8716d2..653ef44ff095015ef25cc59bf42f9fbd
|
|||
GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
|
||||
if (g_download_url_for_testing.Get() != GURL())
|
||||
return g_download_url_for_testing.Get();
|
||||
@@ -255,6 +262,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
|
||||
@@ -277,6 +284,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
|
||||
std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII();
|
||||
DCHECK(!bdict_file.empty());
|
||||
|
||||
|
@ -44,10 +44,10 @@ index 25feeebf5367cec52c36cbfac4af71022c8716d2..653ef44ff095015ef25cc59bf42f9fbd
|
|||
"https://redirector.gvt1.com/edgedl/chrome/dict/";
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
index 4af3201238dfec14bd5a4241b662ca52799e6862..4662bdc08b54304a7f8b2995f60fea9dc5617fff 100644
|
||||
index a8acd00dc449812d336364229fade2a16e21ccbc..8d8eca3c7de3080111043dc465ed4316af026c0b 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
@@ -85,6 +85,8 @@ class SpellcheckHunspellDictionary
|
||||
@@ -88,6 +88,8 @@ class SpellcheckHunspellDictionary
|
||||
// Tests use this method to set a custom URL for downloading dictionaries.
|
||||
static void SetDownloadURLForTesting(const GURL url);
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 29 Nov 2019 16:08:14 -0800
|
||||
Date: Mon, 18 May 2020 11:12:26 -0700
|
||||
Subject: feat: allow disabling blink scheduler throttling per RenderView
|
||||
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index d07b3cd2f8a2658c46426a97c378e2aae469321c..f316733194014b9f4ab64a0d8c31436b5badf2e9 100644
|
||||
index 8c6deced5a7a46623abfdba1d6e1ce5b85c4df33..24664f95f102029f16c084eb7e7574a527c0dbd7 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -480,6 +480,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -490,6 +490,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ index d07b3cd2f8a2658c46426a97c378e2aae469321c..f316733194014b9f4ab64a0d8c31436b
|
|||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index cfb48f43295d74ab5c1c3cdafbb9ab4210344a15..c1c586f57ad45d33e926e27ef6d2985d10025cb0 100644
|
||||
index 9d3783d1b990672c5754cdc482af280ec460cc85..ab7d088668f4346e9b76a438663d09108f20d60f 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -110,6 +110,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
|
@ -33,7 +33,7 @@ index cfb48f43295d74ab5c1c3cdafbb9ab4210344a15..c1c586f57ad45d33e926e27ef6d2985d
|
|||
void UpdateWebkitPreferences(const WebPreferences& prefs) override;
|
||||
void OnWebkitPreferencesChanged() override;
|
||||
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
|
||||
index 89239568df43a73b46ec433dfb3f96a14f92928e..2d58d35bcdd515112f088bcc02f8c251d80d0411 100644
|
||||
index 85a8c7e9e283b20ad5ace2f8e02479d1ff212899..ccf8bb322ff8258a7006e4ecbee94bca7d675743 100644
|
||||
--- a/content/common/view_messages.h
|
||||
+++ b/content/common/view_messages.h
|
||||
@@ -94,6 +94,9 @@ IPC_STRUCT_TRAITS_END()
|
||||
|
@ -61,10 +61,10 @@ index 893c45a5c71b4e55ea323ae60e11d12ddb099efd..db9a1ff0fe1a912db83692ab17c620cf
|
|||
//
|
||||
// Returns the current WebKit preferences. Note: WebPreferences is cached, so
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index ea7084056f13c60bcc3ba8bd4991a924b6153ee2..ccbe64ec13acb5e39ae869e30eebc3944e4e8ee9 100644
|
||||
index 00333d9aa46d643bf65db07cfac7a3a8959a14a3..5a389d142d809ac8835c85a4d35fa1f7e1311e22 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -1174,6 +1174,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -1181,6 +1181,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
|
||||
|
@ -73,7 +73,7 @@ index ea7084056f13c60bcc3ba8bd4991a924b6153ee2..ccbe64ec13acb5e39ae869e30eebc394
|
|||
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
|
||||
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
|
||||
@@ -1671,6 +1673,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
|
||||
@@ -1685,6 +1687,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
|
||||
return send_content_state_immediately_;
|
||||
}
|
||||
|
||||
|
@ -83,14 +83,14 @@ index ea7084056f13c60bcc3ba8bd4991a924b6153ee2..ccbe64ec13acb5e39ae869e30eebc394
|
|||
+ GetWebView()->SetSchedulerThrottling(allowed);
|
||||
+}
|
||||
+
|
||||
void RenderViewImpl::ApplyPageVisibilityState(
|
||||
PageVisibilityState visibility_state,
|
||||
bool initial_setting) {
|
||||
void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
|
||||
webkit_preferences_ = prefs;
|
||||
ApplyWebPreferences(webkit_preferences_, GetWebView());
|
||||
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
|
||||
index 396c63b9dedde6c82b82edddbb35d010bf55474c..65fb52f7ba2f379c7ae1cab3250269172d83ad09 100644
|
||||
index 3ee43ead214b826d158026feac0aeb21767b2543..253bd39e0c5f5e10d04b614ca4a4b4b141d4b2ca 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -402,6 +402,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
@@ -392,6 +392,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
void OnSetHistoryOffsetAndLength(int history_offset, int history_length);
|
||||
void OnSetRendererPrefs(
|
||||
const blink::mojom::RendererPreferences& renderer_prefs);
|
||||
|
@ -99,10 +99,10 @@ index 396c63b9dedde6c82b82edddbb35d010bf55474c..65fb52f7ba2f379c7ae1cab325026917
|
|||
void OnUpdateTargetURLAck();
|
||||
void OnUpdateWebPreferences(const WebPreferences& prefs);
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index 3995c946382f54582e2de2720dfc3475f76806bb..73ae36568d34f4e40cc68ef53e719532100f88ed 100644
|
||||
index 2403a3d668c807a930e163a1282cb6463c14094c..a0eb764c56d5a0d4e7eb4a21a9d734ffd6ddedd0 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -400,6 +400,7 @@ class WebView {
|
||||
@@ -380,6 +380,7 @@ class WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
|
@ -111,10 +111,10 @@ index 3995c946382f54582e2de2720dfc3475f76806bb..73ae36568d34f4e40cc68ef53e719532
|
|||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 9098b1fa973dd57c5c1074fd73391888c4e6dac4..d5b696d7d372fc6caf3c281ea1c2ff2636a72fbd 100644
|
||||
index f593e3d5c95b5ea5fb6543500ad0d1902c349830..0acd8981a2d4da85eaa9bc13858fd0454681c248 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3322,12 +3322,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3290,6 +3290,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
@ -122,34 +122,35 @@ index 9098b1fa973dd57c5c1074fd73391888c4e6dac4..d5b696d7d372fc6caf3c281ea1c2ff26
|
|||
+ DCHECK(GetPage());
|
||||
+ scheduler_throttling_allowed_ = allowed;
|
||||
+ GetPage()->GetPageScheduler()->SetPageVisible(allowed ?
|
||||
+ (GetVisibilityState() == PageVisibilityState::kVisible) : true);
|
||||
+ (GetVisibilityState() == mojom::blink::PageVisibilityState::kVisible) : true);
|
||||
+}
|
||||
+
|
||||
void WebViewImpl::SetVisibilityState(PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
DCHECK(GetPage());
|
||||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3300,7 +3307,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
- GetPage()->GetPageScheduler()->SetPageVisible(visibility_state ==
|
||||
- PageVisibilityState::kVisible);
|
||||
+ GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
- visibility_state == mojom::blink::PageVisibilityState::kVisible);
|
||||
+ scheduler_throttling_allowed_ ?
|
||||
+ (visibility_state == PageVisibilityState::kVisible) : true);
|
||||
+ (visibility_state == mojom::blink::PageVisibilityState::kVisible) : true);
|
||||
}
|
||||
|
||||
PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 9624d433eea3e2e09d91ce9ad44198d5e045d41b..c30fa33dc1e3e0413a7d483959e8602721e8207a 100644
|
||||
index cce7153c37c33e4fe5ada710dcccc56471a10bca..35defe5d1eef12e66f050321dcf776c1853788b9 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -328,6 +328,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -323,6 +323,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
+ void SetSchedulerThrottling(bool allowed) override;
|
||||
void SetVisibilityState(PageVisibilityState visibility_state,
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
PageVisibilityState GetVisibilityState() override;
|
||||
@@ -691,6 +692,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -683,6 +684,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// WebViewImpl::Close while handling an input event.
|
||||
bool debug_inside_input_handling_ = false;
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ Subject: feat: allow embedders to add observers on created hunspell
|
|||
dictionaries
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
index af11ea50738ca20453c5c20f7807455fca8becfa..301a9de1eb82ebea009f0c20028e8ed87764622b 100644
|
||||
index d048c713cddc0f53595c142e01a91d12e3232ae7..d353a024b8f18e8a02edd7bb9c8cdc76e1af1963 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -363,6 +363,9 @@ void SpellcheckService::LoadHunspellDictionaries() {
|
||||
std::make_unique<SpellcheckHunspellDictionary>(dictionary, context_,
|
||||
this));
|
||||
@@ -436,6 +436,9 @@ void SpellcheckService::LoadHunspellDictionaries() {
|
||||
std::make_unique<SpellcheckHunspellDictionary>(
|
||||
dictionary, platform_spellcheck_language, context_, this));
|
||||
hunspell_dictionaries_.back()->AddObserver(this);
|
||||
+ if (hunspell_observer_) {
|
||||
+ hunspell_dictionaries_.back()->AddObserver(hunspell_observer_);
|
||||
|
@ -18,7 +18,7 @@ index af11ea50738ca20453c5c20f7807455fca8becfa..301a9de1eb82ebea009f0c20028e8ed8
|
|||
hunspell_dictionaries_.back()->Load();
|
||||
}
|
||||
|
||||
@@ -376,6 +379,20 @@ SpellcheckService::GetHunspellDictionaries() {
|
||||
@@ -449,6 +452,20 @@ SpellcheckService::GetHunspellDictionaries() {
|
||||
return hunspell_dictionaries_;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ index af11ea50738ca20453c5c20f7807455fca8becfa..301a9de1eb82ebea009f0c20028e8ed8
|
|||
std::string locale,
|
||||
std::string path,
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
index 97df131375cb11eb562ac0097ab7c870755b46dd..485331591812d0f28011160b186dc2e78f1e77a7 100644
|
||||
index ebb5db00c8215756978dab7f93bb15c41659f8ef..ed72a306c2e2b52256bba3b1cf9ab38f005f3632 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
@@ -123,6 +123,8 @@ class SpellcheckService : public KeyedService,
|
||||
|
@ -52,7 +52,7 @@ index 97df131375cb11eb562ac0097ab7c870755b46dd..485331591812d0f28011160b186dc2e7
|
|||
// Load a dictionary from a given path. Format specifies how the dictionary
|
||||
// is stored. Return value is true if successful.
|
||||
bool LoadExternalDictionary(std::string language,
|
||||
@@ -225,6 +227,8 @@ class SpellcheckService : public KeyedService,
|
||||
@@ -273,6 +275,8 @@ class SpellcheckService : public KeyedService,
|
||||
// A pointer to the BrowserContext which this service refers to.
|
||||
content::BrowserContext* context_;
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
|
|||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 3af93631092dc191c314f378b89ab09a56b36b3a..bcb285ee09d7218098d748d422e6dbbdafbc4c6a 100644
|
||||
index b2ba22d8da656db0408194efad2a9999436ce9bc..e757de8ba0c6357275883f4c2bae51d61b98718a 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -111,6 +111,8 @@ viz_component("service") {
|
||||
|
@ -527,10 +527,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
|
|||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index cf47803e781a2bf19f71c1eb2e7686cd7513f951..948affdaff9c55edf3d8067237bf64172d30ad8c 100644
|
||||
index 48cd5ff63d76899b24e460bc2b074fa6b2e38fd2..434be7569f45e21d2b3e95fc80a6b5bc1f4ce316 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -73,6 +73,7 @@ class DisplayPrivate;
|
||||
@@ -74,6 +74,7 @@ class DisplayPrivate;
|
||||
class ExternalBeginFrameController;
|
||||
} // namespace mojom
|
||||
class ContextProvider;
|
||||
|
@ -538,7 +538,7 @@ index cf47803e781a2bf19f71c1eb2e7686cd7513f951..948affdaff9c55edf3d8067237bf6417
|
|||
class HostFrameSinkManager;
|
||||
class LocalSurfaceIdAllocation;
|
||||
class RasterContextProvider;
|
||||
@@ -126,6 +127,15 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
@@ -127,6 +128,15 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
|
||||
};
|
||||
|
||||
|
@ -554,7 +554,7 @@ index cf47803e781a2bf19f71c1eb2e7686cd7513f951..948affdaff9c55edf3d8067237bf6417
|
|||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||
@@ -160,6 +170,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -161,6 +171,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
|
@ -564,7 +564,7 @@ index cf47803e781a2bf19f71c1eb2e7686cd7513f951..948affdaff9c55edf3d8067237bf6417
|
|||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -409,6 +422,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -417,6 +430,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
|
||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ understanding, it seems like we slightly misuse the print preview API
|
|||
and this is fallout from using it in a way the code doesn't expect.
|
||||
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 5d829b6ef0c02d0f230c9581377fe3b5941d9b42..776ca12f4509d317ff10461efbad8b7a09bd3afd 100644
|
||||
index 1db0c6cad6cc27b3a548b78d701d2ada7023dad1..3078f6c976086eeef6bc76efd490832c8798d6ce 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -1475,6 +1475,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() {
|
||||
@@ -1495,6 +1495,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() {
|
||||
const std::vector<int>& pages = print_pages_params_->pages;
|
||||
|
||||
bool require_document_metafile =
|
||||
|
|
|
@ -7,7 +7,7 @@ Subject:
|
|||
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 62ffd51c4dd3166d6adbda24e6ee47805a69c93b..398290ffe8dd2d8d2ab13a6877a1932722968255 100644
|
||||
index 6fc6ba115fb68072c1946d99710ea0a2c6233ecf..c4d31ee43ebac512f2de98e6a0d88d59bacd992d 100644
|
||||
--- a/base/process/launch_mac.cc
|
||||
+++ b/base/process/launch_mac.cc
|
||||
@@ -26,8 +26,10 @@ extern "C" {
|
||||
|
@ -21,7 +21,7 @@ index 62ffd51c4dd3166d6adbda24e6ee47805a69c93b..398290ffe8dd2d8d2ab13a6877a19327
|
|||
|
||||
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
|
||||
API_AVAILABLE(macosx(10.14));
|
||||
@@ -98,21 +100,29 @@ class PosixSpawnFileActions {
|
||||
@@ -102,21 +104,29 @@ class PosixSpawnFileActions {
|
||||
};
|
||||
|
||||
int ChangeCurrentThreadDirectory(const char* path) {
|
||||
|
@ -51,7 +51,7 @@ index 62ffd51c4dd3166d6adbda24e6ee47805a69c93b..398290ffe8dd2d8d2ab13a6877a19327
|
|||
}
|
||||
|
||||
struct GetAppOutputOptions {
|
||||
@@ -228,11 +238,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
@@ -232,11 +242,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
file_actions.Inherit(STDERR_FILENO);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,147 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Thu, 4 Oct 2018 14:57:02 -0700
|
||||
Subject: Make sure hunspell file is not destroyed in UI thread
|
||||
|
||||
Submitted to Chromium at:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/2206199/1
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
index 653ef44ff095015ef25cc59bf42f9fbd9d907160..d6f9bf8e0d2cf2e52698d4d132361a5d7118d00c 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -93,21 +93,28 @@ bool SaveDictionaryData(std::unique_ptr<std::string> data,
|
||||
|
||||
} // namespace
|
||||
|
||||
-SpellcheckHunspellDictionary::DictionaryFile::DictionaryFile() {
|
||||
-}
|
||||
+SpellcheckHunspellDictionary::DictionaryFile::DictionaryFile(
|
||||
+ base::TaskRunner* task_runner) : task_runner_(task_runner) {}
|
||||
|
||||
SpellcheckHunspellDictionary::DictionaryFile::~DictionaryFile() {
|
||||
+ if (file.IsValid()) {
|
||||
+ task_runner_->PostTask(FROM_HERE,
|
||||
+ base::BindOnce(&CloseDictionary, std::move(file)));
|
||||
+ }
|
||||
}
|
||||
|
||||
SpellcheckHunspellDictionary::DictionaryFile::DictionaryFile(
|
||||
DictionaryFile&& other)
|
||||
- : path(other.path), file(std::move(other.file)) {}
|
||||
+ : path(other.path),
|
||||
+ file(std::move(other.file)),
|
||||
+ task_runner_(std::move(other.task_runner_)) {}
|
||||
|
||||
SpellcheckHunspellDictionary::DictionaryFile&
|
||||
SpellcheckHunspellDictionary::DictionaryFile::operator=(
|
||||
DictionaryFile&& other) {
|
||||
path = other.path;
|
||||
file = std::move(other.file);
|
||||
+ task_runner_ = std::move(other.task_runner_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -121,15 +128,10 @@ SpellcheckHunspellDictionary::SpellcheckHunspellDictionary(
|
||||
use_browser_spellchecker_(false),
|
||||
browser_context_(browser_context),
|
||||
spellcheck_service_(spellcheck_service),
|
||||
- download_status_(DOWNLOAD_NONE) {}
|
||||
+ download_status_(DOWNLOAD_NONE),
|
||||
+ dictionary_file_(task_runner_.get()) {}
|
||||
|
||||
SpellcheckHunspellDictionary::~SpellcheckHunspellDictionary() {
|
||||
- if (dictionary_file_.file.IsValid()) {
|
||||
- task_runner_->PostTask(
|
||||
- FROM_HERE,
|
||||
- base::BindOnce(&CloseDictionary, std::move(dictionary_file_.file)));
|
||||
- }
|
||||
-
|
||||
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
|
||||
// Disable the language from platform spellchecker.
|
||||
if (spellcheck::UseBrowserSpellChecker())
|
||||
@@ -324,7 +326,8 @@ void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
|
||||
#if !defined(OS_ANDROID)
|
||||
// static
|
||||
SpellcheckHunspellDictionary::DictionaryFile
|
||||
-SpellcheckHunspellDictionary::OpenDictionaryFile(const base::FilePath& path) {
|
||||
+SpellcheckHunspellDictionary::OpenDictionaryFile(base::TaskRunner* task_runner,
|
||||
+ const base::FilePath& path) {
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::MAY_BLOCK);
|
||||
|
||||
@@ -335,7 +338,7 @@ SpellcheckHunspellDictionary::OpenDictionaryFile(const base::FilePath& path) {
|
||||
// For systemwide installations on Windows, the default directory may not
|
||||
// have permissions for download. In that case, the alternate directory for
|
||||
// download is chrome::DIR_USER_DATA.
|
||||
- DictionaryFile dictionary;
|
||||
+ DictionaryFile dictionary(task_runner);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Check if the dictionary exists in the fallback location. If so, use it
|
||||
@@ -377,7 +380,7 @@ SpellcheckHunspellDictionary::OpenDictionaryFile(const base::FilePath& path) {
|
||||
// static
|
||||
SpellcheckHunspellDictionary::DictionaryFile
|
||||
SpellcheckHunspellDictionary::InitializeDictionaryLocation(
|
||||
- const std::string& language) {
|
||||
+ base::TaskRunner* task_runner, const std::string& language) {
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::MAY_BLOCK);
|
||||
|
||||
@@ -392,7 +395,7 @@ SpellcheckHunspellDictionary::InitializeDictionaryLocation(
|
||||
base::FilePath dict_path =
|
||||
spellcheck::GetVersionedFileName(language, dict_dir);
|
||||
|
||||
- return OpenDictionaryFile(dict_path);
|
||||
+ return OpenDictionaryFile(task_runner, dict_path);
|
||||
}
|
||||
|
||||
void SpellcheckHunspellDictionary::InitializeDictionaryLocationComplete(
|
||||
@@ -481,7 +484,8 @@ void SpellcheckHunspellDictionary::PlatformSupportsLanguageComplete(
|
||||
#if !defined(OS_ANDROID) && BUILDFLAG(USE_RENDERER_SPELLCHECKER)
|
||||
base::PostTaskAndReplyWithResult(
|
||||
task_runner_.get(), FROM_HERE,
|
||||
- base::BindOnce(&InitializeDictionaryLocation, language_),
|
||||
+ base::BindOnce(&InitializeDictionaryLocation,
|
||||
+ base::RetainedRef(task_runner_.get()), language_),
|
||||
base::BindOnce(
|
||||
&SpellcheckHunspellDictionary::InitializeDictionaryLocationComplete,
|
||||
weak_ptr_factory_.GetWeakPtr()));
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
index 4662bdc08b54304a7f8b2995f60fea9dc5617fff..7679f526c05980889adb2f6a8a0c20dd7f5415c3 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
|
||||
@@ -99,7 +99,7 @@ class SpellcheckHunspellDictionary
|
||||
// blocking sequence.
|
||||
struct DictionaryFile {
|
||||
public:
|
||||
- DictionaryFile();
|
||||
+ explicit DictionaryFile(base::TaskRunner* task_runner);
|
||||
~DictionaryFile();
|
||||
|
||||
DictionaryFile(DictionaryFile&& other);
|
||||
@@ -112,6 +112,9 @@ class SpellcheckHunspellDictionary
|
||||
base::File file;
|
||||
|
||||
private:
|
||||
+ // Task runner where the file is created.
|
||||
+ scoped_refptr<base::TaskRunner> task_runner_;
|
||||
+
|
||||
DISALLOW_COPY_AND_ASSIGN(DictionaryFile);
|
||||
};
|
||||
|
||||
@@ -126,11 +129,12 @@ class SpellcheckHunspellDictionary
|
||||
#if !defined(OS_ANDROID)
|
||||
// Figures out the location for the dictionary, verifies its contents, and
|
||||
// opens it.
|
||||
- static DictionaryFile OpenDictionaryFile(const base::FilePath& path);
|
||||
+ static DictionaryFile OpenDictionaryFile(base::TaskRunner* task_runner,
|
||||
+ const base::FilePath& path);
|
||||
|
||||
// Gets the default location for the dictionary file.
|
||||
static DictionaryFile InitializeDictionaryLocation(
|
||||
- const std::string& language);
|
||||
+ base::TaskRunner* task_runner, const std::string& language);
|
||||
|
||||
// The reply point for PostTaskAndReplyWithResult, called after the dictionary
|
||||
// file has been initialized.
|
|
@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
|
|||
to true as then Chromiums assumptions around processes become correct.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6a18c7085f102d475bd36925106e86c56812accc..bcd52490b3ea333c521cf0ab63206a66889cf939 100644
|
||||
index c017455770707877008e2df07e65c391068bdb8c..31b30a3f729258accab5a135eeddba7b79990e81 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2365,11 +2365,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -2368,11 +2368,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
WebContentsImpl* outermost = GetOutermostWebContents();
|
||||
if (event.button == blink::WebPointerProperties::Button::kBack &&
|
||||
outermost->controller_.CanGoBack()) {
|
||||
|
|
|
@ -22,11 +22,11 @@ index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca8871
|
|||
}
|
||||
}
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.h b/ui/base/accelerators/media_keys_listener.h
|
||||
index 997718d8affaa193fcaabff4cd4c8b0c23df8891..e121598d46e7c62a3b14cb7960136f655cc69ab6 100644
|
||||
index 6787fa39da18ec26c215e4cbe0b3f69093323f8c..ec10c46cde437a935edfdf79e5ba9622c6ba1d67 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.h
|
||||
+++ b/ui/base/accelerators/media_keys_listener.h
|
||||
@@ -20,8 +20,9 @@ class Accelerator;
|
||||
class UI_BASE_EXPORT MediaKeysListener {
|
||||
class COMPONENT_EXPORT(UI_BASE) MediaKeysListener {
|
||||
public:
|
||||
enum class Scope {
|
||||
- kGlobal, // Listener works whenever application in focus or not.
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 22 May 2020 12:05:07 -0700
|
||||
Subject: Fix XServer crash when using XWindow::SetXWindowIcons
|
||||
|
||||
This patch should be removed once https://bugs.chromium.org/p/chromium/issues/detail?id=1085836
|
||||
is addressed.
|
||||
|
||||
diff --git a/ui/base/x/x11_window.cc b/ui/base/x/x11_window.cc
|
||||
index 03282473ab22d2669d1b7ba9ada3ec483748dc57..b67f8104bd9f9b1dc517654f8658487c84d9a032 100644
|
||||
--- a/ui/base/x/x11_window.cc
|
||||
+++ b/ui/base/x/x11_window.cc
|
||||
@@ -64,17 +64,17 @@ gfx::Rect SanitizeBounds(const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void SerializeImageRepresentation(const gfx::ImageSkiaRep& rep,
|
||||
- std::vector<uint32_t>* data) {
|
||||
- uint32_t width = rep.GetWidth();
|
||||
+ std::vector<unsigned long>* data) {
|
||||
+ int width = rep.GetWidth();
|
||||
data->push_back(width);
|
||||
|
||||
- uint32_t height = rep.GetHeight();
|
||||
+ int height = rep.GetHeight();
|
||||
data->push_back(height);
|
||||
|
||||
const SkBitmap& bitmap = rep.GetBitmap();
|
||||
|
||||
- for (uint32_t y = 0; y < height; ++y)
|
||||
- for (uint32_t x = 0; x < width; ++x)
|
||||
+ for (int y = 0; y < height; ++y)
|
||||
+ for (int x = 0; x < width; ++x)
|
||||
data->push_back(bitmap.getColor(x, y));
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ void XWindow::SetXWindowIcons(const gfx::ImageSkia& window_icon,
|
||||
// so that we can pass to the WM.
|
||||
//
|
||||
// All of this could be made much, much better.
|
||||
- std::vector<uint32_t> data;
|
||||
+ std::vector<unsigned long> data;
|
||||
|
||||
if (!window_icon.isNull())
|
||||
SerializeImageRepresentation(window_icon.GetRepresentation(1.0f), &data);
|
||||
@@ -796,8 +796,16 @@ void XWindow::SetXWindowIcons(const gfx::ImageSkia& window_icon,
|
||||
SerializeImageRepresentation(app_icon.GetRepresentation(1.0f), &data);
|
||||
|
||||
if (!data.empty()) {
|
||||
- ui::SetArrayProperty(xwindow_, gfx::GetAtom("_NET_WM_ICON"),
|
||||
- x11::Atom::CARDINAL, data);
|
||||
+ // XChangeProperty() expects values of type 32 to be longs.
|
||||
+ std::unique_ptr<unsigned long[]> value(new Atom[data.size()]);
|
||||
+ for (size_t i = 0; i < data.size(); ++i)
|
||||
+ value[i] = data[i];
|
||||
+ XChangeProperty(
|
||||
+ gfx::GetXDisplay(), xwindow_,
|
||||
+ XInternAtom(gfx::GetXDisplay(), "_NET_WM_ICON", x11::False),
|
||||
+ XA_CARDINAL, 32, PropModeReplace,
|
||||
+ reinterpret_cast<const unsigned char*>(value.get()),
|
||||
+ data.size());
|
||||
}
|
||||
}
|
||||
|
|
@ -10,10 +10,10 @@ Should be removed once grit is fixed.
|
|||
Tracking bug: https://crbug.com/1040605
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 1c5366d3096ff2616778b67f690521ddd3472030..96b96d23bb88f2c90265461b0ae11e276df1c644 100644
|
||||
index ef7bf4b6997f9d655561c9031c0ad9af417fa22a..a2c4fdea9eea491147462521aee5b0eb974da381 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -594,15 +594,16 @@
|
||||
@@ -601,15 +601,16 @@
|
||||
"includes": [3840],
|
||||
},
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ and respond with custom instance. Also allows for us to at-runtime
|
|||
enable or disable this patch.
|
||||
|
||||
diff --git a/content/browser/browsing_instance.cc b/content/browser/browsing_instance.cc
|
||||
index f49ec7e1456751e506609a797f0b3b97b3e86a56..c7198c08d9292981d6fba12d5941f606c03b5d35 100644
|
||||
index 8da8fc97f141159811e24b51ee9bdd6be045d726..e756441aa7a871934be72be67f35351316b59245 100644
|
||||
--- a/content/browser/browsing_instance.cc
|
||||
+++ b/content/browser/browsing_instance.cc
|
||||
@@ -84,6 +84,13 @@ scoped_refptr<SiteInstanceImpl> BrowsingInstance::GetSiteInstanceForURL(
|
||||
|
@ -26,7 +26,7 @@ index f49ec7e1456751e506609a797f0b3b97b3e86a56..c7198c08d9292981d6fba12d5941f606
|
|||
bool allow_default_instance,
|
||||
GURL* site_url,
|
||||
diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h
|
||||
index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c24798e204 100644
|
||||
index 06f0961e122f326e41610dd7a1b32fa752f0c68f..a041189f79cea5b59e1792b79c1348e316ca3f1e 100644
|
||||
--- a/content/browser/browsing_instance.h
|
||||
+++ b/content/browser/browsing_instance.h
|
||||
@@ -136,6 +136,11 @@ class CONTENT_EXPORT BrowsingInstance final
|
||||
|
@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
|
|||
// another SiteInstance for the same site.
|
||||
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
|
||||
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
|
||||
index 26fd7bdfb902508922b9a4c5f9f42ae9182356d4..fcd4f21f54066057a48b7b34657177fb28a80cf5 100644
|
||||
index f81f412ed1b8c238adb6d0635cd23b1e1da50090..d77d6ee893b2481b2748c7931189be8b18301174 100644
|
||||
--- a/content/browser/frame_host/navigation_request.cc
|
||||
+++ b/content/browser/frame_host/navigation_request.cc
|
||||
@@ -1284,6 +1284,24 @@ void NavigationRequest::BeginNavigation() {
|
||||
@@ -1275,6 +1275,24 @@ void NavigationRequest::BeginNavigation() {
|
||||
// it immediately.
|
||||
EnterChildTraceEvent("ResponseStarted", this);
|
||||
|
||||
|
@ -71,10 +71,10 @@ index 26fd7bdfb902508922b9a4c5f9f42ae9182356d4..fcd4f21f54066057a48b7b34657177fb
|
|||
render_frame_host_ =
|
||||
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
|
||||
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
index 0feececd533b3e53b8dcfd36caf0f41fbd595fd2..b1e983078c3693c45ff30075e38f0ccef93206f3 100644
|
||||
index 98475dc9b06182951a473c9d33fcbd23fe4892db..646cbacbdaaf33be896c9fee3259d0779f03c451 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -2391,6 +2391,16 @@ bool RenderFrameHostManager::InitRenderView(
|
||||
@@ -2406,6 +2406,16 @@ bool RenderFrameHostManager::InitRenderView(
|
||||
scoped_refptr<SiteInstance>
|
||||
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
NavigationRequest* request) {
|
||||
|
@ -91,7 +91,7 @@ index 0feececd533b3e53b8dcfd36caf0f41fbd595fd2..b1e983078c3693c45ff30075e38f0cce
|
|||
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
|
||||
|
||||
// All children of MHTML documents must be MHTML documents. They all live in
|
||||
@@ -2410,10 +2420,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2425,10 +2435,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
//
|
||||
// TODO(clamy): We should also consider as a candidate SiteInstance the
|
||||
// speculative SiteInstance that was computed on redirects.
|
||||
|
@ -156,7 +156,7 @@ index 0feececd533b3e53b8dcfd36caf0f41fbd595fd2..b1e983078c3693c45ff30075e38f0cce
|
|||
|
||||
// Account for renderer-initiated reload as well.
|
||||
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
|
||||
@@ -2456,6 +2516,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2493,6 +2553,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ index 0feececd533b3e53b8dcfd36caf0f41fbd595fd2..b1e983078c3693c45ff30075e38f0cce
|
|||
}
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index f0d1e2915e89c05bb4b0f71f169b1fcdd812b004..cfb668b9250e48048d6959910c9f44c1e765d86b 100644
|
||||
index e17d9239c65aac5d0038a2162405b9f8525603ba..44361c84ff6bdee12908d518a84ec773c067d614 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -456,6 +456,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
|
||||
|
@ -182,7 +182,7 @@ index f0d1e2915e89c05bb4b0f71f169b1fcdd812b004..cfb668b9250e48048d6959910c9f44c1
|
|||
const GURL& url) {
|
||||
return browsing_instance_->GetSiteInstanceForURL(
|
||||
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
|
||||
index 85288dac0acfb51330669cd87cfc0343af3dfd2c..3bb39459fd3c87a0968044e02d684f6b777935bb 100644
|
||||
index 10dd6f03af22bd7d0f7b65a58d4a58430c129b49..88504adb27e6461648f7dce48c93e2e1a7004fb8 100644
|
||||
--- a/content/browser/site_instance_impl.h
|
||||
+++ b/content/browser/site_instance_impl.h
|
||||
@@ -98,6 +98,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
||||
|
@ -194,10 +194,10 @@ index 85288dac0acfb51330669cd87cfc0343af3dfd2c..3bb39459fd3c87a0968044e02d684f6b
|
|||
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 c9fc489ded15dc3cfcdd71c86707e6e86a7e6ba3..96f7423b78c16b119b761b47c317d8c326a1868d 100644
|
||||
index 3c743a74321d54e36248d7b6201d9fdf5b749af6..13418cab6cce233a14110eca7a887eb549cf438b 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -57,6 +57,21 @@
|
||||
@@ -59,6 +59,21 @@
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -220,10 +220,10 @@ index c9fc489ded15dc3cfcdd71c86707e6e86a7e6ba3..96f7423b78c16b119b761b47c317d8c3
|
|||
const MainFunctionParams& parameters) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 2d8d316f948fbc25fd4b1aa899b38ba2607e24a1..6a9d69ee79eafe531bd974e3648e107a4c6de1e1 100644
|
||||
index 491d6e7260dd329f312916c2f4aaba0aa177cc6a..a9119a722935a8320e463e2e24cdd39b9e8b1773 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -234,8 +234,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -236,8 +236,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
using IsClipboardPasteAllowedCallback =
|
||||
base::OnceCallback<void(ClipboardPasteAllowed)>;
|
||||
|
||||
|
@ -270,7 +270,7 @@ index 2d8d316f948fbc25fd4b1aa899b38ba2607e24a1..6a9d69ee79eafe531bd974e3648e107a
|
|||
// implementations for the browser startup code. See comments in
|
||||
// browser_main_parts.h.
|
||||
diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h
|
||||
index 0a5aec6455a9337f806a9376d83935b60891109b..b57294b1e19ce7a96aae05c23ab42190f35ae780 100644
|
||||
index 82b5d4c25adc7071dfcfe56047520fa2fa7b72f2..8535ed4ab3ca5a90f3de7ab9e80159b2082e7dfa 100644
|
||||
--- a/content/public/browser/site_instance.h
|
||||
+++ b/content/public/browser/site_instance.h
|
||||
@@ -121,6 +121,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {
|
||||
|
|
|
@ -7,7 +7,7 @@ We don't use gin to create the V8 platform, because we need to inject Node
|
|||
things.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index ee74e6ea92c64d0e95a4988557b236667f5b7e42..c3ae4c6221686479d05800c51d17d581c095e397 100644
|
||||
index 570a23af3c0fb4839b063c742d1d345a27799cd0..ece381bb1ce22bc65c3d8e428354adeb4b6fe4c1 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -103,9 +103,10 @@ IsolateHolder::~IsolateHolder() {
|
||||
|
@ -38,10 +38,10 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b
|
|||
v8::Isolate* isolate() { return isolate_; }
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 2e2e3464a3760c39471b6897eee2b337f611cce0..d6effe50b5213b308cf59cd1c8cc7f1a62225763 100644
|
||||
index 517283e2f1886408ee5ad935e3bafecb9728ca94..e7224adc9f4def27a370bcca8effd7bccc01ab02 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -190,12 +190,14 @@ enum LoadV8FileResult {
|
||||
@@ -191,12 +191,14 @@ enum LoadV8FileResult {
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
|
|
|
@ -40,7 +40,7 @@ index ce8f9551f1b17c7508a0e0bd0ecc55eca2c0ac6e..2e71ce71ff9f18e2fc68f51ddbeedc39
|
|||
// Update the GPU feature info. This updates the blacklist and enabled status
|
||||
// of GPU rasterization. In the future this will be used for more features.
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index b09b8ffe7684f511e971d0c470c8b67a46288b6e..f41734cc66d7ee71509a66effec76be3797b00d6 100644
|
||||
index e4ebd7fcd4a1b9045552e72fef23cd5cc7941b5b..8c52a512c272a19edb0076efe22473928ddc1522 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -923,6 +923,10 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
|||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 4c358d9c9ee67fa1fed8144d894c9c51062a76e7..1c5366d3096ff2616778b67f690521ddd3472030 100644
|
||||
index 1c7546fde012170f43c75e9863b3e9a402f860c9..ef7bf4b6997f9d655561c9031c0ad9af417fa22a 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -600,6 +600,11 @@
|
||||
@@ -607,6 +607,11 @@
|
||||
"includes": [3860],
|
||||
},
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ require a largeish patch to get working, so just redirect it to our
|
|||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index 447dfa6f021ccba87d757f535f566fa3327aa7cd..090ea06708609f18750025b7895d6d97239f7fec 100644
|
||||
index 6d6a5fa9530d2a7309c46385b853af42bd25569f..bbb7789cb89a23eea592179d23379cff2fedbefa 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -8,8 +8,8 @@
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/guid.h"
|
||||
#include "base/task/post_task.h"
|
||||
|
|
|
@ -8,7 +8,7 @@ needs to register on an isolate so that it can be used later
|
|||
down in the initialization process of an isolate.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index c3ae4c6221686479d05800c51d17d581c095e397..e4c8a194418dc62f0e0222c08fe9ad39a4b9b9af 100644
|
||||
index ece381bb1ce22bc65c3d8e428354adeb4b6fe4c1..161788e0ba5b12dff34d71ff9e84c71615d93a58 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -53,7 +53,8 @@ IsolateHolder::IsolateHolder(
|
||||
|
|
|
@ -6,18 +6,23 @@ Subject: mas-cfisobjc.patch
|
|||
Removes usage of the _CFIsObjC private API.
|
||||
|
||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
||||
index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b36e9d422 100644
|
||||
index f37884f6f70e230555e1e0eb7585e108fd8015d6..4c7726c2cb1afbfd43518159d126a58fa1515c1e 100644
|
||||
--- a/base/mac/foundation_util.mm
|
||||
+++ b/base/mac/foundation_util.mm
|
||||
@@ -27,7 +27,6 @@ CFTypeID SecKeyGetTypeID();
|
||||
@@ -27,12 +27,6 @@ CFTypeID SecKeyGetTypeID();
|
||||
#if !defined(OS_IOS)
|
||||
CFTypeID SecACLGetTypeID();
|
||||
CFTypeID SecTrustedApplicationGetTypeID();
|
||||
-// The NSFont/CTFont toll-free bridging is broken before 10.15.
|
||||
-// http://www.openradar.me/15341349 rdar://15341349
|
||||
-//
|
||||
-// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the
|
||||
-// minimum OS for Chromium, remove this SPI declaration.
|
||||
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
||||
@@ -316,8 +315,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
|
||||
@@ -325,8 +319,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
|
||||
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
||||
DCHECK(!cf_val ||
|
||||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
||||
|
@ -27,7 +32,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
|
|||
return ns_val;
|
||||
}
|
||||
|
||||
@@ -385,9 +383,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
|
||||
@@ -397,9 +390,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
|
||||
return (CTFontRef)(cf_val);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: mas-cgdisplayusesforcetogray.patch
|
|||
Removes usage of the CGDisplayUsesForceToGray private API.
|
||||
|
||||
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
||||
index 0d64613458b5da1211b8d2f8ec3088e19af0c10d..60b0680953647b410a2a7998544689ec2bf73c47 100644
|
||||
index a4e374dd3552288ebead42c6c1e30e593496bafd..844f4c74d246b0008c270dc9721d15e9e0ebf0a5 100644
|
||||
--- a/ui/display/mac/screen_mac.mm
|
||||
+++ b/ui/display/mac/screen_mac.mm
|
||||
@@ -133,7 +133,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
|
||||
@@ -131,7 +131,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
|
||||
display.set_color_depth(Display::kDefaultBitsPerPixel);
|
||||
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
|
||||
}
|
||||
|
|
|
@ -95,10 +95,10 @@ index e03bbc724cfd01967e71998394361556df1c4915..783745b11365c04c1e1052197d20d494
|
|||
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
|
||||
// can only be accomplished by overriding methods.
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1c8a8f158 100644
|
||||
index 5e5a39c2920b748823d21f15bc054733d7aa6441..980c4cef13bacb46e92264bf38f3934626515190 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -14,7 +14,9 @@
|
||||
@@ -15,7 +15,9 @@
|
||||
#import "ui/base/cocoa/window_size_constants.h"
|
||||
|
||||
@interface NSWindow (Private)
|
||||
|
@ -108,7 +108,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
|
|||
- (BOOL)hasKeyAppearance;
|
||||
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
|
||||
- (BOOL)_isConsideredOpenForPersistentState;
|
||||
@@ -56,6 +58,8 @@
|
||||
@@ -57,6 +59,8 @@
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -117,7 +117,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
|
|||
@implementation NativeWidgetMacNSWindowTitledFrame
|
||||
- (void)mouseDown:(NSEvent*)event {
|
||||
if (self.window.isMovable)
|
||||
@@ -82,6 +86,8 @@
|
||||
@@ -83,6 +87,8 @@
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -126,7 +126,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
|
|||
@implementation NativeWidgetMacNSWindow {
|
||||
@private
|
||||
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
|
||||
@@ -163,6 +169,8 @@
|
||||
@@ -164,6 +170,8 @@
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
|
@ -135,7 +135,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
|
|||
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
if (windowStyle & NSWindowStyleMaskTitled) {
|
||||
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
|
||||
@@ -174,6 +182,8 @@
|
||||
@@ -175,6 +183,8 @@
|
||||
return [super frameViewClassForStyleMask:windowStyle];
|
||||
}
|
||||
|
||||
|
|
|
@ -64,10 +64,10 @@ index 2ee45cb069ec5d78d9c7a3f61fdd1d444a590f41..badc4323b910f8e3957583e05af30347
|
|||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
|
||||
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
index 82696053ce7cd1d47c9034899a76555af716f4ba..0ed7a32fa839b449aaacc2338f59f6ff17814891 100644
|
||||
index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a4dc4ea8e 100644
|
||||
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
@@ -66,8 +66,10 @@ class RenderWidgetHostNSViewBridgeOwner
|
||||
@@ -70,8 +70,10 @@ class RenderWidgetHostNSViewBridgeOwner
|
||||
return nil;
|
||||
}
|
||||
void SetAccessibilityWindow(NSWindow* window) override {
|
||||
|
@ -78,7 +78,7 @@ index 82696053ce7cd1d47c9034899a76555af716f4ba..0ed7a32fa839b449aaacc2338f59f6ff
|
|||
}
|
||||
|
||||
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
|
||||
@@ -126,8 +128,10 @@ class RenderWidgetHostNSViewBridgeOwner
|
||||
@@ -133,8 +135,10 @@ class RenderWidgetHostNSViewBridgeOwner
|
||||
|
||||
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
|
||||
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
|
||||
|
@ -90,7 +90,7 @@ index 82696053ce7cd1d47c9034899a76555af716f4ba..0ed7a32fa839b449aaacc2338f59f6ff
|
|||
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
|
||||
};
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
index c610426ad9b91505da7b529015fc19a27d5ee170..2858e299ab9788a17e006c1093f01803c223fb1b 100644
|
||||
index ae33d10a25b1c3effdee4d308cb2b1ff5881fa79..8098362ccea0ce0739c2b5c9d30413047a9cd8ed 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
@@ -46,7 +46,9 @@ class ScopedPasswordInputEnabler;
|
||||
|
@ -103,7 +103,7 @@ index c610426ad9b91505da7b529015fc19a27d5ee170..2858e299ab9788a17e006c1093f01803
|
|||
@class RenderWidgetHostViewCocoa;
|
||||
|
||||
namespace content {
|
||||
@@ -619,10 +621,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
@@ -627,10 +629,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
// EnsureSurfaceSynchronizedForWebTest().
|
||||
uint32_t latest_capture_sequence_number_ = 0u;
|
||||
|
||||
|
@ -117,7 +117,7 @@ index c610426ad9b91505da7b529015fc19a27d5ee170..2858e299ab9788a17e006c1093f01803
|
|||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index c56fb05c579f3c95a132ee00a2ed83bf2cb85268..385b0dbeb7cbfb31ad0726051dc2e8fb4d7b16b2 100644
|
||||
index c0a8c7b7c3e4e0d9038ab08f63a8a5aaefd96122..1cf61e86d97c5735836d7d0211b179300b46b454 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
|
||||
|
@ -170,10 +170,10 @@ index c56fb05c579f3c95a132ee00a2ed83bf2cb85268..385b0dbeb7cbfb31ad0726051dc2e8fb
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index a4c47479dd8a39f467e5ea8ed3e2bb934e911973..46047665d20233d22b0c8c451a1ce375dcb2567e 100644
|
||||
index bc47a9182e1f8d0e9442e6f648144bb0550002ed..798f77824bd5ddd375c7c62038adbb6b672eb1ea 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -305,6 +305,13 @@ jumbo_component("base") {
|
||||
@@ -309,6 +309,13 @@ jumbo_component("base") {
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -188,19 +188,19 @@ index a4c47479dd8a39f467e5ea8ed3e2bb934e911973..46047665d20233d22b0c8c451a1ce375
|
|||
sources += [ "l10n/l10n_util_posix.cc" ]
|
||||
}
|
||||
diff --git a/ui/base/cocoa/remote_accessibility_api.h b/ui/base/cocoa/remote_accessibility_api.h
|
||||
index 2a58aebabb23443a2c11364af4988c573f3909ba..3424b6011e80e9c995519b6a8d652abd843d926b 100644
|
||||
index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4bed139a27 100644
|
||||
--- a/ui/base/cocoa/remote_accessibility_api.h
|
||||
+++ b/ui/base/cocoa/remote_accessibility_api.h
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "base/component_export.h"
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "ui/base/ui_base_export.h"
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
+
|
||||
@interface NSAccessibilityRemoteUIElement : NSObject
|
||||
+ (void)registerRemoteUIProcessIdentifier:(int)pid;
|
||||
+ (NSData*)remoteTokenForLocalUIElement:(id)element;
|
||||
@@ -32,4 +34,6 @@ class UI_BASE_EXPORT RemoteAccessibility {
|
||||
@@ -32,4 +34,6 @@ class COMPONENT_EXPORT(UI_BASE) RemoteAccessibility {
|
||||
|
||||
} // namespace ui
|
||||
|
||||
|
|
|
@ -93,12 +93,12 @@ index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329f
|
|||
|
||||
void DisplayCALayerTree::GotIOSurfaceFrame(
|
||||
diff --git a/ui/base/cocoa/remote_layer_api.h b/ui/base/cocoa/remote_layer_api.h
|
||||
index 2057fe69d1bb4a2eb0b1dabc5473a30d676847fe..2aba330fc488660ef874caae26a06e6847cdaf93 100644
|
||||
index d684614589c9e55965450d712ee6dc0deef6aade..e0446753a3d972215423c079160fe8bfd2f9c3be 100644
|
||||
--- a/ui/base/cocoa/remote_layer_api.h
|
||||
+++ b/ui/base/cocoa/remote_layer_api.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "ui/base/ui_base_export.h"
|
||||
#include "base/component_export.h"
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
// The CGSConnectionID is used to create the CAContext in the process that is
|
||||
|
|
|
@ -50,7 +50,7 @@ index 5124b17f020849671a7f03d92bda052eff84d169..f9730f71c122965f7ce7815a1b9a7b32
|
|||
// 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 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c4842a0bbc2c 100644
|
||||
index 558839d8847479cb10e747576a2d0cd57701bda0..975054ba2605dae54800e6d087f9d1ce03e97c09 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -206,6 +206,7 @@ NSString* const
|
||||
|
@ -124,7 +124,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
{NSAccessibilitySizeAttribute, @"size"},
|
||||
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
||||
{NSAccessibilitySubroleAttribute, @"subrole"},
|
||||
@@ -1295,6 +1307,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1289,6 +1301,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
ax::mojom::Restriction::kDisabled];
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)endTextMarker {
|
||||
@@ -1305,6 +1318,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1299,6 +1312,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
- (NSNumber*)expanded {
|
||||
if (![self instanceActive])
|
||||
@@ -1454,6 +1468,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1448,6 +1462,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
- (NSNumber*)insertionPointLineNumber {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -1476,6 +1492,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1470,6 +1486,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
caretPosition->AsTextPosition()->text_offset());
|
||||
return @(std::distance(lineBreaks.begin(), iterator));
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
// Returns whether or not this node should be ignored in the
|
||||
// accessibility tree.
|
||||
@@ -2153,6 +2170,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2146,6 +2163,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
- (NSString*)selectedText {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2164,11 +2182,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2157,11 +2175,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
return base::SysUTF16ToNSString(range.GetText());
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
- (NSValue*)selectedTextRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2189,12 +2209,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2182,12 +2202,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
int selLength = range.GetText().length();
|
||||
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
- (NSValue*)size {
|
||||
if (![self instanceActive])
|
||||
@@ -2227,6 +2250,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2220,6 +2243,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
// Returns a text marker that points to the first character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)startTextMarker {
|
||||
@@ -2237,6 +2261,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2230,6 +2254,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
// Returns a subrole based upon the role.
|
||||
- (NSString*)subrole {
|
||||
@@ -2562,11 +2587,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2552,11 +2577,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
NSMutableAttributedString* attributedInnerText =
|
||||
[[[NSMutableAttributedString alloc]
|
||||
initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
|
||||
|
@ -225,7 +225,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
return [attributedInnerText attributedSubstringFromRange:range];
|
||||
}
|
||||
@@ -2670,9 +2697,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2660,9 +2687,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return ToBrowserAccessibilityCocoa(cell);
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
BrowserAccessibilityPositionInstance position =
|
||||
CreatePositionFromTextMarker(parameter);
|
||||
if (!position->IsNullPosition())
|
||||
@@ -2985,6 +3011,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2975,6 +3001,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
|
||||
return CreateTextMarker(root->CreatePositionAt(index));
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
|
||||
if ([attribute isEqualToString:
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
||||
@@ -3020,6 +3047,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -3010,6 +3037,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
if ([attribute
|
||||
isEqualToString:
|
||||
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
||||
@@ -3134,6 +3162,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -3124,6 +3152,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
|
||||
return @(child->GetIndexInParent());
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ index 571c2519cce1c794aff380670d9d3eed1e341d96..e181d190006b2779a4c7f3271663c484
|
|||
return nil;
|
||||
}
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
index 9a9f6dea91cecc081010f4fd6c166921b7115a6e..c049bca40fb3b428361567b8ce3613ab7f347d67 100644
|
||||
index 07645b4165bedc04eb83f7e736ab1254e5b2901d..f69c39341af7ef87f2c6aab8954b748ff9d3ec0e 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
@@ -526,6 +526,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
|
||||
|
@ -282,7 +282,7 @@ index 9a9f6dea91cecc081010f4fd6c166921b7115a6e..c049bca40fb3b428361567b8ce3613ab
|
|||
}
|
||||
|
||||
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bfd097a9e9 100644
|
||||
index 28ca1646af0b0cce40d27baec71cbe65adc334fa..bae65c1f485bc02eb9ef2ebf7018af4a5a492397 100644
|
||||
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
@@ -10,9 +10,11 @@
|
||||
|
@ -314,7 +314,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
|
|||
|
||||
} // namespace
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e03abf1e05 100644
|
||||
index 0b2c4e6d169b08d82d2359576a29e2f7d2b09dcf..7b5fbbae1f9b2ade0c07360bd3fecda129a0c95b 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -35,6 +35,7 @@
|
||||
|
@ -333,7 +333,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
|
|||
|
||||
namespace {
|
||||
|
||||
@@ -120,8 +122,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
|
||||
@@ -117,8 +119,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
|
||||
controller_state_function_(
|
||||
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
||||
base::Unretained(this))),
|
||||
|
@ -344,7 +344,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
|
|||
should_update_name_(true),
|
||||
classic_discovery_manager_(
|
||||
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
||||
@@ -306,8 +310,12 @@ base::WeakPtr<BluetoothAdapter> BluetoothAdapterMac::GetWeakPtr() {
|
||||
@@ -303,8 +307,12 @@ base::WeakPtr<BluetoothAdapter> BluetoothAdapterMac::GetWeakPtr() {
|
||||
}
|
||||
|
||||
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
||||
|
@ -375,7 +375,7 @@ index 5acdb011a1f232569b43ba2f08a21f44b3c40151..9fca5b2e8c714308a404750cc9fc64dc
|
|||
"AudioToolbox.framework",
|
||||
"AudioUnit.framework",
|
||||
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
|
||||
index 26436b47942b14e419adb5780c45a9d42224d39f..215abac9672f72aeef7694e97ff260ae7546d061 100644
|
||||
index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022eca52d258 100644
|
||||
--- a/media/audio/mac/audio_manager_mac.cc
|
||||
+++ b/media/audio/mac/audio_manager_mac.cc
|
||||
@@ -882,7 +882,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
|
||||
|
@ -444,18 +444,18 @@ index e0c31170acd13c9997c6b1d04c6de1420feaf422..0e561f97b33380bfbe52e64c2c4a6988
|
|||
|
||||
} // namespace sandbox
|
||||
diff --git a/sandbox/mac/seatbelt_extension.cc b/sandbox/mac/seatbelt_extension.cc
|
||||
index 9073364142e8f98c8872d9b5509f92f433e06624..2356add74dfae98299a4e2b207aa26fc109f47f3 100644
|
||||
index 84c7370a3bb98aa29cdc04730a25148c3adc162a..5175c2c210e13e41224ae7268528c595c35cc4dc 100644
|
||||
--- a/sandbox/mac/seatbelt_extension.cc
|
||||
+++ b/sandbox/mac/seatbelt_extension.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/notreached.h"
|
||||
#include "sandbox/mac/seatbelt_extension_token.h"
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
// libsandbox private API.
|
||||
extern "C" {
|
||||
extern const char* APP_SANDBOX_READ;
|
||||
@@ -18,6 +19,7 @@ char* sandbox_extension_issue_file(const char* type,
|
||||
@@ -21,6 +22,7 @@ char* sandbox_extension_issue_file(const char* type,
|
||||
const char* path,
|
||||
uint32_t flags);
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ index 9073364142e8f98c8872d9b5509f92f433e06624..2356add74dfae98299a4e2b207aa26fc
|
|||
|
||||
namespace sandbox {
|
||||
|
||||
@@ -46,7 +48,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
|
||||
@@ -49,7 +51,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
|
||||
|
||||
bool SeatbeltExtension::Consume() {
|
||||
DCHECK(!token_.empty());
|
||||
|
@ -475,7 +475,7 @@ index 9073364142e8f98c8872d9b5509f92f433e06624..2356add74dfae98299a4e2b207aa26fc
|
|||
return handle_ > 0;
|
||||
}
|
||||
|
||||
@@ -58,7 +64,11 @@ bool SeatbeltExtension::ConsumePermanently() {
|
||||
@@ -61,7 +67,11 @@ bool SeatbeltExtension::ConsumePermanently() {
|
||||
}
|
||||
|
||||
bool SeatbeltExtension::Revoke() {
|
||||
|
@ -487,7 +487,7 @@ index 9073364142e8f98c8872d9b5509f92f433e06624..2356add74dfae98299a4e2b207aa26fc
|
|||
handle_ = 0;
|
||||
token_.clear();
|
||||
return rv == 0;
|
||||
@@ -76,9 +86,11 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
|
||||
@@ -79,9 +89,11 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
|
||||
char* SeatbeltExtension::IssueToken(SeatbeltExtension::Type type,
|
||||
const std::string& resource) {
|
||||
switch (type) {
|
||||
|
|
|
@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
|
|||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index dbf366ff78e1f4b2828ae3ccd8c0a08345942736..b7c83cceb2297eddcb345e75a95b7744b08d2e6b 100644
|
||||
index 2c3f75ea4ad177a63d64081f5d8028b60771edb8..e62538f061cccddea14759ea5d92f14b539992fc 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -106,6 +106,11 @@
|
||||
@@ -111,6 +111,11 @@
|
||||
#include "services/network/url_loader.h"
|
||||
#include "services/network/url_request_context_builder_mojo.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@ index dbf366ff78e1f4b2828ae3ccd8c0a08345942736..b7c83cceb2297eddcb345e75a95b7744
|
|||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
|
||||
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
|
||||
@@ -356,6 +361,79 @@ bool UsingBuiltinCertVerifier(
|
||||
@@ -322,6 +327,79 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -102,7 +102,7 @@ index dbf366ff78e1f4b2828ae3ccd8c0a08345942736..b7c83cceb2297eddcb345e75a95b7744
|
|||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -524,6 +602,13 @@ void NetworkContext::SetClient(
|
||||
@@ -496,6 +574,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
|
@ -116,34 +116,51 @@ index dbf366ff78e1f4b2828ae3ccd8c0a08345942736..b7c83cceb2297eddcb345e75a95b7744
|
|||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -1714,6 +1799,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
@@ -1680,8 +1765,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
|
||||
std::unique_ptr<net::CertVerifier> cert_verifier;
|
||||
+ std::unique_ptr<net::CertVerifier> temp_verifier;
|
||||
if (g_cert_verifier_for_testing) {
|
||||
cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
|
||||
- cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
|
||||
+ temp_verifier = std::make_unique<WrappedTestingCertVerifier>();
|
||||
} else {
|
||||
@@ -1762,8 +1848,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
}
|
||||
#endif
|
||||
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
|
||||
- if (!cert_verifier) {
|
||||
- cert_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
+ if (!temp_verifier) {
|
||||
+ temp_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
std::make_unique<net::CoalescingCertVerifier>(
|
||||
std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier)
|
||||
@@ -1773,12 +1859,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
cert_net_fetcher_))));
|
||||
}
|
||||
#endif
|
||||
- if (!cert_verifier)
|
||||
- cert_verifier = net::CertVerifier::CreateDefault(cert_net_fetcher_);
|
||||
mojom::CertVerifierCreationParams* creation_params = nullptr;
|
||||
if (params_->cert_verifier_creation_params)
|
||||
@@ -1690,13 +1776,13 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
if (IsUsingCertNetFetcher())
|
||||
cert_net_fetcher_ = base::MakeRefCounted<net::CertNetFetcherURLRequest>();
|
||||
|
||||
- cert_verifier = CreateCertVerifier(creation_params, cert_net_fetcher_);
|
||||
+ temp_verifier = CreateCertVerifier(creation_params, cert_net_fetcher_);
|
||||
|
||||
// Wrap the cert verifier in caching and coalescing layers to avoid extra
|
||||
// verifications.
|
||||
- cert_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
+ temp_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
std::make_unique<net::CoalescingCertVerifier>(
|
||||
- std::move(cert_verifier)));
|
||||
+ std::move(temp_verifier)));
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
cert_verifier_with_trust_anchors_ =
|
||||
@@ -1705,13 +1791,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
|
||||
UpdateAdditionalCertificates(
|
||||
std::move(params_->initial_additional_certificates));
|
||||
cert_verifier_with_trust_anchors_->InitializeOnIOThread(
|
||||
- std::move(cert_verifier));
|
||||
- cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
+ std::move(temp_verifier));
|
||||
+ temp_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
+ if (!temp_verifier) {
|
||||
+#if !defined(OS_LINUX)
|
||||
+ temp_verifier = std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
+ net::CertVerifyProc::CreateSystemVerifyProc(std::move(cert_net_fetcher_)));
|
||||
+#else
|
||||
+ temp_verifier = std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
+ net::CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher_)));
|
||||
+#endif
|
||||
+ }
|
||||
+ auto remote_cert_verifier = std::make_unique<RemoteCertVerifier>(std::move(temp_verifier));
|
||||
+ remote_cert_verifier_ = remote_cert_verifier.get();
|
||||
|
@ -160,10 +177,10 @@ index dbf366ff78e1f4b2828ae3ccd8c0a08345942736..b7c83cceb2297eddcb345e75a95b7744
|
|||
std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
|
||||
std::make_unique<NetworkServiceNetworkDelegate>(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index dc36e4eb72889ca9810a057e4d746399e1845b7f..cff8a36b7703df31d0823efb2549f57d7c6c6907 100644
|
||||
index 5b26275cffb8155841498f22b994970e05997af2..0b35920f4dbaf8fbaf8245c9ae976459c6baa7b8 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
|
||||
@@ -86,6 +86,7 @@ class DomainReliabilityMonitor;
|
||||
|
||||
namespace network {
|
||||
class CertVerifierWithTrustAnchors;
|
||||
|
@ -171,7 +188,7 @@ index dc36e4eb72889ca9810a057e4d746399e1845b7f..cff8a36b7703df31d0823efb2549f57d
|
|||
class CookieManager;
|
||||
class ExpectCTReporter;
|
||||
class HostResolver;
|
||||
@@ -187,6 +188,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -189,6 +190,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
|
@ -180,7 +197,7 @@ index dc36e4eb72889ca9810a057e4d746399e1845b7f..cff8a36b7703df31d0823efb2549f57d
|
|||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -657,6 +660,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -650,6 +653,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
|
||||
#endif
|
||||
|
||||
|
@ -190,11 +207,11 @@ index dc36e4eb72889ca9810a057e4d746399e1845b7f..cff8a36b7703df31d0823efb2549f57d
|
|||
// CertNetFetcher is not used by the current platform.
|
||||
scoped_refptr<net::CertNetFetcherURLRequest> cert_net_fetcher_;
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 2774beb622cb44057cb45c07dd917d99bb6fc54f..e834a5f9a4b6c698ad20e3b9cdc99e871e4035df 100644
|
||||
index 4fc3dc0a66e975da82f8c5186378443569b01c13..2b2033797906f36fa829008c65e3b66b6e06eaa2 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -161,6 +161,17 @@ struct HttpAuthStaticNetworkContextParams {
|
||||
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
|
||||
@@ -198,6 +198,17 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
+interface CertVerifierClient {
|
||||
|
@ -211,7 +228,7 @@ index 2774beb622cb44057cb45c07dd917d99bb6fc54f..e834a5f9a4b6c698ad20e3b9cdc99e87
|
|||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -831,6 +842,9 @@ interface NetworkContext {
|
||||
@@ -855,6 +866,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ Do not check for unique origin in CacheStorage, in Electron we may have
|
|||
scripts running without an origin.
|
||||
|
||||
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
index 0abdf04f5fa016d7ee8241eab60375944fe8fe62..95f62ba41bd28c08364c5f13927bc90c4567f88b 100644
|
||||
index 5b63f7eeb757b0aa3f5fdff58e251be296b7ec57..e76dab5e4a5860edb33883351a8151cea2158598 100644
|
||||
--- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
@@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
@@ -106,7 +106,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
cache_storage_(cache_storage),
|
||||
origin_(origin),
|
||||
owner_(owner) {
|
||||
|
|
|
@ -7,7 +7,7 @@ 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
|
||||
index 659149f4c5dea45bead88d26369d8aeb9462b729..7105781e0019b456f287fd0ebb6e309efe2cecad 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl.cc
|
||||
@@ -88,9 +88,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
|
||||
|
@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
|
|||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 4c88b83382bfe08e91ceb981392e72cbc8cbd80b..9beff8728eba07fe5bbb50701dcec78d61149fde 100644
|
||||
index 09252dcdf267aad57653a23def406653265eee13..64e781e055df605a2e205106eaed8264ebd3f4b8 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2110,7 +2110,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2125,7 +2125,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
|
|
@ -10,8 +10,35 @@ 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.cc b/chrome/browser/printing/print_job.cc
|
||||
index d23770fb402a1989027db54397fba80ceff9a296..61de329e09a08a9253eff554f6759fbef8214520 100644
|
||||
--- a/chrome/browser/printing/print_job.cc
|
||||
+++ b/chrome/browser/printing/print_job.cc
|
||||
@@ -57,7 +57,7 @@ enum class PrintRasterizationMode {
|
||||
kMaxValue = kFast,
|
||||
};
|
||||
|
||||
-bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
+ALLOW_UNUSED_TYPE bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
// Managed preference takes precedence over user preference and field trials.
|
||||
if (prefs->IsManagedPreference(prefs::kPrintRasterizationMode)) {
|
||||
int value = prefs->GetInteger(prefs::kPrintRasterizationMode);
|
||||
@@ -350,10 +350,13 @@ void PrintJob::StartPdfToEmfConversion(
|
||||
settings.print_text_with_gdi() && !settings.printer_is_xps() &&
|
||||
base::FeatureList::IsEnabled(::features::kGdiTextPrinting);
|
||||
|
||||
+ #if 0
|
||||
Profile* profile = Profile::FromBrowserContext(
|
||||
worker_->GetWebContents()->GetBrowserContext());
|
||||
bool print_with_reduced_rasterization =
|
||||
PrintWithReducedRasterization(profile->GetPrefs());
|
||||
+ #endif
|
||||
+ bool print_with_reduced_rasterization = base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization);
|
||||
|
||||
using RenderMode = PdfRenderSettings::Mode;
|
||||
RenderMode mode;
|
||||
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
||||
index 65065b781a0ae6e70c59d7c31d1410b4457fca49..04a13092de8e18f6a960f7b46be217bb4af34301 100644
|
||||
index 9122bbf4f15c46eefd5269946659b5886156348a..211ca535d4572f11de7256c108aa84a160169557 100644
|
||||
--- a/chrome/browser/printing/print_job_worker.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker.cc
|
||||
@@ -21,7 +21,6 @@
|
||||
|
@ -70,10 +97,10 @@ index 65065b781a0ae6e70c59d7c31d1410b4457fca49..04a13092de8e18f6a960f7b46be217bb
|
|||
}
|
||||
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9aed9f561 100644
|
||||
index 5531a6e8cbc83cff104f70d4da3576f5af03209c..0d70e8132669aae179738086a7989bd60c0c28ee 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -27,10 +27,7 @@
|
||||
@@ -28,10 +28,7 @@
|
||||
#include "chrome/browser/printing/print_view_manager_common.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
|
@ -81,10 +108,10 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
-#include "chrome/browser/ui/webui/print_preview/printer_handler.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/printing/browser/print_composite_client.h"
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
@@ -45,6 +42,7 @@
|
||||
@@ -47,6 +44,7 @@
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
@ -92,7 +119,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/metafile_skia.h"
|
||||
@@ -68,6 +66,8 @@ using PrintSettingsCallback =
|
||||
@@ -70,6 +68,8 @@ using PrintSettingsCallback =
|
||||
base::OnceCallback<void(std::unique_ptr<PrinterQuery>)>;
|
||||
|
||||
void ShowWarningMessageBox(const base::string16& message) {
|
||||
|
@ -101,7 +128,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
// Runs always on the UI thread.
|
||||
static bool is_dialog_shown = false;
|
||||
if (is_dialog_shown)
|
||||
@@ -76,6 +76,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
@@ -78,6 +78,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
|
||||
|
||||
chrome::ShowWarningMessageBox(nullptr, base::string16(), message);
|
||||
|
@ -109,7 +136,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -114,12 +115,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -116,12 +117,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
printing_succeeded_(false),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
|
@ -124,7 +151,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -127,7 +130,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -129,7 +132,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
|
@ -135,8 +162,8 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
+ CompletionCallback callback) {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
|
||||
// Don't print / print preview interstitials or crashed tabs.
|
||||
@@ -135,7 +141,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
// Don't print / print preview crashed tabs.
|
||||
@@ -137,7 +143,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
return false;
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
|
@ -152,7 +179,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -256,9 +269,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
@@ -258,9 +271,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
// The Unretained() is safe because ForEachFrame() is synchronous.
|
||||
|
@ -165,7 +192,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -361,7 +374,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
|
||||
@@ -363,7 +376,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
|
||||
PrintManager::OnPrintingFailed(cookie);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
@ -174,7 +201,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -461,9 +474,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
@@ -463,9 +476,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
content::NotificationService::NoDetails());
|
||||
break;
|
||||
}
|
||||
|
@ -190,7 +217,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
@@ -558,8 +575,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -560,8 +577,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
DCHECK(!quit_inner_loop_);
|
||||
DCHECK(query);
|
||||
|
||||
|
@ -203,16 +230,16 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents()->GetRenderViewHost() ||
|
||||
@@ -574,8 +593,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
print_job_->SetSource(PrintJob::Source::PRINT_PREVIEW, /*source_id=*/"");
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
@@ -582,8 +601,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
print_job_->SetSource(source, /*source_id=*/"");
|
||||
#endif
|
||||
|
||||
- registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
- content::Source<PrintJob>(print_job_.get()));
|
||||
printing_succeeded_ = false;
|
||||
return true;
|
||||
}
|
||||
@@ -624,14 +641,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -632,14 +649,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
content::RenderFrameHost* rfh = printing_rfh_;
|
||||
printing_rfh_ = nullptr;
|
||||
|
||||
|
@ -237,7 +264,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
// Don't close the worker thread.
|
||||
print_job_ = nullptr;
|
||||
}
|
||||
@@ -667,7 +692,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -675,7 +700,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -247,7 +274,7 @@ index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9
|
|||
|
||||
if (!cookie) {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 3d434244927aca5e5dbec8d7c1cd212c5c260c71..9d62c903bf08fa8cfa8c425d430c5e995a04f7fc 100644
|
||||
index 94b65e85561e1440b60086b668865bda07303d35..7044463d163fd74e55ff1a042c36739fdeff3689 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;
|
||||
|
@ -271,7 +298,7 @@ index 3d434244927aca5e5dbec8d7c1cd212c5c260c71..9d62c903bf08fa8cfa8c425d430c5e99
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in |print_data| with settings specified in
|
||||
@@ -206,9 +211,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -205,9 +210,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
content::RenderFrameHost* printing_rfh_;
|
||||
|
||||
|
@ -288,7 +315,7 @@ index 3d434244927aca5e5dbec8d7c1cd212c5c260c71..9d62c903bf08fa8cfa8c425d430c5e99
|
|||
// 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 d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8f44757e3 100644
|
||||
index 86ee19d5926df13cea1c8bb9bbe223061b8d7a79..7177042770391880b235a1e25ec75567229d3115 100644
|
||||
--- a/chrome/browser/printing/printing_message_filter.cc
|
||||
+++ b/chrome/browser/printing/printing_message_filter.cc
|
||||
@@ -22,6 +22,7 @@
|
||||
|
@ -326,7 +353,7 @@ index d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8
|
|||
}
|
||||
|
||||
PrintingMessageFilter::~PrintingMessageFilter() {
|
||||
@@ -138,11 +142,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -135,11 +139,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||
|
||||
void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
|
@ -340,7 +367,7 @@ index d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8
|
|||
std::unique_ptr<PrinterQuery> printer_query = queue_->PopPrinterQuery(0);
|
||||
if (!printer_query) {
|
||||
printer_query =
|
||||
@@ -228,12 +234,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||
@@ -225,12 +231,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||
void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
|
||||
base::Value job_settings,
|
||||
IPC::Message* reply_msg) {
|
||||
|
@ -355,7 +382,7 @@ index d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8
|
|||
if (!job_settings.is_dict() ||
|
||||
!job_settings.FindIntKey(kSettingPrinterType)) {
|
||||
// Reply with null query.
|
||||
@@ -266,7 +273,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
@@ -263,7 +270,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_PrintPages_Params params;
|
||||
|
@ -366,20 +393,11 @@ index d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8
|
|||
params.Reset();
|
||||
} else {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params);
|
||||
@@ -304,7 +313,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids,
|
||||
bool* cancel) {
|
||||
- *cancel = PrintPreviewUI::ShouldCancelRequest(ids);
|
||||
+ *cancel = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h
|
||||
index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6305088d5 100644
|
||||
index 49296adb525eeb511d4aad5f25ff1196f9f1333e..2d705bb98f47e79f0922af9675c42800aadc0206 100644
|
||||
--- a/chrome/browser/printing/printing_message_filter.h
|
||||
+++ b/chrome/browser/printing/printing_message_filter.h
|
||||
@@ -24,6 +24,10 @@ struct PrintHostMsg_ScriptedPrint_Params;
|
||||
@@ -23,6 +23,10 @@ struct PrintHostMsg_ScriptedPrint_Params;
|
||||
struct PrintMsg_Print_Params;
|
||||
class Profile;
|
||||
|
||||
|
@ -390,7 +408,7 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
|
|||
namespace printing {
|
||||
|
||||
class PrintQueriesQueue;
|
||||
@@ -44,7 +48,8 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
@@ -43,7 +47,8 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
|
||||
static void SetDelegateForTesting(TestDelegate* delegate);
|
||||
|
||||
|
@ -401,10 +419,10 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
|
|||
// content::BrowserMessageFilter:
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852fc545c7a6 100644
|
||||
index 912652847ab45c811400dbee81bc5161d5865c56..5fb26c8952117c5110707b1c6b45158090b37ded 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -35,7 +35,7 @@ interface PrintRenderer {
|
||||
@@ -93,7 +93,7 @@ interface PrintPreviewUI {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
|
@ -414,18 +432,18 @@ index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852f
|
|||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page using the print preview document's frame/node, and then
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5941d9b42 100644
|
||||
index ccd164ad24e4c401be746c0ac9716d1d259c0a85..1db0c6cad6cc27b3a548b78d701d2ada7023dad1 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "printing/metafile_skia.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/printing_features.h"
|
||||
+#include "printing/print_settings.h"
|
||||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
|
||||
@@ -1160,7 +1161,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
#include "third_party/blink/public/common/css/page_orientation.h"
|
||||
@@ -1174,7 +1175,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
web_frame->DispatchBeforePrintEvent();
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
@ -435,7 +453,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
if (weak_this)
|
||||
web_frame->DispatchAfterPrintEvent();
|
||||
}
|
||||
@@ -1181,7 +1183,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1195,7 +1197,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
|
@ -444,7 +462,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1195,7 +1197,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1209,7 +1211,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// If we are printing a PDF extension frame, find the plugin node and print
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
@ -453,7 +471,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1212,7 +1214,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1226,7 +1228,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
return;
|
||||
}
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
|
@ -462,7 +480,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1252,6 +1254,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
@@ -1274,6 +1276,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
|
||||
|
@ -471,7 +489,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
base::UmaHistogramEnumeration(print_preview_context_.IsForArc()
|
||||
@@ -1755,7 +1759,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1785,7 +1789,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
|
@ -482,7 +500,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -1766,7 +1772,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1796,7 +1802,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -493,7 +511,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -1774,7 +1782,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1804,7 +1812,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
int expected_page_count = 0;
|
||||
|
@ -502,7 +520,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -1794,8 +1802,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1824,8 +1832,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
|
||||
PrintMsg_PrintPages_Params print_settings;
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -516,7 +534,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2030,10 +2041,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2061,10 +2072,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
|
||||
}
|
||||
|
||||
|
@ -543,7 +561,7 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
// 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.
|
||||
@@ -2053,12 +2077,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
@@ -2084,12 +2108,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -563,10 +581,10 @@ index 1b995b1d7bbb972ce66e351a3bfef2fdae0ad25d..5d829b6ef0c02d0f230c9581377fe3b5
|
|||
Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
|
||||
return false;
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7dec1dc3b 100644
|
||||
index 85b7989513d014c2dea2b649248c85c912109904..a0d1b786dd21afd5047e84bf323171adef912835 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -226,7 +226,7 @@ class PrintRenderFrameHelper
|
||||
@@ -225,7 +225,7 @@ class PrintRenderFrameHelper
|
||||
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
|
||||
|
||||
// printing::mojom::PrintRenderFrame:
|
||||
|
@ -574,8 +592,8 @@ index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7
|
|||
+ void PrintRequestedPages(bool silent, base::Value settings) override;
|
||||
void PrintForSystemDialog() override;
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
void InitiatePrintPreview(
|
||||
@@ -290,7 +290,9 @@ class PrintRenderFrameHelper
|
||||
void SetPrintPreviewUI(
|
||||
@@ -291,7 +291,9 @@ class PrintRenderFrameHelper
|
||||
// WARNING: |this| may be gone after this method returns.
|
||||
void Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -586,7 +604,7 @@ index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7
|
|||
|
||||
// Notification when printing is done - signal tear-down/free resources.
|
||||
void DidFinishPrinting(PrintingResult result);
|
||||
@@ -299,12 +301,14 @@ class PrintRenderFrameHelper
|
||||
@@ -300,12 +302,14 @@ class PrintRenderFrameHelper
|
||||
|
||||
// Initialize print page settings with default settings.
|
||||
// Used only for native printing workflow.
|
||||
|
@ -604,10 +622,10 @@ index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7
|
|||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
|
||||
index a85f6812f010193a676494d297a21726611e2d35..d40df922111c0ecfc9a1ceebc3bad9f0c067bd1b 100644
|
||||
index ad26397af46f024a81902949e1c7d627922ff492..e23abbac0014eac5fa0042111b920a1dec4723f8 100644
|
||||
--- a/printing/printing_context.cc
|
||||
+++ b/printing/printing_context.cc
|
||||
@@ -92,8 +92,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
|
||||
@@ -94,8 +94,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
|
||||
|
||||
PrintingContext::Result PrintingContext::UpdatePrintSettings(
|
||||
base::Value job_settings) {
|
||||
|
|
|
@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
|||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc
|
||||
index 2840d54ef157f962a21ae6c2a32f07bbe4db250a..3061e1ad6dea4a75e4cee889a4015a39500ec5d9 100644
|
||||
index e4b9c5e52d6f8408f8ab5ab7c4f8b28466e04626..9c32aaaa0d88a692632a2e888250c6fd04a46fef 100644
|
||||
--- a/ui/gtk/native_theme_gtk.cc
|
||||
+++ b/ui/gtk/native_theme_gtk.cc
|
||||
@@ -353,6 +353,29 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
|
@ -42,10 +42,10 @@ index 2840d54ef157f962a21ae6c2a32f07bbe4db250a..3061e1ad6dea4a75e4cee889a4015a39
|
|||
// 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 670f290aca43887460a4e8cfb5e2c805d78a6d8b..f564f13aac6dbd5881a351a7aaa5a02314c826a7 100644
|
||||
index 5820f4ab68ba5effc867215bdecb23d2bc9396b3..5909a5c74394564a9ff2241242f05867f853eb06 100644
|
||||
--- a/ui/native_theme/common_theme.cc
|
||||
+++ b/ui/native_theme/common_theme.cc
|
||||
@@ -43,7 +43,8 @@ base::Optional<SkColor> GetHighContrastColor(
|
||||
@@ -63,7 +63,8 @@ base::Optional<SkColor> GetHighContrastColor(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ index 670f290aca43887460a4e8cfb5e2c805d78a6d8b..f564f13aac6dbd5881a351a7aaa5a023
|
|||
switch (color_id) {
|
||||
// Dialogs
|
||||
case NativeTheme::kColorId_WindowBackground:
|
||||
@@ -58,6 +59,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
|
||||
@@ -78,6 +79,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
|
||||
case NativeTheme::kColorId_BubbleFooterBackground:
|
||||
return SkColorSetRGB(0x32, 0x36, 0x39);
|
||||
|
||||
|
@ -70,7 +70,7 @@ index 670f290aca43887460a4e8cfb5e2c805d78a6d8b..f564f13aac6dbd5881a351a7aaa5a023
|
|||
// FocusableBorder
|
||||
case NativeTheme::kColorId_FocusedBorderColor:
|
||||
return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
|
||||
@@ -506,6 +515,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
|
||||
@@ -551,6 +560,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
|
||||
case NativeTheme::kColorId_UnfocusedBorderColor:
|
||||
return gfx::kGoogleGrey300;
|
||||
|
||||
|
@ -89,7 +89,7 @@ index 670f290aca43887460a4e8cfb5e2c805d78a6d8b..f564f13aac6dbd5881a351a7aaa5a023
|
|||
// Material spinner/throbber
|
||||
case NativeTheme::kColorId_ThrobberSpinningColor:
|
||||
return gfx::kGoogleBlue600;
|
||||
@@ -572,7 +593,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
|
||||
@@ -650,7 +671,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
|
||||
}
|
||||
|
||||
if (color_scheme == NativeTheme::ColorScheme::kDark) {
|
||||
|
@ -99,10 +99,10 @@ index 670f290aca43887460a4e8cfb5e2c805d78a6d8b..f564f13aac6dbd5881a351a7aaa5a023
|
|||
return color.value();
|
||||
}
|
||||
diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h
|
||||
index 0e729134b4bdfbba9e688794ff83d0273f70ce75..65c7b9c09bf974ef9721e37ad8d2e1cabbf287ad 100644
|
||||
index 9b3d8039bc2dcded1fcf54327028e4335732026d..0bd3f08d3023f4cb219e9baae59823dfefed9d7e 100644
|
||||
--- a/ui/native_theme/native_theme_color_id.h
|
||||
+++ b/ui/native_theme/native_theme_color_id.h
|
||||
@@ -134,6 +134,11 @@
|
||||
@@ -141,6 +141,11 @@
|
||||
OP(kColorId_TableHeaderText), \
|
||||
OP(kColorId_TableHeaderBackground), \
|
||||
OP(kColorId_TableHeaderSeparator), \
|
||||
|
@ -115,10 +115,10 @@ index 0e729134b4bdfbba9e688794ff83d0273f70ce75..65c7b9c09bf974ef9721e37ad8d2e1ca
|
|||
OP(kColorId_ThrobberSpinningColor), \
|
||||
OP(kColorId_ThrobberWaitingColor), \
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 536b2266508b9843756eccd6c96b0b07fc1392df..f94a3ed2098d5f32ea0eb881be28d7a589b359a5 100644
|
||||
index 8cc9cdc5eab4ebab20fee78318d38b365e8408e9..54730260ccb2ca56fd3fa26db631821de0e7d796 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -644,6 +644,18 @@ base::Optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
|
||||
@@ -646,6 +646,18 @@ base::Optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
|
||||
case kColorId_ThrobberWaitingColor:
|
||||
return system_colors_[SystemThemeColor::kGrayText];
|
||||
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Locascio <andy@slack-corp.com>
|
||||
Date: Wed, 13 May 2020 14:54:39 -0700
|
||||
Subject: refactor: expose cursor changes to the WebContentsObserver
|
||||
|
||||
Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `cursor-changed`.
|
||||
|
||||
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
index 2edad62668474c690adb283224400dc4e7163fbf..1c7928e66955e188f70d4f1c475f2ad33db80cb0 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "components/viz/common/vertical_scroll_direction.h"
|
||||
#include "content/browser/renderer_host/input_event_shim.h"
|
||||
#include "content/common/content_export.h"
|
||||
+#include "content/common/cursors/webcursor.h"
|
||||
#include "content/common/drag_event_source_info.h"
|
||||
#include "content/public/common/drop_data.h"
|
||||
#include "services/metrics/public/cpp/ukm_recorder.h"
|
||||
@@ -281,6 +282,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
|
||||
// Allow the delegate to handle the cursor update. Returns true if handled.
|
||||
virtual bool OnUpdateDragCursor();
|
||||
|
||||
+ // Notify the delegate of the RenderWidget's changing cursor.
|
||||
+ virtual void OnCursorChanged(const WebCursor& cursor) {}
|
||||
+
|
||||
// Returns true if the provided RenderWidgetHostImpl matches the current
|
||||
// RenderWidgetHost on the main frame, and false otherwise.
|
||||
virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 77526d78e8113f7071fe269cbcdf63bb772db6e4..933377708dd4ef1793863fb042fd74c0aaef3f4c 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1599,6 +1599,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) {
|
||||
if (!view_)
|
||||
return;
|
||||
view_->UpdateCursor(cursor);
|
||||
+ if (delegate_)
|
||||
+ delegate_->OnCursorChanged(cursor);
|
||||
}
|
||||
|
||||
void RenderWidgetHostImpl::OnCursorVisibilityStateChanged(bool is_visible) {
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 402450783e76fedd1264d6d7f47352dd233be621..bf744d187a84df4c3ea93ec16ef2cc1ef5013d92 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3454,6 +3454,11 @@ bool WebContentsImpl::OnUpdateDragCursor() {
|
||||
browser_plugin_embedder_->OnUpdateDragCursor();
|
||||
}
|
||||
|
||||
+void WebContentsImpl::OnCursorChanged(const WebCursor& cursor) {
|
||||
+ for (auto& observer : observers_)
|
||||
+ observer.OnCursorChanged(cursor);
|
||||
+}
|
||||
+
|
||||
bool WebContentsImpl::IsWidgetForMainFrame(
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 71ddac828df2e3df42214aee30d8b0fa866938fe..acae46fdac0d8dc2a26c72595b6e4b49dc21106a 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -912,6 +912,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
bool OnUpdateDragCursor() override;
|
||||
+ void OnCursorChanged(const WebCursor& cursor) override;
|
||||
bool IsWidgetForMainFrame(RenderWidgetHostImpl* render_widget_host) override;
|
||||
bool AddDomainInfoToRapporSample(rappor::Sample* sample) override;
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index d84c9abf8e8e46606a23d5e66ce740afeac01179..111d867f8a9076cf32e09d357dce9ff9aa1cadc2 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "components/viz/common/vertical_scroll_direction.h"
|
||||
#include "content/common/content_export.h"
|
||||
+#include "content/common/cursors/webcursor.h"
|
||||
#include "content/public/browser/allow_service_worker_result.h"
|
||||
#include "content/public/browser/cookie_access_details.h"
|
||||
#include "content/public/browser/navigation_controller.h"
|
||||
@@ -354,6 +355,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
|
||||
// Invoked every time the WebContents changes visibility.
|
||||
virtual void OnVisibilityChanged(Visibility visibility) {}
|
||||
|
||||
+ // Invoked every time the RenderWidget's cursor changes.
|
||||
+ virtual void OnCursorChanged(const WebCursor& cursor) {}
|
||||
+
|
||||
// Invoked when the main frame changes size.
|
||||
virtual void MainFrameWasResized(bool width_changed) {}
|
||||
|
|
@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
|
|||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index f97342f99b9fb3d00761f6d4d27181a0f0edfdc7..a8c2ee219e16f4cd404f1e1d078416452a93e17a 100644
|
||||
index 403a8c870a59d9dd46d20aa51b5bf966d47ed162..5914d502c879d32023a2659fac754aa925752145 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -603,6 +603,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
@@ -608,6 +608,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ index f97342f99b9fb3d00761f6d4d27181a0f0edfdc7..a8c2ee219e16f4cd404f1e1d07841645
|
|||
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 30736d62881ba8e7515465b880556f6179077e96..d1bca5b1ac4a06bbc64ccef0d6310591da37908a 100644
|
||||
index 39f1c8d6ee464ba577d483308e73bc028c901d27..880ddb6b20c3ef19a537fd96511a096a7d29c606 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -23,9 +23,11 @@
|
||||
|
|
|
@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
|||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 9461c206fe9e7062d5b3f0af26d3afb7320aa7aa..4b3d0f92e0dfffda8e86e8eab0539425da2fbbad 100644
|
||||
index a629da6b5496964814ddf144a9cfa3f1c586ee4f..866b25da5977c4ebc4569abb1869329809ab16d3 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
|
||||
@@ -154,6 +154,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -225,6 +225,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 9461c206fe9e7062d5b3f0af26d3afb7320aa7aa..4b3d0f92e0dfffda8e86e8eab0539425
|
|||
// These are not documented, so use only after checking -respondsToSelector:.
|
||||
@interface NSApplication (UndocumentedSpeechMethods)
|
||||
- (void)speakString:(NSString*)string;
|
||||
@@ -573,6 +578,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -644,6 +649,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@ -35,7 +35,7 @@ index 9461c206fe9e7062d5b3f0af26d3afb7320aa7aa..4b3d0f92e0dfffda8e86e8eab0539425
|
|||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -983,6 +991,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -1069,6 +1077,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
eventType == NSKeyDown &&
|
||||
!(modifierFlags & NSCommandKeyMask);
|
||||
|
||||
|
@ -46,7 +46,7 @@ index 9461c206fe9e7062d5b3f0af26d3afb7320aa7aa..4b3d0f92e0dfffda8e86e8eab0539425
|
|||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1759,9 +1771,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -1845,9 +1857,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
|
@ -58,7 +58,7 @@ index 9461c206fe9e7062d5b3f0af26d3afb7320aa7aa..4b3d0f92e0dfffda8e86e8eab0539425
|
|||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1770,7 +1784,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
||||
@@ -1856,7 +1870,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
|
|
@ -52,10 +52,10 @@ Some alternatives to this patch:
|
|||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 5ce71dd7f2e469a08b2f698cfcd313b9e010289e..b310951256feb884df6b2a7f59cfd286f06b3d76 100644
|
||||
index d078afa65f08c847683897fba1952b098003f06b..268344419ba130700cf75fd8780678ad087a2970 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1372,7 +1372,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1423,7 +1423,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ index 5ce71dd7f2e469a08b2f698cfcd313b9e010289e..b310951256feb884df6b2a7f59cfd286
|
|||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1392,6 +1392,12 @@ if (!is_android) {
|
||||
@@ -1443,6 +1443,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,478 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Wed, 28 Aug 2019 14:00:54 -0700
|
||||
Subject: Revert "Cleanup: Remove Menu Subtitles/Sublabels"
|
||||
|
||||
This reverts commit 27a7b3648684204ccb16ede5cf3947579bd6c222.
|
||||
|
||||
diff --git a/chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc b/chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc
|
||||
index 7b4531d031e6ba365fc4db35e9b68658f00f79fd..a7ef23c0d6623136531696928778bd0801726aa0 100644
|
||||
--- a/chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc
|
||||
+++ b/chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc
|
||||
@@ -157,7 +157,7 @@ void MockRenderViewContextMenu::AppendSubMenuItems(ui::MenuModel* model) {
|
||||
sub_item.enabled = model->IsEnabledAt(i);
|
||||
sub_item.checked = model->IsItemCheckedAt(i);
|
||||
sub_item.hidden = false;
|
||||
- sub_item.title = model->GetLabelAt(i);
|
||||
+ sub_item.title = model->GetSublabelAt(i);
|
||||
items_.push_back(sub_item);
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/browser/status_icons/status_icon_menu_model.cc b/chrome/browser/status_icons/status_icon_menu_model.cc
|
||||
index bc3cb82154ab964d7ef28fdb90db17782eb74564..d4da1ad6447e0241433019e726edecc66ed76ad6 100644
|
||||
--- a/chrome/browser/status_icons/status_icon_menu_model.cc
|
||||
+++ b/chrome/browser/status_icons/status_icon_menu_model.cc
|
||||
@@ -20,6 +20,7 @@ struct StatusIconMenuModel::ItemState {
|
||||
bool is_dynamic;
|
||||
ui::Accelerator accelerator;
|
||||
base::string16 label;
|
||||
+ base::string16 sublabel;
|
||||
gfx::Image icon;
|
||||
};
|
||||
|
||||
@@ -61,6 +62,13 @@ void StatusIconMenuModel::ChangeLabelForCommandId(int command_id,
|
||||
NotifyMenuStateChanged();
|
||||
}
|
||||
|
||||
+void StatusIconMenuModel::ChangeSublabelForCommandId(
|
||||
+ int command_id, const base::string16& sublabel) {
|
||||
+ item_states_[command_id].is_dynamic = true;
|
||||
+ item_states_[command_id].sublabel = sublabel;
|
||||
+ NotifyMenuStateChanged();
|
||||
+}
|
||||
+
|
||||
void StatusIconMenuModel::ChangeIconForCommandId(
|
||||
int command_id, const gfx::Image& icon) {
|
||||
item_states_[command_id].is_dynamic = true;
|
||||
@@ -122,6 +130,14 @@ base::string16 StatusIconMenuModel::GetLabelForCommandId(int command_id) const {
|
||||
return base::string16();
|
||||
}
|
||||
|
||||
+base::string16 StatusIconMenuModel::GetSublabelForCommandId(
|
||||
+ int command_id) const {
|
||||
+ auto iter = item_states_.find(command_id);
|
||||
+ if (iter != item_states_.end())
|
||||
+ return iter->second.sublabel;
|
||||
+ return base::string16();
|
||||
+}
|
||||
+
|
||||
ui::ImageModel StatusIconMenuModel::GetIconForCommandId(int command_id) const {
|
||||
auto iter = item_states_.find(command_id);
|
||||
if (iter != item_states_.end() && !iter->second.icon.IsEmpty())
|
||||
diff --git a/chrome/browser/status_icons/status_icon_menu_model.h b/chrome/browser/status_icons/status_icon_menu_model.h
|
||||
index c69344ab9b4e1a4fb1293abf65a392d513099e4a..b6f90d0a6902848b18201d12b7441d874807eee9 100644
|
||||
--- a/chrome/browser/status_icons/status_icon_menu_model.h
|
||||
+++ b/chrome/browser/status_icons/status_icon_menu_model.h
|
||||
@@ -62,9 +62,11 @@ class StatusIconMenuModel
|
||||
|
||||
// Calling any of these "change" methods will mark the menu item as "dynamic"
|
||||
// (see menu_model.h:IsItemDynamicAt) which many platforms take as a cue to
|
||||
- // refresh the label and icon of the menu item each time the menu is
|
||||
+ // refresh the label, sublabel and icon of the menu item each time the menu is
|
||||
// shown.
|
||||
void ChangeLabelForCommandId(int command_id, const base::string16& label);
|
||||
+ void ChangeSublabelForCommandId(
|
||||
+ int command_id, const base::string16& sublabel);
|
||||
void ChangeIconForCommandId(int command_id, const gfx::Image& icon);
|
||||
|
||||
void AddObserver(Observer* observer);
|
||||
@@ -78,6 +80,7 @@ class StatusIconMenuModel
|
||||
ui::Accelerator* accelerator) const override;
|
||||
bool IsItemForCommandIdDynamic(int command_id) const override;
|
||||
base::string16 GetLabelForCommandId(int command_id) const override;
|
||||
+ base::string16 GetSublabelForCommandId(int command_id) const override;
|
||||
ui::ImageModel GetIconForCommandId(int command_id) const override;
|
||||
|
||||
protected:
|
||||
diff --git a/chrome/browser/status_icons/status_icon_menu_model_unittest.cc b/chrome/browser/status_icons/status_icon_menu_model_unittest.cc
|
||||
index 952714121ff7c5ffdcdb0d757450b53d926f2fc8..2c4de7bddc5d47ba4d0e528a98d4d1df65bc59f8 100644
|
||||
--- a/chrome/browser/status_icons/status_icon_menu_model_unittest.cc
|
||||
+++ b/chrome/browser/status_icons/status_icon_menu_model_unittest.cc
|
||||
@@ -86,6 +86,10 @@ TEST_F(StatusIconMenuModelTest, SetProperties) {
|
||||
menu_model()->ChangeLabelForCommandId(0, ASCIIToUTF16("label2"));
|
||||
EXPECT_EQ(ASCIIToUTF16("label2"), menu_model()->GetLabelForCommandId(0));
|
||||
|
||||
+ // Set the sublabel and icon image for the second menu item.
|
||||
+ menu_model()->ChangeSublabelForCommandId(1, ASCIIToUTF16("sublabel"));
|
||||
+ EXPECT_EQ(ASCIIToUTF16("sublabel"), menu_model()->GetSublabelForCommandId(1));
|
||||
+
|
||||
// Try setting icon image and changing it.
|
||||
menu_model()->ChangeIconForCommandId(1, test_image1);
|
||||
image_arg = menu_model()->GetIconForCommandId(1);
|
||||
@@ -96,8 +100,9 @@ TEST_F(StatusIconMenuModelTest, SetProperties) {
|
||||
// Ensure changes to one menu item does not affect the other menu item.
|
||||
EXPECT_FALSE(menu_model()->GetAcceleratorForCommandId(1, &accel_arg));
|
||||
EXPECT_EQ(base::string16(), menu_model()->GetLabelForCommandId(1));
|
||||
+ EXPECT_EQ(base::string16(), menu_model()->GetSublabelForCommandId(0));
|
||||
EXPECT_TRUE(menu_model()->GetIconForCommandId(0).IsEmpty());
|
||||
|
||||
- // Menu state should have changed 6 times in this test.
|
||||
- EXPECT_EQ(6, changed_count());
|
||||
+ // Menu state should have changed 7 times in this test.
|
||||
+ EXPECT_EQ(7, changed_count());
|
||||
}
|
||||
diff --git a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
index 331f33660d682c14f7c5d096d8d1241d3670f4ee..a1699d1bd23f3dc1e063bd1dc3f2818c543f40c2 100644
|
||||
--- a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
+++ b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
@@ -92,8 +92,9 @@ class MenuItemViewTestInsert : public MenuTestBase {
|
||||
|
||||
inserted_item_ = menu()->AddMenuItemAt(
|
||||
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
|
||||
- ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(),
|
||||
- views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
|
||||
+ base::string16(), ui::ThemedVectorIcon(), gfx::ImageSkia(),
|
||||
+ ui::ThemedVectorIcon(), views::MenuItemView::Type::kNormal,
|
||||
+ ui::NORMAL_SEPARATOR);
|
||||
ASSERT_TRUE(inserted_item_);
|
||||
menu()->ChildrenChanged();
|
||||
|
||||
@@ -187,7 +188,11 @@ class MenuItemViewTestInsertWithSubmenu : public MenuTestBase {
|
||||
void Step2() {
|
||||
inserted_item_ = menu()->AddMenuItemAt(
|
||||
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
|
||||
+<<<<<<< HEAD
|
||||
ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(),
|
||||
+=======
|
||||
+ base::string16(), nullptr, gfx::ImageSkia(), nullptr,
|
||||
+>>>>>>> Revert "Cleanup: Remove Menu Subtitles/Sublabels"
|
||||
views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
|
||||
ASSERT_TRUE(inserted_item_);
|
||||
menu()->ChildrenChanged();
|
||||
diff --git a/chrome/browser/ui/views/status_icons/concat_menu_model.cc b/chrome/browser/ui/views/status_icons/concat_menu_model.cc
|
||||
index c6fb2f029c87391e13a9c05fe6c8f3f6e0b82779..5bf9acfa5c5ec08144b3e9e290fd19f15d307a8f 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/concat_menu_model.cc
|
||||
+++ b/chrome/browser/ui/views/status_icons/concat_menu_model.cc
|
||||
@@ -33,6 +33,10 @@ base::string16 ConcatMenuModel::GetLabelAt(int index) const {
|
||||
return GetterImpl(&ui::MenuModel::GetLabelAt, index);
|
||||
}
|
||||
|
||||
+base::string16 ConcatMenuModel::GetSublabelAt(int index) const {
|
||||
+ return GetterImpl(&ui::MenuModel::GetSublabelAt, index);
|
||||
+}
|
||||
+
|
||||
base::string16 ConcatMenuModel::GetMinorTextAt(int index) const {
|
||||
return GetterImpl(&ui::MenuModel::GetMinorTextAt, index);
|
||||
}
|
||||
diff --git a/chrome/browser/ui/views/status_icons/concat_menu_model.h b/chrome/browser/ui/views/status_icons/concat_menu_model.h
|
||||
index bad06f01f90b2ecfec3e7478034dde83ef643e53..c4414b8cb67f99dc4b1e4ed9088204f660a63098 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/concat_menu_model.h
|
||||
+++ b/chrome/browser/ui/views/status_icons/concat_menu_model.h
|
||||
@@ -24,6 +24,7 @@ class ConcatMenuModel : public ui::MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
|
||||
int GetCommandIdAt(int index) const override;
|
||||
base::string16 GetLabelAt(int index) const override;
|
||||
+ base::string16 GetSublabelAt(int index) const override;
|
||||
base::string16 GetMinorTextAt(int index) const override;
|
||||
ui::ImageModel GetMinorIconAt(int index) const override;
|
||||
bool IsItemDynamicAt(int index) const override;
|
||||
diff --git a/ui/base/models/menu_model.cc b/ui/base/models/menu_model.cc
|
||||
index 90a350cf9ce045b1f920ff58d84cd9a32ab4b267..e31b71712591e54a33f93d7a1e44353a8a36ffaa 100644
|
||||
--- a/ui/base/models/menu_model.cc
|
||||
+++ b/ui/base/models/menu_model.cc
|
||||
@@ -48,6 +48,10 @@ bool MenuModel::GetModelAndIndexForCommandId(int command_id,
|
||||
return false;
|
||||
}
|
||||
|
||||
+base::string16 MenuModel::GetSublabelAt(int index) const {
|
||||
+ return base::string16();
|
||||
+}
|
||||
+
|
||||
base::string16 MenuModel::GetMinorTextAt(int index) const {
|
||||
return base::string16();
|
||||
}
|
||||
diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h
|
||||
index 887eee64e27f7437be2b308c1d74b0ea49efc745..340109357fb9840744f231d583722f369fa885d7 100644
|
||||
--- a/ui/base/models/menu_model.h
|
||||
+++ b/ui/base/models/menu_model.h
|
||||
@@ -65,6 +65,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> {
|
||||
// Returns the label of the item at the specified index.
|
||||
virtual base::string16 GetLabelAt(int index) const = 0;
|
||||
|
||||
+ // Returns the sublabel of the item at the specified index. The sublabel
|
||||
+ // is rendered beneath the label and using the font GetLabelFontAt().
|
||||
+ virtual base::string16 GetSublabelAt(int index) const;
|
||||
+
|
||||
// Returns the minor text of the item at the specified index. The minor text
|
||||
// is rendered to the right of the label and using the font GetLabelFontAt().
|
||||
virtual base::string16 GetMinorTextAt(int index) const;
|
||||
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
|
||||
index 88053e9d501413d18b6a6ae36b76668431db7ee9..2af6fb77acbe97e7dd7f02f646a91f0fb27878ab 100644
|
||||
--- a/ui/base/models/simple_menu_model.cc
|
||||
+++ b/ui/base/models/simple_menu_model.cc
|
||||
@@ -49,6 +49,16 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
return base::string16();
|
||||
}
|
||||
|
||||
+base::string16 SimpleMenuModel::Delegate::GetSublabelForCommandId(
|
||||
+ int command_id) const {
|
||||
+ return base::string16();
|
||||
+}
|
||||
+
|
||||
+void SimpleMenuModel::SetSublabel(int index, const base::string16& sublabel) {
|
||||
+ items_[ValidateItemIndex(index)].sublabel = sublabel;
|
||||
+ MenuItemsChanged();
|
||||
+}
|
||||
+
|
||||
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
|
||||
int command_id) const {
|
||||
return ImageModel();
|
||||
@@ -364,6 +374,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
|
||||
return items_[ValidateItemIndex(index)].label;
|
||||
}
|
||||
|
||||
+base::string16 SimpleMenuModel::GetSublabelAt(int index) const {
|
||||
+ if (IsItemDynamicAt(index))
|
||||
+ return delegate_->GetSublabelForCommandId(GetCommandIdAt(index));
|
||||
+ return items_[ValidateItemIndex(index)].sublabel;
|
||||
+}
|
||||
+
|
||||
base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index 2b06f3f4a03227ac7898fc3563ab04518d24a313..f7c42c8cea2d7e8198e1fb58dbb2beaf006bf4b0 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -45,6 +45,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
|
||||
virtual base::string16 GetLabelForCommandId(int command_id) const;
|
||||
// Gets the icon for the item with the specified id.
|
||||
virtual ImageModel GetIconForCommandId(int command_id) const;
|
||||
+ virtual base::string16 GetSublabelForCommandId(int command_id) const;
|
||||
|
||||
// Performs the action associates with the specified command id.
|
||||
// The passed |event_flags| are the flags from the event which issued this
|
||||
@@ -146,6 +147,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
|
||||
// Sets the label for the item at |index|.
|
||||
void SetLabel(int index, const base::string16& label);
|
||||
|
||||
+ // Sets the sublabel for the item at |index|.
|
||||
+ void SetSublabel(int index, const base::string16& sublabel);
|
||||
+
|
||||
// Sets the minor text for the item at |index|.
|
||||
void SetMinorText(int index, const base::string16& minor_text);
|
||||
|
||||
@@ -172,6 +176,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
|
||||
int GetCommandIdAt(int index) const override;
|
||||
base::string16 GetLabelAt(int index) const override;
|
||||
+ base::string16 GetSublabelAt(int index) const override;
|
||||
base::string16 GetMinorTextAt(int index) const override;
|
||||
ImageModel GetMinorIconAt(int index) const override;
|
||||
bool IsItemDynamicAt(int index) const override;
|
||||
@@ -206,6 +211,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
|
||||
int command_id = 0;
|
||||
ItemType type = TYPE_COMMAND;
|
||||
base::string16 label;
|
||||
+ base::string16 sublabel;
|
||||
base::string16 minor_text;
|
||||
ImageModel minor_icon;
|
||||
ImageModel icon;
|
||||
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
|
||||
index 6f45e5ac5d1cec52f6f9a434c06cd894a788e421..2167b02facb30fcff40a166038e093fc7855bf49 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view.cc
|
||||
+++ b/ui/views/controls/menu/menu_item_view.cc
|
||||
@@ -261,6 +261,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
|
||||
int index,
|
||||
int item_id,
|
||||
const base::string16& label,
|
||||
+ const base::string16& sublabel,
|
||||
const base::string16& minor_text,
|
||||
const ui::ThemedVectorIcon& minor_icon,
|
||||
const gfx::ImageSkia& icon,
|
||||
@@ -282,6 +283,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
|
||||
item->SetTitle(GetDelegate()->GetLabel(item_id));
|
||||
else
|
||||
item->SetTitle(label);
|
||||
+ item->SetSubtitle(sublabel);
|
||||
item->SetMinorText(minor_text);
|
||||
item->SetMinorIcon(minor_icon);
|
||||
if (!vector_icon.empty()) {
|
||||
@@ -322,21 +324,22 @@ void MenuItemView::RemoveAllMenuItems() {
|
||||
MenuItemView* MenuItemView::AppendMenuItem(int item_id,
|
||||
const base::string16& label,
|
||||
const gfx::ImageSkia& icon) {
|
||||
- return AppendMenuItemImpl(item_id, label, icon, Type::kNormal);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kNormal);
|
||||
}
|
||||
|
||||
MenuItemView* MenuItemView::AppendSubMenu(int item_id,
|
||||
const base::string16& label,
|
||||
const gfx::ImageSkia& icon) {
|
||||
- return AppendMenuItemImpl(item_id, label, icon, Type::kSubMenu);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kSubMenu);
|
||||
}
|
||||
|
||||
void MenuItemView::AppendSeparator() {
|
||||
- AppendMenuItemImpl(0, base::string16(), gfx::ImageSkia(), Type::kSeparator);
|
||||
+ AppendMenuItemImpl(0, base::string16(), base::string16(), gfx::ImageSkia(), Type::kSeparator);
|
||||
}
|
||||
|
||||
void MenuItemView::AddSeparatorAt(int index) {
|
||||
AddMenuItemAt(index, /*item_id=*/0, /*label=*/base::string16(),
|
||||
+ /*sub_label=*/base::string16(),
|
||||
/*minor_text=*/base::string16(),
|
||||
/*minor_icon=*/ui::ThemedVectorIcon(),
|
||||
/*icon=*/gfx::ImageSkia(),
|
||||
@@ -347,10 +350,11 @@ void MenuItemView::AddSeparatorAt(int index) {
|
||||
|
||||
MenuItemView* MenuItemView::AppendMenuItemImpl(int item_id,
|
||||
const base::string16& label,
|
||||
+ const base::string16& sublabel,
|
||||
const gfx::ImageSkia& icon,
|
||||
Type type) {
|
||||
const int index = submenu_ ? int{submenu_->children().size()} : 0;
|
||||
- return AddMenuItemAt(index, item_id, label, base::string16(),
|
||||
+ return AddMenuItemAt(index, item_id, label, sublabel, base::string16(),
|
||||
ui::ThemedVectorIcon(), icon, ui::ThemedVectorIcon(),
|
||||
type, ui::NORMAL_SEPARATOR);
|
||||
}
|
||||
@@ -383,6 +387,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
|
||||
invalidate_dimensions(); // Triggers preferred size recalculation.
|
||||
}
|
||||
|
||||
+void MenuItemView::SetSubtitle(const base::string16& subtitle) {
|
||||
+ subtitle_ = subtitle;
|
||||
+ invalidate_dimensions(); // Triggers preferred size recalculation.
|
||||
+}
|
||||
+
|
||||
void MenuItemView::SetMinorText(const base::string16& minor_text) {
|
||||
minor_text_ = minor_text;
|
||||
invalidate_dimensions(); // Triggers preferred size recalculation.
|
||||
@@ -937,13 +946,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
|
||||
(!delegate || delegate->ShouldReserveSpaceForSubmenuIndicator()
|
||||
? item_right_margin_
|
||||
: config.arrow_to_edge_padding);
|
||||
- gfx::Rect text_bounds(label_start, top_margin, width, available_height);
|
||||
+ gfx::Rect text_bounds(label_start, top_margin, width,
|
||||
+ subtitle_.empty() ? available_height
|
||||
+ : available_height / 2);
|
||||
text_bounds.set_x(GetMirroredXForRect(text_bounds));
|
||||
int flags = GetDrawStringFlags();
|
||||
if (mode == PaintButtonMode::kForDrag)
|
||||
flags |= gfx::Canvas::NO_SUBPIXEL_RENDERING;
|
||||
canvas->DrawStringRectWithFlags(title(), style.font_list, style.foreground,
|
||||
text_bounds, flags);
|
||||
+ if (!subtitle_.empty()) {
|
||||
+ canvas->DrawStringRectWithFlags(
|
||||
+ subtitle_, style.font_list,
|
||||
+ GetNativeTheme()->GetSystemColor(
|
||||
+ ui::NativeTheme::kColorId_MenuItemMinorTextColor),
|
||||
+ text_bounds + gfx::Vector2d(0, style.font_list.GetHeight()), flags);
|
||||
+ }
|
||||
+
|
||||
PaintMinorIconAndText(canvas, style);
|
||||
|
||||
// Set the submenu indicator (arrow) image and color.
|
||||
@@ -1195,15 +1214,20 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
|
||||
|
||||
// Determine the length of the label text.
|
||||
int string_width = gfx::GetStringWidth(title_, style.font_list);
|
||||
+ if (!subtitle_.empty()) {
|
||||
+ string_width =
|
||||
+ std::max(string_width, gfx::GetStringWidth(subtitle_, style.font_list));
|
||||
+ }
|
||||
dimensions.standard_width = string_width + label_start + item_right_margin_;
|
||||
// Determine the length of the right-side text.
|
||||
dimensions.minor_text_width =
|
||||
minor_text.empty() ? 0 : gfx::GetStringWidth(minor_text, style.font_list);
|
||||
|
||||
// Determine the height to use.
|
||||
- dimensions.height =
|
||||
- std::max(dimensions.height, style.font_list.GetHeight() +
|
||||
- GetBottomMargin() + GetTopMargin());
|
||||
+ dimensions.height = std::max(
|
||||
+ dimensions.height, (subtitle_.empty() ? 0 : style.font_list.GetHeight()) +
|
||||
+ style.font_list.GetHeight() + GetBottomMargin() +
|
||||
+ GetTopMargin());
|
||||
dimensions.height =
|
||||
std::max(dimensions.height, MenuConfig::instance().item_min_height);
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
|
||||
index b38a048c22e6f89dfc02d7bda2ed053519a80e29..2db46616cb9a443d6fd280947e5a2673f9ca670c 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view.h
|
||||
+++ b/ui/views/controls/menu/menu_item_view.h
|
||||
@@ -148,6 +148,7 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
MenuItemView* AddMenuItemAt(int index,
|
||||
int item_id,
|
||||
const base::string16& label,
|
||||
+ const base::string16& sublabel,
|
||||
const base::string16& minor_text,
|
||||
const ui::ThemedVectorIcon& minor_icon,
|
||||
const gfx::ImageSkia& icon,
|
||||
@@ -190,6 +191,7 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
// All the AppendXXX methods funnel into this.
|
||||
MenuItemView* AppendMenuItemImpl(int item_id,
|
||||
const base::string16& label,
|
||||
+ const base::string16& sublabel,
|
||||
const gfx::ImageSkia& icon,
|
||||
Type type);
|
||||
|
||||
@@ -214,6 +216,9 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
void SetTitle(const base::string16& title);
|
||||
const base::string16& title() const { return title_; }
|
||||
|
||||
+ // Sets the subtitle.
|
||||
+ void SetSubtitle(const base::string16& subtitle);
|
||||
+
|
||||
// Sets the minor text.
|
||||
void SetMinorText(const base::string16& minor_text);
|
||||
|
||||
@@ -420,7 +425,7 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
void DestroyAllMenuHosts();
|
||||
|
||||
// Returns the text that should be displayed on the end (right) of the menu
|
||||
- // item. This will be the accelerator (if one exists).
|
||||
+ // item. This will be the accelerator (if one exists), otherwise |subtitle_|.
|
||||
base::string16 GetMinorText() const;
|
||||
|
||||
// Returns the icon that should be displayed to the left of the minor text.
|
||||
@@ -511,6 +516,9 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
// Title.
|
||||
base::string16 title_;
|
||||
|
||||
+ // Subtitle/sublabel.
|
||||
+ base::string16 subtitle_;
|
||||
+
|
||||
// Minor text.
|
||||
base::string16 minor_text_;
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
index 119aa4a49c32c2cb14832fd88a520e8645b732bd..e1f99e1fc7a3e42173250f5980a35378867ab298 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
+++ b/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
@@ -324,8 +324,8 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
|
||||
TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) {
|
||||
auto AddItem = [this](auto label, auto minor_label, auto minor_icon) {
|
||||
menu_item_view()->AddMenuItemAt(
|
||||
- 0, 1000, base::ASCIIToUTF16(label), minor_label, minor_icon,
|
||||
- gfx::ImageSkia(), ui::ThemedVectorIcon(),
|
||||
+ 0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label,
|
||||
+ minor_icon, gfx::ImageSkia(), ui::ThemedVectorIcon(),
|
||||
views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
|
||||
};
|
||||
AddItem("No minor content", base::string16(), ui::ThemedVectorIcon());
|
||||
diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
|
||||
index cbf9288765ade430451251f8f266975b2047828d..2aea7766d807120866872cbd7fa17776259f30b8 100644
|
||||
--- a/ui/views/controls/menu/menu_model_adapter.cc
|
||||
+++ b/ui/views/controls/menu/menu_model_adapter.cc
|
||||
@@ -99,8 +99,9 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
|
||||
|
||||
if (*type == MenuItemView::Type::kSeparator) {
|
||||
return menu->AddMenuItemAt(menu_index, item_id, base::string16(),
|
||||
- base::string16(), ui::ThemedVectorIcon(),
|
||||
- gfx::ImageSkia(), ui::ThemedVectorIcon(), *type,
|
||||
+ base::string16(), base::string16(),
|
||||
+ ui::ThemedVectorIcon(), gfx::ImageSkia(),
|
||||
+ ui::ThemedVectorIcon(), *type,
|
||||
model->GetSeparatorTypeAt(model_index));
|
||||
}
|
||||
|
||||
@@ -108,6 +109,7 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
|
||||
ui::ImageModel minor_icon = model->GetMinorIconAt(model_index);
|
||||
return menu->AddMenuItemAt(
|
||||
menu_index, item_id, model->GetLabelAt(model_index),
|
||||
+ model->GetSublabelAt(model_index),
|
||||
model->GetMinorTextAt(model_index),
|
||||
minor_icon.IsVectorIcon()
|
||||
? ui::ThemedVectorIcon(minor_icon.GetVectorIcon())
|
|
@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
|
|||
are required to be NAPI or context aware (Electron v11), this patch can be removed.
|
||||
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
index 4a1bbc64b3bcc27d742fff2b7a7b3de73e9c7426..c5505f99bed35f0eaf5b968555ed5c3be4ec1e47 100644
|
||||
index 86c0ba41074161a137a659afdd2d460dde07d589..de9c3e5f4f502c531af0d15529d535e31ba30dce 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -1294,6 +1294,25 @@ bool ChromeContentRendererClient::AllowPopup() {
|
||||
@@ -1295,6 +1295,25 @@ bool ChromeContentRendererClient::AllowPopup() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ index 4a1bbc64b3bcc27d742fff2b7a7b3de73e9c7426..c5505f99bed35f0eaf5b968555ed5c3b
|
|||
WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
|
||||
index 7cea12e179544e5700e6cb393fafc8437166da9b..1042f99e33a75b76d5b59a97e813024487e31470 100644
|
||||
index 416b7a8f3ba1b6941761c1df4ea108219c415489..2733d0dbbc10c5465a319b080d9b079258ba896d 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.h
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.h
|
||||
@@ -126,6 +126,11 @@ class ChromeContentRendererClient
|
||||
@@ -127,6 +127,11 @@ class ChromeContentRendererClient
|
||||
base::SingleThreadTaskRunner* compositor_thread_task_runner) override;
|
||||
bool RunIdleHandlerWhenWidgetsHidden() override;
|
||||
bool AllowPopup() override;
|
||||
|
@ -55,10 +55,10 @@ index 7cea12e179544e5700e6cb393fafc8437166da9b..1042f99e33a75b76d5b59a97e8130244
|
|||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
|
||||
index a1a8284038231e61d9f1d6302441e871abab4209..67a92523d1078cc7f47251614e27a6d9e9dcfb95 100644
|
||||
index ea6d8e6357233f519c3cf41a96d8453993a9ce71..c513aff3e1c3da45e45954bc0beb80469de6a450 100644
|
||||
--- a/content/public/renderer/content_renderer_client.cc
|
||||
+++ b/content/public/renderer/content_renderer_client.cc
|
||||
@@ -105,6 +105,14 @@ bool ContentRendererClient::HandleNavigation(
|
||||
@@ -114,6 +114,14 @@ bool ContentRendererClient::HandleNavigation(
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -74,10 +74,10 @@ index a1a8284038231e61d9f1d6302441e871abab4209..67a92523d1078cc7f47251614e27a6d9
|
|||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index b35f479d7ef121021a5df8dfb471aead9af3517b..4945bb1e132ac9b2f325850c51000b48ebd82c44 100644
|
||||
index de0274d03ff1a0838f0ab0002c5a6b6ea7e10bfd..892366cd9d2f70498e2e7429a66dcf135d79bb27 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -217,6 +217,13 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -227,6 +227,13 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
bool is_redirect);
|
||||
#endif
|
||||
|
||||
|
@ -92,10 +92,10 @@ index b35f479d7ef121021a5df8dfb471aead9af3517b..4945bb1e132ac9b2f325850c51000b48
|
|||
// |url|. If the function returns a valid |new_url|, the request must be
|
||||
// updated to use it. The |force_ignore_site_for_cookies| output parameter
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 95e9039217f44dcaf770ffea2979976e79d276ab..1126ef0b8bd28142583d77261af6a9c8041d1538 100644
|
||||
index 95cec369e38dada721cbf26fe244461171d748f8..e9d835953e19488a4477051fc34c8e489f333c91 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -5647,6 +5647,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
@@ -5575,6 +5575,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
// we can do a per-frame check here rather than a process-wide check.
|
||||
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
|
||||
(enabled_bindings_ & kWebUIBindingsPolicyMask);
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
|||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 9e4a61421d3c4980c775f3fa21781b6f8f679ca1..123622e032d7af432e6ee86e357eba5e56574adb 100644
|
||||
index 071f1a0b5994c6709b5b0e39f4ed33c90f282c39..0257f74577641adca495473aa0ca0224602e107e 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1346,7 +1346,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
@@ -1350,7 +1350,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
|
|
@ -22,7 +22,7 @@ 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 9beff8728eba07fe5bbb50701dcec78d61149fde..618700cc99de3174b9de9bc26abcaac5880ec21e 100644
|
||||
index 64e781e055df605a2e205106eaed8264ebd3f4b8..11b18f08dbaba89a483908faef465adfb6bd4019 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -416,6 +416,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
|
@ -62,7 +62,7 @@ index 9beff8728eba07fe5bbb50701dcec78d61149fde..618700cc99de3174b9de9bc26abcaac5
|
|||
};
|
||||
|
||||
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
|
||||
@@ -1822,11 +1833,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1836,11 +1847,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
cmd_line->PrependWrapper(renderer_prefix);
|
||||
AppendRendererCommandLine(cmd_line.get());
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
|
|||
which include extra deps that Electron needs (e.g. libnotify)
|
||||
|
||||
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
|
||||
index 165551a2948b74c024459be42d1a9a3d96878a10..45be431c4f36d6068148646a8cf8cb8f0aecc605 100755
|
||||
index f8b7906cc557fb196e19dd6684a29c174b56c789..9fe9fe15f6bbaa38bb74930c4d069000f680987b 100755
|
||||
--- a/build/linux/sysroot_scripts/install-sysroot.py
|
||||
+++ b/build/linux/sysroot_scripts/install-sysroot.py
|
||||
@@ -37,9 +37,11 @@ except ImportError:
|
||||
|
@ -24,7 +24,7 @@ index 165551a2948b74c024459be42d1a9a3d96878a10..45be431c4f36d6068148646a8cf8cb8f
|
|||
|
||||
VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el')
|
||||
|
||||
@@ -103,7 +105,7 @@ def GetSysrootDict(target_platform, target_arch):
|
||||
@@ -101,7 +103,7 @@ def GetSysrootDict(target_platform, target_arch):
|
||||
if target_arch not in VALID_ARCHS:
|
||||
raise Error('Unknown architecture: %s' % target_arch)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: ui_gtk_public_header.patch
|
|||
Allow electron to depend on //ui/gtk/gtk_util.h
|
||||
|
||||
diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn
|
||||
index be7a538b84318339c61d25e61a196222cfbf848a..8c8ac2559e44b1d00e29f5ba6f95ae6c40bd8296 100644
|
||||
index 99d97e9c14532d02d2127d3e401105da758bb1a5..1613f89030549260b5b9879eea067ee83223bade 100644
|
||||
--- a/ui/gtk/BUILD.gn
|
||||
+++ b/ui/gtk/BUILD.gn
|
||||
@@ -22,13 +22,15 @@ component("gtk_ui_delegate") {
|
||||
|
|
|
@ -9,10 +9,10 @@ deprecated, and this API should be removed once the deprecated behavior
|
|||
is no longer supported.
|
||||
|
||||
diff --git a/components/upload_list/upload_list.cc b/components/upload_list/upload_list.cc
|
||||
index e39549c9bb552dc19cad3685629406fdbe44c2c7..428b0f486767b630fc42e0e19c8d63bdb2d04cbc 100644
|
||||
index 4a6b57e81398727977a9ad21ec601ee2f81e910b..03163affcc649ae53c2b7110d27dbd39ae00ae26 100644
|
||||
--- a/components/upload_list/upload_list.cc
|
||||
+++ b/components/upload_list/upload_list.cc
|
||||
@@ -71,6 +71,10 @@ void UploadList::Load(base::OnceClosure callback) {
|
||||
@@ -72,6 +72,10 @@ void UploadList::Load(base::OnceClosure callback) {
|
||||
base::BindOnce(&UploadList::OnLoadComplete, this));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ is needed for OSR.
|
|||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index bcd52490b3ea333c521cf0ab63206a66889cf939..86c1791f8b41bca7e7d011d7445fd320637ce7ce 100644
|
||||
index 31b30a3f729258accab5a135eeddba7b79990e81..402450783e76fedd1264d6d7f47352dd233be621 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2090,6 +2090,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2100,6 +2100,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
|
@ -25,7 +25,7 @@ index bcd52490b3ea333c521cf0ab63206a66889cf939..86c1791f8b41bca7e7d011d7445fd320
|
|||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -2100,6 +2106,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2110,6 +2116,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
view_.reset(CreateWebContentsView(this, delegate,
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
|
@ -34,15 +34,14 @@ index bcd52490b3ea333c521cf0ab63206a66889cf939..86c1791f8b41bca7e7d011d7445fd320
|
|||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 2d2bf71795b4610a18aa39f3e17bc6b0cd54238a..963c2a47c2fd48a411d389588dc35e349d673619 100644
|
||||
index 5677c0c91280b8725627ea7585773a78ecac2e0c..98c4e94fa932cd1bf47397a27f46096658aa979d 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -83,9 +83,12 @@ class BrowserPluginGuestDelegate;
|
||||
class InterstitialPage;
|
||||
@@ -82,8 +82,11 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
+class RenderViewHostDelegateView;
|
||||
class RenderWidgetHost;
|
||||
class RenderWidgetHostView;
|
||||
+class RenderWidgetHostViewBase;
|
||||
class WebContentsDelegate;
|
||||
|
@ -50,7 +49,7 @@ index 2d2bf71795b4610a18aa39f3e17bc6b0cd54238a..963c2a47c2fd48a411d389588dc35e34
|
|||
class WebUI;
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
@@ -213,6 +216,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -211,6 +214,10 @@ class WebContents : public PageNavigator,
|
||||
// Sandboxing flags set on the new WebContents.
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags;
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
|
|||
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 9829c1507a71669308ff6215d68d56ce4f2825bd..5f513ec6a79b082de75ccd655d4210f37f63de42 100644
|
||||
index b5dd9b3023750cb6b23627788b411832cf53f702..baaf3383a55e897483829c79a297e06b3210ea29 100644
|
||||
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -796,9 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
@@ -784,9 +784,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
|
||||
bool WebContentsViewAura::IsValidDragTarget(
|
||||
RenderWidgetHostImpl* target_rwh) const {
|
||||
|
@ -23,10 +23,10 @@ index 9829c1507a71669308ff6215d68d56ce4f2825bd..5f513ec6a79b082de75ccd655d4210f3
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..2c82d63d646c9201abd6a669b726dae0f8bec12b 100644
|
||||
index 5cb5db078b33ecda5ef445e2141a1de76de72ca1..c0f03eb153cb0839e268148f30d7bf43f67648fe 100644
|
||||
--- a/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
@@ -419,9 +419,7 @@ void DropCompletionCallback(
|
||||
@@ -383,9 +383,7 @@ void DropCompletionCallback(
|
||||
}
|
||||
|
||||
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
|
||||
|
|
|
@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
|
|||
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index bc0f72040db5ea178d67218d69b31f623958f287..b35f479d7ef121021a5df8dfb471aead9af3517b 100644
|
||||
index 7da02ee54143e51dfb76d093429e3d8555517c4e..de0274d03ff1a0838f0ab0002c5a6b6ea7e10bfd 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -384,6 +384,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -394,6 +394,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {}
|
||||
|
||||
|
@ -26,7 +26,7 @@ index bc0f72040db5ea178d67218d69b31f623958f287..b35f479d7ef121021a5df8dfb471aead
|
|||
// 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 dc11716791faf3bbd9acaca5173e5f85d5b2a900..ca5ec13e1dceb7efa5272963a4950e86bda6ff90 100644
|
||||
index 9b6fb9c13ed52e0276164351a7f372daebcf9343..d398323366d5891f087978d5972d33dcd19dd2de 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -863,6 +863,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
|
@ -67,10 +67,10 @@ index 6c813f0484f8ce2ef6e58b710a0117d3785f25f8..2872ee9d3a7b0eb888d332a7f7fe9354
|
|||
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 3774cb4c336f641c7e209625b81996374dbaa98d..7408c65846627edc5baec5ba9dbf754b82f7d46b 100644
|
||||
index fe98ad619b9f5a8c13064daa80cc32bee4dc5c8c..87ab2c4ef183d9515758f6d92e732aaf8f53d09e 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
@@ -693,6 +693,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
@@ -687,6 +687,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
nested_runner_->QuitNow();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,3 +34,4 @@ remove_deprecated_wasm_module_type_check.patch
|
|||
weakrefs_rename_finalizationgroup_to_finalizationregistry_for_js.patch
|
||||
weakrefs_split_out_finalizationregistry_cleanupsome.patch
|
||||
fix_window_c-ares_incompatibilities.patch
|
||||
chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch
|
||||
|
|
|
@ -942,10 +942,10 @@ index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2ea
|
|||
+}
|
||||
diff --git a/filenames.json b/filenames.json
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..13c7354ae7e8fe0bca3ba4c03b0e59f0d06b1558
|
||||
index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf1520b376e7e
|
||||
--- /dev/null
|
||||
+++ b/filenames.json
|
||||
@@ -0,0 +1,498 @@
|
||||
@@ -0,0 +1,500 @@
|
||||
+// This file is automatically generated by generate_gn_filenames_json.py
|
||||
+// DO NOT EDIT
|
||||
+{
|
||||
|
@ -966,6 +966,8 @@ index 0000000000000000000000000000000000000000..13c7354ae7e8fe0bca3ba4c03b0e59f0
|
|||
+ "dest_dir": "include/node//cppgc/",
|
||||
+ "files": [
|
||||
+ "//v8/include/cppgc/allocation.h",
|
||||
+ "//v8/include/cppgc/common.h",
|
||||
+ "//v8/include/cppgc/custom-space.h",
|
||||
+ "//v8/include/cppgc/garbage-collected.h",
|
||||
+ "//v8/include/cppgc/heap.h",
|
||||
+ "//v8/include/cppgc/liveness-broker.h",
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Mon, 4 May 2020 16:57:05 -0700
|
||||
Subject: chore: SetHostCleanupFinalizationGroupCallback has been removed from
|
||||
V8
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index 68ccef87356755a8a99283d55bf5492831a46ce0..7b370579d365204b2bd40a25e740bbc83726c376 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -12,7 +12,6 @@ using errors::TryCatchScope;
|
||||
using v8::Array;
|
||||
using v8::Context;
|
||||
using v8::EscapableHandleScope;
|
||||
-using v8::FinalizationGroup;
|
||||
using v8::Function;
|
||||
using v8::HandleScope;
|
||||
using v8::Isolate;
|
||||
@@ -77,15 +76,6 @@ static MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,
|
||||
return result;
|
||||
}
|
||||
|
||||
-static void HostCleanupFinalizationGroupCallback(
|
||||
- Local<Context> context, Local<FinalizationGroup> group) {
|
||||
- Environment* env = Environment::GetCurrent(context);
|
||||
- if (env == nullptr) {
|
||||
- return;
|
||||
- }
|
||||
- env->RegisterFinalizationGroupForCleanup(group);
|
||||
-}
|
||||
-
|
||||
void* NodeArrayBufferAllocator::Allocate(size_t size) {
|
||||
if (zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers)
|
||||
return UncheckedCalloc(size);
|
||||
@@ -228,11 +218,6 @@ void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
|
||||
s.promise_reject_callback : task_queue::PromiseRejectCallback;
|
||||
isolate->SetPromiseRejectCallback(promise_reject_cb);
|
||||
|
||||
- auto* host_cleanup_cb = s.host_cleanup_finalization_group_callback ?
|
||||
- s.host_cleanup_finalization_group_callback :
|
||||
- HostCleanupFinalizationGroupCallback;
|
||||
- isolate->SetHostCleanupFinalizationGroupCallback(host_cleanup_cb);
|
||||
-
|
||||
if (s.flags & DETAILED_SOURCE_POSITIONS_FOR_PROFILING)
|
||||
v8::CpuProfiler::UseDetailedSourcePositionsForProfiling(isolate);
|
||||
}
|
||||
diff --git a/src/env-inl.h b/src/env-inl.h
|
||||
index 5248e7062354c1deb90b58a784237e6f01335c22..e2a104c9c4562abeb579fe62c9c46ca34bf03581 100644
|
||||
--- a/src/env-inl.h
|
||||
+++ b/src/env-inl.h
|
||||
@@ -1182,12 +1182,6 @@ void Environment::RemoveCleanupHook(void (*fn)(void*), void* arg) {
|
||||
cleanup_hooks_.erase(search);
|
||||
}
|
||||
|
||||
-inline void Environment::RegisterFinalizationGroupForCleanup(
|
||||
- v8::Local<v8::FinalizationGroup> group) {
|
||||
- cleanup_finalization_groups_.emplace_back(isolate(), group);
|
||||
- uv_async_send(&task_queues_async_);
|
||||
-}
|
||||
-
|
||||
size_t CleanupHookCallback::Hash::operator()(
|
||||
const CleanupHookCallback& cb) const {
|
||||
return std::hash<void*>()(cb.arg_);
|
||||
diff --git a/src/env.cc b/src/env.cc
|
||||
index 65e4bda890461f691036005252db7e61865d2493..694bfd866a4d7f43046ea97a3e97ea503fffc21b 100644
|
||||
--- a/src/env.cc
|
||||
+++ b/src/env.cc
|
||||
@@ -30,7 +30,6 @@ using v8::ArrayBuffer;
|
||||
using v8::Boolean;
|
||||
using v8::Context;
|
||||
using v8::EmbedderGraph;
|
||||
-using v8::FinalizationGroup;
|
||||
using v8::Function;
|
||||
using v8::FunctionTemplate;
|
||||
using v8::HandleScope;
|
||||
@@ -473,7 +472,6 @@ void Environment::InitializeLibuv(bool start_profiler_idle_notifier) {
|
||||
[](uv_async_t* async) {
|
||||
Environment* env = ContainerOf(
|
||||
&Environment::task_queues_async_, async);
|
||||
- env->CleanupFinalizationGroups();
|
||||
env->RunAndClearNativeImmediates();
|
||||
});
|
||||
uv_unref(reinterpret_cast<uv_handle_t*>(&idle_prepare_handle_));
|
||||
@@ -1112,25 +1110,6 @@ void Environment::RunWeakRefCleanup() {
|
||||
isolate()->ClearKeptObjects();
|
||||
}
|
||||
|
||||
-void Environment::CleanupFinalizationGroups() {
|
||||
- HandleScope handle_scope(isolate());
|
||||
- Context::Scope context_scope(context());
|
||||
- TryCatchScope try_catch(this);
|
||||
-
|
||||
- while (!cleanup_finalization_groups_.empty() && can_call_into_js()) {
|
||||
- Local<FinalizationGroup> fg =
|
||||
- cleanup_finalization_groups_.front().Get(isolate());
|
||||
- cleanup_finalization_groups_.pop_front();
|
||||
- if (!FinalizationGroup::Cleanup(fg).FromMaybe(false)) {
|
||||
- if (try_catch.HasCaught() && !try_catch.HasTerminated())
|
||||
- errors::TriggerUncaughtException(isolate(), try_catch);
|
||||
- // Re-schedule the execution of the remainder of the queue.
|
||||
- uv_async_send(&task_queues_async_);
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
// Not really any better place than env.cc at this moment.
|
||||
void BaseObject::DeleteMe(void* data) {
|
||||
BaseObject* self = static_cast<BaseObject*>(data);
|
||||
diff --git a/src/env.h b/src/env.h
|
||||
index b67f1e4876f42ae37a49bbcb865c049f5a3ac3f5..e269c47ae3814b42fdd2792360c1acb1995e98d2 100644
|
||||
--- a/src/env.h
|
||||
+++ b/src/env.h
|
||||
@@ -1125,9 +1125,7 @@ class Environment : public MemoryRetainer {
|
||||
void AtExit(void (*cb)(void* arg), void* arg);
|
||||
void RunAtExitCallbacks();
|
||||
|
||||
- void RegisterFinalizationGroupForCleanup(v8::Local<v8::FinalizationGroup> fg);
|
||||
void RunWeakRefCleanup();
|
||||
- void CleanupFinalizationGroups();
|
||||
|
||||
// Strings and private symbols are shared across shared contexts
|
||||
// The getters simply proxy to the per-isolate primitive.
|
||||
@@ -1350,8 +1348,6 @@ class Environment : public MemoryRetainer {
|
||||
uint64_t thread_id_;
|
||||
std::unordered_set<worker::Worker*> sub_worker_contexts_;
|
||||
|
||||
- std::deque<v8::Global<v8::FinalizationGroup>> cleanup_finalization_groups_;
|
||||
-
|
||||
static void* const kNodeContextTagPtr;
|
||||
static int const kNodeContextTag;
|
||||
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 709d03145e3d5acdb67502110917e8147c275c60..a279cc7cc6205907eb5f9c3f6237513b2354f6be 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -323,8 +323,6 @@ struct IsolateSettings {
|
||||
v8::PromiseRejectCallback promise_reject_callback = nullptr;
|
||||
v8::AllowWasmCodeGenerationCallback
|
||||
allow_wasm_code_generation_callback = nullptr;
|
||||
- v8::HostCleanupFinalizationGroupCallback
|
||||
- host_cleanup_finalization_group_callback = nullptr;
|
||||
};
|
||||
|
||||
// Overriding IsolateSettings may produce unexpected behavior
|
|
@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
|
|||
Realloc on the v8 side.
|
||||
|
||||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 5a2a701774b7dc25ef2c6863a893d8d9bff41dfd..153065b131fdb7c65b6dd5493b15168048b3df1e 100644
|
||||
index 18d72f1630ccd5ec54183d653a94c023848049fb..d25b81755a59e523828a967a8864dc179f9f4eeb 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -5041,6 +5041,13 @@ class V8_EXPORT ArrayBuffer : public Object {
|
||||
@@ -5051,6 +5051,13 @@ class V8_EXPORT ArrayBuffer : public Object {
|
||||
*/
|
||||
virtual void* AllocateUninitialized(size_t length) = 0;
|
||||
|
||||
|
@ -30,10 +30,10 @@ index 5a2a701774b7dc25ef2c6863a893d8d9bff41dfd..153065b131fdb7c65b6dd5493b151680
|
|||
* Free the memory block of size |length|, pointed to by |data|.
|
||||
* That memory is guaranteed to be previously allocated by |Allocate|.
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index bcd4ebb807968d697af0fe881faec474403b9953..0fdb464af1ea4f173298a915020a5341d979a777 100644
|
||||
index c9bda37991502f74c485b42468a677c60c260dc8..9aa0ae27d40644e637fcd61df3ba0377a5b731fd 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -529,6 +529,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
|
||||
@@ -528,6 +528,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
|
||||
i::V8::SetSnapshotBlob(snapshot_blob);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ necessary for native modules to load.
|
|||
Also, some fixes relating to mksnapshot on ARM.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 81cb222cb21cf22ba9fae6f8de783ae40d0bda8b..6fa899345ed10b46e0b66483cd9da85c8a459148 100644
|
||||
index 44089412300d9f97ca15dec591d2ec928fdd6480..65dfa8dab947fc3f1b7dec0d8a7f1fcbdd773254 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -316,7 +316,7 @@ config("internal_config") {
|
||||
@@ -334,7 +334,7 @@ config("internal_config") {
|
||||
":v8_header_features",
|
||||
]
|
||||
|
||||
|
@ -21,7 +21,7 @@ index 81cb222cb21cf22ba9fae6f8de783ae40d0bda8b..6fa899345ed10b46e0b66483cd9da85c
|
|||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
}
|
||||
@@ -4145,7 +4145,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -4223,7 +4223,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 81cb222cb21cf22ba9fae6f8de783ae40d0bda8b..6fa899345ed10b46e0b66483cd9da85c
|
|||
|
||||
deps = [
|
||||
":v8_libbase",
|
||||
@@ -4178,6 +4178,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
@@ -4256,6 +4256,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: dcheck.patch
|
|||
https://github.com/auchenberg/volkswagen
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 0fdb464af1ea4f173298a915020a5341d979a777..4a5131b2c67140802a6c70cfe67edc6bff688304 100644
|
||||
index 9aa0ae27d40644e637fcd61df3ba0377a5b731fd..900f8bb8ff76c578de40f49729396b0a8b6052b9 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -8727,7 +8727,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
@@ -8620,7 +8620,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
}
|
||||
|
||||
void Isolate::PerformMicrotaskCheckpoint() {
|
||||
|
@ -19,10 +19,10 @@ index 0fdb464af1ea4f173298a915020a5341d979a777..4a5131b2c67140802a6c70cfe67edc6b
|
|||
isolate->default_microtask_queue()->PerformCheckpoint(this);
|
||||
}
|
||||
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
||||
index 29ae26f1f5ed78f83ff9a2a49d1a03cb07d5dbfc..b2ed81a7828b6e85bbbe66d22164f1c4f07bb37b 100644
|
||||
index 0a0f56941f6cdceacf943bfb361af052c6f4b723..c9e36bd5c7cc0d59780ad6efa1291ce63f237b67 100644
|
||||
--- a/src/heap/heap.cc
|
||||
+++ b/src/heap/heap.cc
|
||||
@@ -5505,9 +5505,9 @@ void Heap::TearDown() {
|
||||
@@ -5625,9 +5625,9 @@ void Heap::TearDown() {
|
||||
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
|
||||
GCType gc_type, void* data) {
|
||||
DCHECK_NOT_NULL(callback);
|
||||
|
|
|
@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
|
|||
contain any standard C++ library exports (e.g. `std::ostringstream`).
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 1b8fd83602ba0a34c861961c1c11ffa43d12f79d..4216d7888e77d0ee4af382d52fa0dff5e22b0073 100644
|
||||
index 9f9a93828bb3ac56f208e582ccb97ca942be8e15..e3a14f4cd19dbad897098fd32c75464e6bca7286 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -316,6 +316,10 @@ config("internal_config") {
|
||||
@@ -334,6 +334,10 @@ config("internal_config") {
|
||||
":v8_header_features",
|
||||
]
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
|
|||
Needed in order to target mksnapshot for mksnapshot zip.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 6fa899345ed10b46e0b66483cd9da85c8a459148..1b8fd83602ba0a34c861961c1c11ffa43d12f79d 100644
|
||||
index 65dfa8dab947fc3f1b7dec0d8a7f1fcbdd773254..9f9a93828bb3ac56f208e582ccb97ca942be8e15 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -4156,7 +4156,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -4234,7 +4234,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
|
|
@ -9,7 +9,7 @@ higher versions, but native module compiling with this version
|
|||
will have an issue.
|
||||
|
||||
diff --git a/include/v8config.h b/include/v8config.h
|
||||
index 40d23c35c186e4def1fcf59c28527de292d9fd7a..7d1ef7b5bf0ff6693b8a04afc1e319219c14e230 100644
|
||||
index 9825232d6a10acfe3856402e858730e372e936e5..cfad8676f4142ee300f8273b17dc868f79a7fc8f 100644
|
||||
--- a/include/v8config.h
|
||||
+++ b/include/v8config.h
|
||||
@@ -388,10 +388,13 @@
|
||||
|
|
|
@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
|
|||
this error no longer seems to happen.
|
||||
|
||||
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
|
||||
index d5a0295934d8eba1659238e030c09eb3cf7dbb03..aa67f98a74e89d84747a5a12c57132cd07b3f861 100644
|
||||
index 97a57d6f3c6d5abfc01e0efacef8fd52b7adeb1c..2af710f58fdc7cd04b029f47b63c5e0400fe8694 100644
|
||||
--- a/src/codegen/arm64/assembler-arm64.cc
|
||||
+++ b/src/codegen/arm64/assembler-arm64.cc
|
||||
@@ -3546,6 +3546,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
|
||||
@@ -3548,6 +3548,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
|
||||
ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
{
|
||||
"sid_amd64": {
|
||||
"Sha1Sum": "813389c0526b816233ee4a5c041d45c98a4ba791",
|
||||
"Sha1Sum": "e155615f2b0b0c75b2f444e69880d847f240ed1e",
|
||||
"SysrootDir": "debian_sid_amd64-sysroot",
|
||||
"Tarball": "debian_sid_amd64_sysroot.tar.xz"
|
||||
},
|
||||
"sid_arm": {
|
||||
"Sha1Sum": "074ad35a3ef1425244ebb04568cd8ea14bf6c9ae",
|
||||
"Sha1Sum": "7b36ce9bb9adc93b5ca412225eb4e51f6761a679",
|
||||
"SysrootDir": "debian_sid_arm-sysroot",
|
||||
"Tarball": "debian_sid_arm_sysroot.tar.xz"
|
||||
},
|
||||
"sid_arm64": {
|
||||
"Sha1Sum": "15dd53c064710d4eba7d8aa998d347173b24dcab",
|
||||
"Sha1Sum": "302b370a2484663762905b712a4e20b364a6dcbd",
|
||||
"SysrootDir": "debian_sid_arm64-sysroot",
|
||||
"Tarball": "debian_sid_arm64_sysroot.tar.xz"
|
||||
},
|
||||
"sid_armel": {
|
||||
"Sha1Sum": "8a49da47a0bf8e55fa03cb66956d55d578efd271",
|
||||
"Sha1Sum": "39441a1158474d3b4d7e1a56226638f5e59ac2f2",
|
||||
"SysrootDir": "debian_sid_armel-sysroot",
|
||||
"Tarball": "debian_sid_armel_sysroot.tar.xz"
|
||||
},
|
||||
"sid_i386": {
|
||||
"Sha1Sum": "05de3c25f3ea30871b63b55d3598d59f07910b58",
|
||||
"Sha1Sum": "4fef6754a8c31e8197019ef261908f626f8330e8",
|
||||
"SysrootDir": "debian_sid_i386-sysroot",
|
||||
"Tarball": "debian_sid_i386_sysroot.tar.xz"
|
||||
},
|
||||
"sid_mips": {
|
||||
"Sha1Sum": "944c7e495ddea9b1f1cb31332179c78260b3dadf",
|
||||
"Sha1Sum": "45665d4defb2a6e0828fb901eafd60db99c5ab33",
|
||||
"SysrootDir": "debian_sid_mips-sysroot",
|
||||
"Tarball": "debian_sid_mips_sysroot.tar.xz"
|
||||
},
|
||||
"sid_mips64el": {
|
||||
"Sha1Sum": "4f26d0ee13ba119354fb6217ce763350b1937421",
|
||||
"Sha1Sum": "948f2087c096f08abfa22aa378811ecdea83a25f",
|
||||
"SysrootDir": "debian_sid_mips64el-sysroot",
|
||||
"Tarball": "debian_sid_mips64el_sysroot.tar.xz"
|
||||
}
|
||||
|
|
|
@ -113,9 +113,9 @@ BrowserWindow::~BrowserWindow() {
|
|||
|
||||
void BrowserWindow::OnInputEvent(const blink::WebInputEvent& event) {
|
||||
switch (event.GetType()) {
|
||||
case blink::WebInputEvent::kGestureScrollBegin:
|
||||
case blink::WebInputEvent::kGestureScrollUpdate:
|
||||
case blink::WebInputEvent::kGestureScrollEnd:
|
||||
case blink::WebInputEvent::Type::kGestureScrollBegin:
|
||||
case blink::WebInputEvent::Type::kGestureScrollUpdate:
|
||||
case blink::WebInputEvent::Type::kGestureScrollEnd:
|
||||
Emit("scroll-touch-edge");
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "net/cookies/canonical_cookie.h"
|
||||
#include "net/cookies/cookie_inclusion_status.h"
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "net/cookies/cookie_util.h"
|
||||
#include "shell/browser/cookie_change_notifier.h"
|
||||
|
@ -168,25 +169,23 @@ base::Time ParseTimeProperty(const base::Optional<double>& value) {
|
|||
return base::Time::FromDoubleT(*value);
|
||||
}
|
||||
|
||||
std::string InclusionStatusToString(
|
||||
net::CanonicalCookie::CookieInclusionStatus status) {
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_HTTP_ONLY))
|
||||
std::string InclusionStatusToString(net::CookieInclusionStatus status) {
|
||||
if (status.HasExclusionReason(net::CookieInclusionStatus::EXCLUDE_HTTP_ONLY))
|
||||
return "Failed to create httponly cookie";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_SECURE_ONLY))
|
||||
net::CookieInclusionStatus::EXCLUDE_SECURE_ONLY))
|
||||
return "Cannot create a secure cookie from an insecure URL";
|
||||
if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_FAILURE_TO_STORE))
|
||||
if (status.HasExclusionReason(
|
||||
net::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE))
|
||||
return "Failed to parse cookie";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN))
|
||||
net::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN))
|
||||
return "Failed to get cookie domain";
|
||||
if (status.HasExclusionReason(
|
||||
net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX))
|
||||
net::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX))
|
||||
return "Failed because the cookie violated prefix rules.";
|
||||
if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_NONCOOKIEABLE_SCHEME))
|
||||
if (status.HasExclusionReason(
|
||||
net::CookieInclusionStatus::EXCLUDE_NONCOOKIEABLE_SCHEME))
|
||||
return "Cannot set cookie for current scheme";
|
||||
return "Setting cookie failed";
|
||||
}
|
||||
|
@ -307,9 +306,8 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
GURL url(url_string ? *url_string : "");
|
||||
if (!url.is_valid()) {
|
||||
promise.RejectWithErrorMessage(
|
||||
InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
|
||||
net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_INVALID_DOMAIN)));
|
||||
InclusionStatusToString(net::CookieInclusionStatus(
|
||||
net::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN)));
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
@ -322,9 +320,8 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
http_only, same_site, net::COOKIE_PRIORITY_DEFAULT);
|
||||
if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
|
||||
promise.RejectWithErrorMessage(
|
||||
InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
|
||||
net::CanonicalCookie::CookieInclusionStatus::
|
||||
EXCLUDE_FAILURE_TO_STORE)));
|
||||
InclusionStatusToString(net::CookieInclusionStatus(
|
||||
net::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE)));
|
||||
return handle;
|
||||
}
|
||||
net::CookieOptions options;
|
||||
|
@ -341,7 +338,7 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
*canonical_cookie, url, options,
|
||||
base::BindOnce(
|
||||
[](gin_helper::Promise<void> promise,
|
||||
net::CanonicalCookie::CookieInclusionStatus status) {
|
||||
net::CookieInclusionStatus status) {
|
||||
if (status.IsInclude()) {
|
||||
promise.Resolve();
|
||||
} else {
|
||||
|
|
|
@ -147,7 +147,7 @@ void Menu::SetIcon(int index, const gfx::Image& image) {
|
|||
}
|
||||
|
||||
void Menu::SetSublabel(int index, const base::string16& sublabel) {
|
||||
model_->SetSublabel(index, sublabel);
|
||||
model_->SetSecondaryLabel(index, sublabel);
|
||||
}
|
||||
|
||||
void Menu::SetToolTip(int index, const base::string16& toolTip) {
|
||||
|
@ -179,7 +179,7 @@ base::string16 Menu::GetLabelAt(int index) const {
|
|||
}
|
||||
|
||||
base::string16 Menu::GetSublabelAt(int index) const {
|
||||
return model_->GetSublabelAt(index);
|
||||
return model_->GetSecondaryLabelAt(index);
|
||||
}
|
||||
|
||||
base::string16 Menu::GetToolTipAt(int index) const {
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
#include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h"
|
||||
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
|
||||
#include "ui/base/cursor/cursor.h"
|
||||
#include "ui/base/mojom/cursor_type.mojom-shared.h"
|
||||
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
|
||||
|
@ -178,22 +178,22 @@ struct Converter<printing::MarginType> {
|
|||
};
|
||||
|
||||
template <>
|
||||
struct Converter<printing::DuplexMode> {
|
||||
struct Converter<printing::mojom::DuplexMode> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
printing::DuplexMode* out) {
|
||||
printing::mojom::DuplexMode* out) {
|
||||
std::string mode;
|
||||
if (ConvertFromV8(isolate, val, &mode)) {
|
||||
if (mode == "simplex") {
|
||||
*out = printing::SIMPLEX;
|
||||
*out = printing::mojom::DuplexMode::kSimplex;
|
||||
return true;
|
||||
}
|
||||
if (mode == "longEdge") {
|
||||
*out = printing::LONG_EDGE;
|
||||
*out = printing::mojom::DuplexMode::kLongEdge;
|
||||
return true;
|
||||
}
|
||||
if (mode == "shortEdge") {
|
||||
*out = printing::SHORT_EDGE;
|
||||
*out = printing::mojom::DuplexMode::kShortEdge;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -708,6 +708,7 @@ content::WebContents* WebContents::CreateCustomWebContents(
|
|||
void WebContents::AddNewContents(
|
||||
content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
const GURL& target_url,
|
||||
WindowOpenDisposition disposition,
|
||||
const gfx::Rect& initial_rect,
|
||||
bool user_gesture,
|
||||
|
@ -1392,8 +1393,6 @@ void WebContents::DevToolsClosed() {
|
|||
bool WebContents::OnMessageReceived(const IPC::Message& message) {
|
||||
bool handled = true;
|
||||
IPC_BEGIN_MESSAGE_MAP(WebContents, message)
|
||||
IPC_MESSAGE_HANDLER_CODE(WidgetHostMsg_SetCursor, OnCursorChange,
|
||||
handled = false)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
|
||||
|
@ -2036,9 +2035,10 @@ void WebContents::Print(gin_helper::Arguments* args) {
|
|||
}
|
||||
|
||||
// Duplex type user wants to use.
|
||||
printing::DuplexMode duplex_mode;
|
||||
printing::mojom::DuplexMode duplex_mode;
|
||||
options.Get("duplexMode", &duplex_mode);
|
||||
settings.SetIntKey(printing::kSettingDuplexMode, duplex_mode);
|
||||
settings.SetIntKey(printing::kSettingDuplexMode,
|
||||
static_cast<int>(duplex_mode));
|
||||
|
||||
// We've already done necessary parameter sanitization at the
|
||||
// JS level, so we can simply pass this through.
|
||||
|
@ -2311,13 +2311,13 @@ void WebContents::SendInputEvent(v8::Isolate* isolate,
|
|||
}
|
||||
} else if (blink::WebInputEvent::IsKeyboardEventType(type)) {
|
||||
content::NativeWebKeyboardEvent keyboard_event(
|
||||
blink::WebKeyboardEvent::kRawKeyDown,
|
||||
blink::WebInputEvent::kNoModifiers, ui::EventTimeForNow());
|
||||
blink::WebKeyboardEvent::Type::kRawKeyDown,
|
||||
blink::WebInputEvent::Modifiers::kNoModifiers, ui::EventTimeForNow());
|
||||
if (gin::ConvertFromV8(isolate, input_event, &keyboard_event)) {
|
||||
rwh->ForwardKeyboardEvent(keyboard_event);
|
||||
return;
|
||||
}
|
||||
} else if (type == blink::WebInputEvent::kMouseWheel) {
|
||||
} else if (type == blink::WebInputEvent::Type::kMouseWheel) {
|
||||
blink::WebMouseWheelEvent mouse_wheel_event;
|
||||
if (gin::ConvertFromV8(isolate, input_event, &mouse_wheel_event)) {
|
||||
if (IsOffScreen()) {
|
||||
|
@ -2450,7 +2450,7 @@ bool WebContents::IsBeingCaptured() {
|
|||
return web_contents()->IsBeingCaptured();
|
||||
}
|
||||
|
||||
void WebContents::OnCursorChange(const content::WebCursor& webcursor) {
|
||||
void WebContents::OnCursorChanged(const content::WebCursor& webcursor) {
|
||||
const ui::Cursor& cursor = webcursor.cursor();
|
||||
|
||||
if (cursor.type() == ui::mojom::CursorType::kCustom) {
|
||||
|
|
|
@ -447,6 +447,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
content::WebContents* new_contents) override;
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
const GURL& target_url,
|
||||
WindowOpenDisposition disposition,
|
||||
const gfx::Rect& initial_rect,
|
||||
bool user_gesture,
|
||||
|
@ -551,6 +552,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
content::RenderFrameHost* render_frame_host,
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle* interface_pipe) override;
|
||||
void OnCursorChanged(const content::WebCursor& cursor) override;
|
||||
void DidAcquireFullscreen(content::RenderFrameHost* rfh) override;
|
||||
|
||||
// InspectableWebContentsDelegate:
|
||||
|
@ -608,9 +610,6 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
void SetTemporaryZoomLevel(double level) override;
|
||||
void DoGetZoomLevel(DoGetZoomLevelCallback callback) override;
|
||||
|
||||
// Called when we receive a CursorChange message from chromium.
|
||||
void OnCursorChange(const content::WebCursor& cursor);
|
||||
|
||||
// Called when received a synchronous message from renderer to
|
||||
// get the zoom level.
|
||||
void OnGetZoomLevel(content::RenderFrameHost* frame_host,
|
||||
|
|
|
@ -27,7 +27,13 @@ namespace electron {
|
|||
gin::WrapperInfo MessagePort::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
MessagePort::MessagePort() = default;
|
||||
MessagePort::~MessagePort() = default;
|
||||
MessagePort::~MessagePort() {
|
||||
if (!IsNeutered()) {
|
||||
// Disentangle before teardown. The MessagePortDescriptor will blow up if it
|
||||
// hasn't had its underlying handle returned to it before teardown.
|
||||
Disentangle();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
gin::Handle<MessagePort> MessagePort::Create(v8::Isolate* isolate) {
|
||||
|
@ -97,8 +103,9 @@ void MessagePort::Close() {
|
|||
if (closed_)
|
||||
return;
|
||||
if (!IsNeutered()) {
|
||||
connector_ = nullptr;
|
||||
Entangle(mojo::MessagePipe().handle0);
|
||||
Disentangle().ReleaseHandle();
|
||||
blink::MessagePortDescriptorPair pipe;
|
||||
Entangle(pipe.TakePort0());
|
||||
}
|
||||
closed_ = true;
|
||||
if (!HasPendingActivity())
|
||||
|
@ -111,11 +118,15 @@ void MessagePort::Close() {
|
|||
gin_helper::EmitEvent(isolate, self, "close");
|
||||
}
|
||||
|
||||
void MessagePort::Entangle(mojo::ScopedMessagePipeHandle handle) {
|
||||
DCHECK(handle.is_valid());
|
||||
void MessagePort::Entangle(blink::MessagePortDescriptor port) {
|
||||
DCHECK(port.IsValid());
|
||||
DCHECK(!connector_);
|
||||
port_ = std::move(port);
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::HandleScope scope(isolate);
|
||||
connector_ = std::make_unique<mojo::Connector>(
|
||||
std::move(handle), mojo::Connector::SINGLE_THREADED_SEND,
|
||||
port_.TakeHandleToEntangleWithEmbedder(),
|
||||
mojo::Connector::SINGLE_THREADED_SEND,
|
||||
base::ThreadTaskRunnerHandle::Get());
|
||||
connector_->PauseIncomingMethodCallProcessing();
|
||||
connector_->set_incoming_receiver(this);
|
||||
|
@ -131,11 +142,11 @@ void MessagePort::Entangle(blink::MessagePortChannel channel) {
|
|||
|
||||
blink::MessagePortChannel MessagePort::Disentangle() {
|
||||
DCHECK(!IsNeutered());
|
||||
auto result = blink::MessagePortChannel(connector_->PassMessagePipe());
|
||||
port_.GiveDisentangledHandle(connector_->PassMessagePipe());
|
||||
connector_ = nullptr;
|
||||
if (!HasPendingActivity())
|
||||
Unpin();
|
||||
return result;
|
||||
return blink::MessagePortChannel(std::move(port_));
|
||||
}
|
||||
|
||||
bool MessagePort::HasPendingActivity() const {
|
||||
|
@ -260,9 +271,9 @@ using electron::MessagePort;
|
|||
v8::Local<v8::Value> CreatePair(v8::Isolate* isolate) {
|
||||
auto port1 = MessagePort::Create(isolate);
|
||||
auto port2 = MessagePort::Create(isolate);
|
||||
mojo::MessagePipe pipe;
|
||||
port1->Entangle(std::move(pipe.handle0));
|
||||
port2->Entangle(std::move(pipe.handle1));
|
||||
blink::MessagePortDescriptorPair pipe;
|
||||
port1->Entangle(pipe.TakePort0());
|
||||
port2->Entangle(pipe.TakePort1());
|
||||
return gin::DataObjectBuilder(isolate)
|
||||
.Set("port1", port1)
|
||||
.Set("port2", port2)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "mojo/public/cpp/bindings/connector.h"
|
||||
#include "mojo/public/cpp/bindings/message.h"
|
||||
#include "third_party/blink/public/common/messaging/message_port_channel.h"
|
||||
#include "third_party/blink/public/common/messaging/message_port_descriptor.h"
|
||||
|
||||
namespace gin {
|
||||
class Arguments;
|
||||
|
@ -31,7 +32,7 @@ class MessagePort : public gin::Wrappable<MessagePort>, mojo::MessageReceiver {
|
|||
void Start();
|
||||
void Close();
|
||||
|
||||
void Entangle(mojo::ScopedMessagePipeHandle handle);
|
||||
void Entangle(blink::MessagePortDescriptor handle);
|
||||
void Entangle(blink::MessagePortChannel channel);
|
||||
|
||||
blink::MessagePortChannel Disentangle();
|
||||
|
@ -78,6 +79,10 @@ class MessagePort : public gin::Wrappable<MessagePort>, mojo::MessageReceiver {
|
|||
|
||||
v8::Global<v8::Value> pinned_;
|
||||
|
||||
// The internal port owned by this class. The handle itself is moved into the
|
||||
// |connector_| while entangled.
|
||||
blink::MessagePortDescriptor port_;
|
||||
|
||||
base::WeakPtrFactory<MessagePort> weak_factory_{this};
|
||||
};
|
||||
|
||||
|
|
|
@ -232,11 +232,6 @@ BrowserProcessImpl::safe_browsing_service() {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
safe_browsing::ClientSideDetectionService*
|
||||
BrowserProcessImpl::safe_browsing_detection_service() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
subresource_filter::RulesetService*
|
||||
BrowserProcessImpl::subresource_filter_ruleset_service() {
|
||||
return nullptr;
|
||||
|
|
|
@ -77,8 +77,6 @@ class BrowserProcessImpl : public BrowserProcess {
|
|||
BackgroundModeManager* background_mode_manager() override;
|
||||
StatusTray* status_tray() override;
|
||||
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
||||
safe_browsing::ClientSideDetectionService* safe_browsing_detection_service()
|
||||
override;
|
||||
subresource_filter::RulesetService* subresource_filter_ruleset_service()
|
||||
override;
|
||||
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
||||
|
|
|
@ -21,7 +21,7 @@ bool CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
if (event.skip_in_browser ||
|
||||
event.GetType() == content::NativeWebKeyboardEvent::kChar)
|
||||
event.GetType() == content::NativeWebKeyboardEvent::Type::kChar)
|
||||
return false;
|
||||
|
||||
// Escape exits tabbed fullscreen mode.
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "extensions/browser/extension_protocols.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "mojo/public/cpp/bindings/binder_map.h"
|
||||
#include "net/base/escape.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
|
@ -59,7 +60,6 @@
|
|||
#include "services/device/public/cpp/geolocation/location_provider.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/cpp/resource_request_body.h"
|
||||
#include "services/service_manager/public/cpp/binder_map.h"
|
||||
#include "shell/app/manifests.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
#include "shell/browser/api/electron_api_crash_reporter.h"
|
||||
|
@ -1049,14 +1049,16 @@ ElectronBrowserClient::OverrideSystemLocationProvider() {
|
|||
#endif
|
||||
}
|
||||
|
||||
mojo::Remote<network::mojom::NetworkContext>
|
||||
ElectronBrowserClient::CreateNetworkContext(
|
||||
void ElectronBrowserClient::ConfigureNetworkContextParams(
|
||||
content::BrowserContext* browser_context,
|
||||
bool /*in_memory*/,
|
||||
const base::FilePath& /*relative_partition_path*/) {
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
network::mojom::NetworkContextParams* network_context_params,
|
||||
network::mojom::CertVerifierCreationParams* cert_verifier_creation_params) {
|
||||
DCHECK(browser_context);
|
||||
return NetworkContextServiceFactory::GetForContext(browser_context)
|
||||
->CreateNetworkContext();
|
||||
->ConfigureNetworkContextParams(network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
}
|
||||
|
||||
network::mojom::NetworkContext*
|
||||
|
@ -1591,7 +1593,7 @@ void BindBeforeUnloadControl(
|
|||
|
||||
void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map) {
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) {
|
||||
map->Add<network_hints::mojom::NetworkHintsHandler>(
|
||||
base::BindRepeating(&BindNetworkHintsHandler));
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
|
|
|
@ -69,8 +69,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
mojo::GenericPendingReceiver receiver) override;
|
||||
void RegisterBrowserInterfaceBindersForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map)
|
||||
override;
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override;
|
||||
#if defined(OS_LINUX)
|
||||
void GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
|
@ -152,10 +151,13 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
content::BrowserContext* browser_context) override;
|
||||
std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider()
|
||||
override;
|
||||
mojo::Remote<network::mojom::NetworkContext> CreateNetworkContext(
|
||||
void ConfigureNetworkContextParams(
|
||||
content::BrowserContext* browser_context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path) override;
|
||||
const base::FilePath& relative_partition_path,
|
||||
network::mojom::NetworkContextParams* network_context_params,
|
||||
network::mojom::CertVerifierCreationParams* cert_verifier_creation_params)
|
||||
override;
|
||||
network::mojom::NetworkContext* GetSystemNetworkContext() override;
|
||||
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
|
||||
base::StringPiece name) override;
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/gfx/x/x11_types.h"
|
||||
#include "ui/gfx/x/xproto_util.h"
|
||||
#include "ui/gtk/gtk_ui.h"
|
||||
#include "ui/gtk/gtk_ui_delegate.h"
|
||||
#include "ui/gtk/gtk_util.h"
|
||||
|
@ -168,7 +169,7 @@ void OverrideLinuxAppDataPath() {
|
|||
int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) {
|
||||
if (!g_in_x11_io_error_handler && base::ThreadTaskRunnerHandle::IsSet()) {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ui::LogErrorEventDescription, d, *error));
|
||||
FROM_HERE, base::BindOnce(&x11::LogErrorEventDescription, *error));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -62,10 +62,6 @@ void ElectronExtensionSystem::LoadExtension(
|
|||
void ElectronExtensionSystem::FinishInitialization() {
|
||||
// Inform the rest of the extensions system to start.
|
||||
ready_.Signal();
|
||||
content::NotificationService::current()->Notify(
|
||||
NOTIFICATION_EXTENSIONS_READY_DEPRECATED,
|
||||
content::Source<BrowserContext>(browser_context_),
|
||||
content::NotificationService::NoDetails());
|
||||
}
|
||||
|
||||
void ElectronExtensionSystem::ReloadExtension(const ExtensionId& extension_id) {
|
||||
|
|
|
@ -366,7 +366,7 @@ std::string ElectronExtensionsBrowserClient::GetUserAgent() const {
|
|||
}
|
||||
|
||||
void ElectronExtensionsBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map,
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const extensions::Extension* extension) const {
|
||||
PopulateExtensionFrameBinders(map, render_frame_host, extension);
|
||||
|
|
|
@ -118,7 +118,7 @@ class ElectronExtensionsBrowserClient
|
|||
std::string GetApplicationLocale() override;
|
||||
std::string GetUserAgent() const override;
|
||||
void RegisterBrowserInterfaceBindersForFrame(
|
||||
service_manager::BinderMapWithContext<content::RenderFrameHost*>* map,
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const extensions::Extension* extension) const override;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue