chore: bump chromium to 129.0.6650.0 (main) (#43266)

* chore: bump chromium in DEPS to 129.0.6645.0

* chore: update patches

* chore: bump chromium in DEPS to 129.0.6646.0

* refactor: remove ppapi dependency

PPAPI removal - https://issues.chromium.org/issues/40511450
PDF viewer migration - https://issues.chromium.org/issues/40511452

* chore: update patches

* chore: enable `content_enable_legacy_ipc`

We were indirectly relying on this via `enable_ppapi=true`, with
633a57d9b62da7850ef7946f6b101ed440d04cdd ppapi is now disabled and
this commit makes the dependency explicit.

* fix: gn check

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
electron-roller[bot] 2024-08-12 10:28:33 +02:00 committed by GitHub
parent 23bcca3ffc
commit c9b7806418
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 333 additions and 673 deletions

View file

@ -127,7 +127,8 @@ jobs:
cd src cd src
gn check out/Default //electron:electron_lib gn check out/Default //electron:electron_lib
gn check out/Default //electron:electron_app gn check out/Default //electron:electron_app
gn check out/Default //electron/shell/common/api:mojo gn check out/Default //electron/shell/common:mojo
gn check out/Default //electron/shell/common:plugin
# Check the hunspell filenames # Check the hunspell filenames
node electron/script/gen-hunspell-filenames.js --check node electron/script/gen-hunspell-filenames.js --check

View file

@ -425,7 +425,8 @@ source_set("electron_lib") {
"buildflags", "buildflags",
"chromium_src:chrome", "chromium_src:chrome",
"chromium_src:chrome_spellchecker", "chromium_src:chrome_spellchecker",
"shell/common/api:mojo", "shell/common:mojo",
"shell/common:plugin",
"shell/services/node/public/mojom", "shell/services/node/public/mojom",
"//base:base_static", "//base:base_static",
"//base/allocator:buildflags", "//base/allocator:buildflags",
@ -672,22 +673,9 @@ source_set("electron_lib") {
} }
if (enable_plugins) { if (enable_plugins) {
deps += [ "chromium_src:plugins" ]
sources += [ sources += [
"shell/common/plugin_info.cc", "shell/common/plugin_info.cc",
"shell/common/plugin_info.h", "shell/common/plugin_info.h",
"shell/renderer/electron_renderer_pepper_host_factory.cc",
"shell/renderer/electron_renderer_pepper_host_factory.h",
"shell/renderer/pepper_helper.cc",
"shell/renderer/pepper_helper.h",
]
}
if (enable_ppapi) {
deps += [
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
] ]
} }

2
DEPS
View file

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = { vars = {
'chromium_version': 'chromium_version':
'129.0.6644.0', '129.0.6646.0',
'node_version': 'node_version':
'v20.16.0', 'v20.16.0',
'nan_version': 'nan_version':

View file

@ -140,7 +140,8 @@ for:
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% " - gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
- gn check out/Default //electron:electron_lib - gn check out/Default //electron:electron_lib
- gn check out/Default //electron:electron_app - gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common/api:mojo - gn check out/Default //electron/shell/common:mojo
- gn check out/Default //electron/shell/common:plugin
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app) - if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default ) - if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%" - gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"

View file

@ -138,7 +138,8 @@ for:
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% " - gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
- gn check out/Default //electron:electron_lib - gn check out/Default //electron:electron_lib
- gn check out/Default //electron:electron_app - gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common/api:mojo - gn check out/Default //electron/shell/common:mojo
- gn check out/Default //electron/shell/common:plugin
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app) - if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default ) - if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%" - gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"

View file

@ -73,3 +73,7 @@ clang_unsafe_buffers_paths = ""
# Disable snapshotting a page when printing for its content to be analyzed for # Disable snapshotting a page when printing for its content to be analyzed for
# sensitive content by enterprise users. # sensitive content by enterprise users.
enterprise_cloud_content_analysis = false enterprise_cloud_content_analysis = false
# TODO: remove dependency on legacy ipc
# https://issues.chromium.org/issues/40943039
content_enable_legacy_ipc = true

View file

@ -6,7 +6,6 @@ import("//build/config/ozone.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//components/spellcheck/spellcheck_build_features.gni") import("//components/spellcheck/spellcheck_build_features.gni")
import("//electron/buildflags/buildflags.gni") import("//electron/buildflags/buildflags.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni") import("//printing/buildflags/buildflags.gni")
import("//third_party/widevine/cdm/widevine.gni") import("//third_party/widevine/cdm/widevine.gni")
@ -421,46 +420,6 @@ static_library("chrome") {
} }
} }
source_set("plugins") {
sources = []
deps = []
frameworks = []
# browser side
sources += [
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc",
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h",
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc",
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h",
]
# renderer side
sources += [
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc",
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h",
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.cc",
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.h",
]
deps += [
"//components/strings",
"//media:media_buildflags",
"//services/device/public/mojom",
"//skia",
"//storage/browser",
]
if (enable_ppapi) {
deps += [
"//ppapi/buildflags",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl",
]
}
}
# This source set is just so we don't have to depend on all of //chrome/browser # This source set is just so we don't have to depend on all of //chrome/browser
# You may have to add new files here during the upgrade if //chrome/browser/spellchecker # You may have to add new files here during the upgrade if //chrome/browser/spellchecker
# gets more files # gets more files

View file

@ -378,6 +378,8 @@ filenames = {
"shell/browser/electron_navigation_throttle.h", "shell/browser/electron_navigation_throttle.h",
"shell/browser/electron_permission_manager.cc", "shell/browser/electron_permission_manager.cc",
"shell/browser/electron_permission_manager.h", "shell/browser/electron_permission_manager.h",
"shell/browser/electron_plugin_info_host_impl.cc",
"shell/browser/electron_plugin_info_host_impl.h",
"shell/browser/electron_speech_recognition_manager_delegate.cc", "shell/browser/electron_speech_recognition_manager_delegate.cc",
"shell/browser/electron_speech_recognition_manager_delegate.h", "shell/browser/electron_speech_recognition_manager_delegate.h",
"shell/browser/electron_web_contents_utility_handler_impl.cc", "shell/browser/electron_web_contents_utility_handler_impl.cc",

View file

@ -10,7 +10,6 @@ webview_cross_drag.patch
gin_enable_disable_v8_platform.patch gin_enable_disable_v8_platform.patch
enable_reset_aspect_ratio.patch enable_reset_aspect_ratio.patch
boringssl_build_gn.patch boringssl_build_gn.patch
pepper_plugin_support.patch
gtk_visibility.patch gtk_visibility.patch
resource_file_conflict.patch resource_file_conflict.patch
scroll_bounce_flag.patch scroll_bounce_flag.patch
@ -25,7 +24,6 @@ dump_syms.patch
command-ismediakey.patch command-ismediakey.patch
printing.patch printing.patch
support_mixed_sandbox_with_zygote.patch support_mixed_sandbox_with_zygote.patch
unsandboxed_ppapi_processes_skip_zygote.patch
build_add_electron_tracing_category.patch build_add_electron_tracing_category.patch
worker_context_will_destroy.patch worker_context_will_destroy.patch
frame_host_manager.patch frame_host_manager.patch
@ -131,3 +129,4 @@ feat_enable_passing_exit_code_on_service_process_crash.patch
chore_remove_reference_to_chrome_browser_themes.patch chore_remove_reference_to_chrome_browser_themes.patch
feat_enable_customizing_symbol_color_in_framecaptionbutton.patch feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
fix_potential_draggable_region_crash_when_no_mainframeimpl.patch fix_potential_draggable_region_crash_when_no_mainframeimpl.patch
build_expose_webplugininfo_interface_to_electron.patch

View file

@ -23,10 +23,10 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
int32_t world_id) {} int32_t world_id) {}
virtual void DidClearWindowObject() {} virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 833761e8401c4f521614e438224c9f2ab691933f..f732f6d20e3e12e2bbec4970b0211d8d7e580644 100644 index ee688da4100412ff58bffa1b266a4c823486dd56..2a53ebc1be32c537e9325cb851f50188f037da0b 100644
--- a/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -4715,6 +4715,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context, @@ -4719,6 +4719,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id); observer.DidCreateScriptContext(context, world_id);
} }
@ -40,7 +40,7 @@ index 833761e8401c4f521614e438224c9f2ab691933f..f732f6d20e3e12e2bbec4970b0211d8d
int world_id) { int world_id) {
for (auto& observer : observers_) for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 8ecebbc688791772b6a66dfc8057f6df40fa2f94..8ccff650148f30fd8bcc40797e97fb4c11e6ac93 100644 index b47f9d4e51e64888301061f081a0515ae4f254d0..3d45f8a9de9a726f011791f3f61d79af98fb740d 100644
--- a/content/renderer/render_frame_impl.h --- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -643,6 +643,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -643,6 +643,8 @@ class CONTENT_EXPORT RenderFrameImpl
@ -53,7 +53,7 @@ index 8ecebbc688791772b6a66dfc8057f6df40fa2f94..8ccff650148f30fd8bcc40797e97fb4c
int world_id) override; int world_id) override;
void DidChangeScrollOffset() 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 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 1a8345bb370a682e017a25b31013e384c68f451c..9de96f995fdbc0419db2c352a81b6fae2edf20b4 100644 index 85cd5b277088c61a6bf83589a2698d279771ab18..f774939483b91875f012cb74d5a58d35fdfe3866 100644
--- a/third_party/blink/public/web/web_local_frame_client.h --- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -647,6 +647,9 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -647,6 +647,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@ -79,7 +79,7 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3
if (World().IsMainWorld()) { if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame()); probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h 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 bb419323dd6afd6070fcee909672344beaf63322..98894c5e14ba97a93ec305da173c4cf312d1d531 100644 index ccb1ab9c1eefbdf4f73e50d390c897dbbbc7061e..3382f434b75fb1acced2f67ad41fc70a44949578 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h --- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { @@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@ -92,7 +92,7 @@ index bb419323dd6afd6070fcee909672344beaf63322..98894c5e14ba97a93ec305da173c4cf3
int32_t world_id) = 0; int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0; virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index ca3cf8a256fc1f729defe7df76968cfdfb00d540..3200171e5e065d0bbb52899e817a234e4a074060 100644 index 1f99493c7e50fe44a58c9e4db34cb99780863c86..4a65887071650678efea4adb3d1e55c132d454d8 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -294,6 +294,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -294,6 +294,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@ -110,7 +110,7 @@ index ca3cf8a256fc1f729defe7df76968cfdfb00d540..3200171e5e065d0bbb52899e817a234e
v8::Local<v8::Context> context, v8::Local<v8::Context> context,
int32_t world_id) { int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index ab862098f141296840e8ddc4f48c9a6edb8f1fea..2c3e9065f92e70018f5ee527c4ca85d7c72bac51 100644 index a3661daf705b0b161da88433b46d410dfa96227d..bbd905415520bb4507580817e78134b09ce01631 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@ -123,7 +123,7 @@ index ab862098f141296840e8ddc4f48c9a6edb8f1fea..2c3e9065f92e70018f5ee527c4ca85d7
int32_t world_id) override; int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index a270e9311886e4ff1cffd4bf31a72997e0ad4542..9c44fee91a1b4db78e278758688c262792e1c302 100644 index f3a081d7230c10d12f7e14311930efc3df1ad870..7e8b97c7e901a2ba5ca32037a938749806243dac 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h --- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -408,6 +408,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { @@ -408,6 +408,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View file

@ -116,10 +116,10 @@ index 4220a0aebf4a2ce3d62f76c441b6ec1b5e11ffa1..6ea17602d2b186b81cf7dc69750bd302
// Visibility ----------------------------------------------------------- // 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 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 ff49a7487239679ee05776251fcddf97448e5db7..998edbdf1e2f0e96f349d9c181eb98cc2b82713c 100644 index 952d182bf322e48e79d87951f96d34bbd346c465..a9c3476669853ff87c699ddc82fa465ed3924eb1 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2456,6 +2456,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( @@ -2467,6 +2467,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state); "old_state", old_state, "new_state", new_state);
@ -130,7 +130,7 @@ index ff49a7487239679ee05776251fcddf97448e5db7..998edbdf1e2f0e96f349d9c181eb98cc
bool storing_in_bfcache = new_state->is_in_back_forward_cache && bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache; !old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -3972,10 +3976,23 @@ PageScheduler* WebViewImpl::Scheduler() const { @@ -3985,10 +3989,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler(); return GetPage()->GetPageScheduler();
} }

View file

@ -33,10 +33,10 @@ index 13cef63b5315eb1d8b188a0f5365b9af4ff1bf77..bd4906cb976effb8f3ded88f7af3a705
"//base", "//base",
"//build:branding_buildflags", "//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 95b3237d4799f81a0e44c75de8310d72b465d7cb..e5f89c31eb08c41619fb07db5f93731fb4cb1fab 100644 index bb13698d59d014043f302f5fe577bece576ab9fa..dc43b438174be09430c51215b90fd0c8ed25f6b9 100644
--- a/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -4465,7 +4465,7 @@ static_library("browser") { @@ -4460,7 +4460,7 @@ static_library("browser") {
] ]
} }
@ -46,10 +46,10 @@ index 95b3237d4799f81a0e44c75de8310d72b465d7cb..e5f89c31eb08c41619fb07db5f93731f
# than here in :chrome_dll. # than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ] deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 146d6299ecb886c3e7f0e2ec660addff37151218..8eea81fefc04a35e7acb1f76c7c739179facc172 100644 index 50d2352dd2dae59eec718d889b0790e87b193d97..2b7585c0dd4a9ee86aaefde606ef814bc6bebecc 100644
--- a/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -7053,9 +7053,12 @@ test("unit_tests") { @@ -7027,9 +7027,12 @@ test("unit_tests") {
"//chrome/notification_helper", "//chrome/notification_helper",
] ]
@ -63,7 +63,7 @@ index 146d6299ecb886c3e7f0e2ec660addff37151218..8eea81fefc04a35e7acb1f76c7c73917
"//chrome//services/util_win:unit_tests", "//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests", "//chrome/app:win_unit_tests",
@@ -8076,6 +8079,10 @@ test("unit_tests") { @@ -8051,6 +8054,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
] ]
@ -74,7 +74,7 @@ index 146d6299ecb886c3e7f0e2ec660addff37151218..8eea81fefc04a35e7acb1f76c7c73917
sources += [ sources += [
# The importer code is not used on Android. # The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc", "../common/importer/firefox_importer_utils_unittest.cc",
@@ -8149,7 +8156,6 @@ test("unit_tests") { @@ -8118,7 +8125,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target. # Non-android deps for "unit_tests" target.
deps += [ deps += [
"../browser/screen_ai:screen_ai_install_state", "../browser/screen_ai:screen_ai_install_state",

View file

@ -0,0 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 9 Aug 2024 22:39:47 +0900
Subject: build: expose webplugininfo interface to electron
Allows implementing electron::mojom::ElectronPluginInfoHost interface
which provides plugin details between browser<->renderer.
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 0b7e43edf99ce901141ca9271f7130658525fd23..88dbc54c6b7d857cc0c572eb831d457348af236c 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -370,6 +370,7 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",
+ "//electron/shell/common:plugin",
]
sources = [

View file

@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken. TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index c837c2dd1109ed930a22b7b6f1b8088b5cf06f1b..f2f8053be9074fd0e8a6e94b16aa6447bb5d9803 100644 index ca13a23e0531e6f40e130c1294b44c98fdb2c0d7..b146b1c93f809667c730c2587e180a29718fc9e3 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8852,6 +8852,7 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -8846,6 +8846,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type, last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(), params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features, params->frame_name, params->disposition, *params->features,
@ -66,7 +66,7 @@ index 37a00f8d520e6043faa9b202e2f7a3d7a0794664..08b56afaa591137aafc4aad38da84361
// Operation result when the renderer asks the browser to create a new window. // 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 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index dc4110d8878b83c537f8ba32ecbf445ff766341f..83c3de7a2d65310faa4b52d9f5949901206dc15f 100644 index 7f43e745f4d9764b720a976d3343637ec9457415..113262c96869f766c80c4485e55902accc43c239 100644
--- a/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc
@@ -750,6 +750,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -750,6 +750,8 @@ bool ContentBrowserClient::CanCreateWindow(
@ -79,10 +79,10 @@ index dc4110d8878b83c537f8ba32ecbf445ff766341f..83c3de7a2d65310faa4b52d9f5949901
bool opener_suppressed, bool opener_suppressed,
bool* no_javascript_access) { bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index d4d906bdaac87eee0351612584473684e4fcc389..793c55425396998f7dfeba3c7dc0e59e90ef3874 100644 index 4c982411a8508270ec93b444ae999f7e51973aaa..9aff128608ca60c2031b131eff59622e74b5a55a 100644
--- a/content/public/browser/content_browser_client.h --- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h
@@ -189,6 +189,7 @@ class NetworkService; @@ -190,6 +190,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient; class TrustedURLLoaderHeaderClient;
} // namespace mojom } // namespace mojom
struct ResourceRequest; struct ResourceRequest;
@ -90,7 +90,7 @@ index d4d906bdaac87eee0351612584473684e4fcc389..793c55425396998f7dfeba3c7dc0e59e
} // namespace network } // namespace network
namespace sandbox { namespace sandbox {
@@ -1285,6 +1286,8 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -1286,6 +1287,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name, const std::string& frame_name,
WindowOpenDisposition disposition, WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features, const blink::mojom::WindowFeatures& features,
@ -100,7 +100,7 @@ index d4d906bdaac87eee0351612584473684e4fcc389..793c55425396998f7dfeba3c7dc0e59e
bool opener_suppressed, bool opener_suppressed,
bool* no_javascript_access); bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 0339011bd020ef28ce6edd7b6e02597df4401fab..ef00a3636e7cbbff08365f140da58fef6522005c 100644 index 8b8ad58fede66aa4423fe1b17637bb26f54cd862..4998328a01525a12fa54ca5b9bf85f518c64de83 100644
--- a/content/public/browser/web_contents_delegate.cc --- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc
@@ -30,6 +30,17 @@ namespace content { @@ -30,6 +30,17 @@ namespace content {
@ -122,7 +122,7 @@ index 0339011bd020ef28ce6edd7b6e02597df4401fab..ef00a3636e7cbbff08365f140da58fef
WebContents* source, WebContents* source,
const OpenURLParams& params, const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 138761070b63c16ea440f9eee98fe1139e7c0b09..f7bfa43693cff1a55a1e59950f1ecb06d67b8f3a 100644 index 00c51ef739d8b369f67112a341fa8b8947d8aa90..38ab9071bdab02e855f59c93941da1153cd06d88 100644
--- a/content/public/browser/web_contents_delegate.h --- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -130,10 +130,10 @@ index 138761070b63c16ea440f9eee98fe1139e7c0b09..f7bfa43693cff1a55a1e59950f1ecb06
#include "build/build_config.h" #include "build/build_config.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
+#include "content/common/frame.mojom.h" +#include "content/common/frame.mojom.h"
#include "content/public/browser/back_forward_transition_animation_manager.h"
#include "content/public/browser/eye_dropper.h" #include "content/public/browser/eye_dropper.h"
#include "content/public/browser/fullscreen_types.h" #include "content/public/browser/fullscreen_types.h"
#include "content/public/browser/invalidate_type.h" @@ -359,6 +360,13 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -358,6 +359,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config, const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace); SessionStorageNamespace* session_storage_namespace);
@ -148,10 +148,10 @@ index 138761070b63c16ea440f9eee98fe1139e7c0b09..f7bfa43693cff1a55a1e59950f1ecb06
// typically happens when popups are created. // typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents, virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e6172e2b3ccd9758e86498fe8c722af9e0ddb8a3..833761e8401c4f521614e438224c9f2ab691933f 100644 index ccaa4b368f7831edae409f68765c496c70ed4889..ee688da4100412ff58bffa1b266a4c823486dd56 100644
--- a/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -6697,6 +6697,10 @@ WebView* RenderFrameImpl::CreateNewWindow( @@ -6701,6 +6701,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(), request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack()); GetWebFrame()->IsAdScriptInStack());

View file

@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore diff --git a/.gitignore b/.gitignore
index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f1c9d885e 100644 index bad75a2efe8bed1a1248ada48644dc54f6002d33..e0db50432af1084ff829f28045cd89dc82f586f4 100644
--- a/.gitignore --- a/.gitignore
+++ b/.gitignore +++ b/.gitignore
@@ -213,6 +213,7 @@ vs-chromium-project.txt @@ -213,6 +213,7 @@ vs-chromium-project.txt

View file

@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
actions in the non-client caption area. actions in the non-client caption area.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index d510a52222f2f61df6040976c0d7f4ac4811b133..50fc51f2bc923de2f7faf46056d55e758c4e8232 100644 index b1302e587fa2f00c632506cbe3272306c0629dff..9899b5faa573b8fc8d1bdd87aef56e147e554eee 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1276,6 +1276,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged( @@ -1277,6 +1277,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds); window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
} }
@ -22,10 +22,10 @@ index d510a52222f2f61df6040976c0d7f4ac4811b133..50fc51f2bc923de2f7faf46056d55e75
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() { DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
return new DesktopNativeCursorManagerWin(); return new DesktopNativeCursorManagerWin();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index e5b304f90ef8f005921a646219aa6e8f032b575c..f5bb3f3e9bb16d25f781747de5b70afffc1a7261 100644 index 531c73e496ab8ba9078ccbe2ad07fcd7814215ac..fd363fc3de773dfe6775d3ff084ebf8091efbce8 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -263,6 +263,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -264,6 +264,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void HandleWindowSizeUnchanged() override; void HandleWindowSizeUnchanged() override;
void HandleWindowScaleFactorChanged(float window_scale_factor) override; void HandleWindowScaleFactorChanged(float window_scale_factor) override;
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override; void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
@ -34,10 +34,10 @@ index e5b304f90ef8f005921a646219aa6e8f032b575c..f5bb3f3e9bb16d25f781747de5b70aff
Widget* GetWidget(); Widget* GetWidget();
const Widget* GetWidget() const; const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 0b199e2df281aed6224787aaf467ed95ddf61f8f..a7f5a0cebcd8834fd39badbac7740baad1fc0456 100644 index 0bfa27046743e0ef92319aa9c8e1ff59e47d2e9b..8f5c3689c2f5dc4803fb0a816143484bf305d189 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -3122,15 +3122,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, @@ -3123,15 +3123,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE); SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or // We must let Windows handle the caption buttons if it's drawing them, or
// they won't work. // they won't work.

View file

@ -155,10 +155,10 @@ index 7350c38fa03a7f3176e0727631863eba470683ca..3792bc743d4eeea5305a69f9a2dab9e2
} }
content::WebContents* CreateCustomWebContents( content::WebContents* CreateCustomWebContents(
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index 4eb165e1f38e389d9d4e4495e630b7a67b010e95..7c93f3c1a4e351669eca4a58b992ba11f784499d 100644 index 9fdb1e276a7712c5cd99829b4e0a6868e6608420..5b42be1a1c61b3ce2557e8e1854642c701381d38 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -180,14 +180,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -181,14 +181,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance, content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type, content::mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,
@ -176,7 +176,7 @@ index 4eb165e1f38e389d9d4e4495e630b7a67b010e95..7c93f3c1a4e351669eca4a58b992ba11
java_gurl); java_gurl);
} }
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index eb1ac072d3a032f7af5afc92aeef5c5415dce7a4..24f36918eda4c9197e45a811692c5027620602ed 100644 index 215d105b5f4b19c6f0dc4e15427af07bcf8f009f..f337a2b1774b08ce608dcc9007cca0e6025501ee 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -81,8 +81,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { @@ -81,8 +81,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@ -232,7 +232,7 @@ index 6037b2a0612448e20150cdaec7cddbcd9b5141c5..7a2cda01e910b2b89a74ef95fea4866d
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents( static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance, opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index ef00a3636e7cbbff08365f140da58fef6522005c..685a8007072638ed8a21974e162a44900a2bdc80 100644 index 4998328a01525a12fa54ca5b9bf85f518c64de83..7119de8f574e81d90d17a60baec24a6c3137300a 100644
--- a/content/public/browser/web_contents_delegate.cc --- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc
@@ -140,8 +140,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -140,8 +140,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@ -246,10 +246,10 @@ index ef00a3636e7cbbff08365f140da58fef6522005c..685a8007072638ed8a21974e162a4490
} }
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index f7bfa43693cff1a55a1e59950f1ecb06d67b8f3a..843111cdfd1364bae993fababd3fdea8334f5289 100644 index 38ab9071bdab02e855f59c93941da1153cd06d88..5394297482ab10a9463cb9cc9791a1e71899a459 100644
--- a/content/public/browser/web_contents_delegate.h --- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h
@@ -337,8 +337,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -338,8 +338,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance, SiteInstance* source_site_instance,
mojom::WindowContainerType window_container_type, mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,
@ -358,7 +358,7 @@ index 602ce992279f95d9a5926cb7bf5db485215d331f..44cf33b9602581b3b46d54789933b209
->options() ->options()
->block_new_web_contents(); ->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index a0b515b6e8ac360063790c56f8912051c506f6b8..d1cb266f888548ab13b676c8443c4a14622165b3 100644 index e1be942c74a4289773b279ee71ac1370600f6529..ace61774dd7bc0a7472cbdf96f4b50aae9f91e1d 100644
--- a/ui/views/controls/webview/web_dialog_view.cc --- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -448,8 +448,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( @@ -448,8 +448,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@ -372,10 +372,10 @@ index a0b515b6e8ac360063790c56f8912051c506f6b8..d1cb266f888548ab13b676c8443c4a14
return delegate_->HandleShouldOverrideWebContentsCreation(); return delegate_->HandleShouldOverrideWebContentsCreation();
return false; return false;
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index e4dd6b6acab981a3c7f1bd354932cbf57281809e..a42e4aa7f8195130b7374272f01989754633a1b6 100644 index 77b903f2c4adcc5a5aec6de9fa98828931eb0f51..a991767546370b359cee3593f8a7ab2dd45296eb 100644
--- a/ui/views/controls/webview/web_dialog_view.h --- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h
@@ -165,8 +165,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, @@ -166,8 +166,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance, content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type, content::mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,

View file

@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null. Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 692ea6ab585cf26befd5f0d2b4aa450a5506a68c..d510a52222f2f61df6040976c0d7f4ac4811b133 100644 index 9b0f777a31e370eee55c28e166fe99e3b18d09f2..b1302e587fa2f00c632506cbe3272306c0629dff 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -581,7 +581,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -582,7 +582,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
void DesktopWindowTreeHostWin::SetAspectRatio( void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio, const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) { const gfx::Size& excluded_margin) {
@ -19,10 +19,10 @@ index 692ea6ab585cf26befd5f0d2b4aa450a5506a68c..d510a52222f2f61df6040976c0d7f4ac
excluded_margin); excluded_margin);
} }
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 6bc81c605948eca2aa05089a939e3bd2ab79976b..73f62b38d4595e9dd3befba196756b311266013d 100644 index a3ff3cdc3f86fa54bd94bad74977fd3929f98330..6e51277c4d2e070fdcc04a7055c0fd23260e2507 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -959,8 +959,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, @@ -960,8 +960,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio, void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) { const gfx::Size& excluded_margin) {

View file

@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work. done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc 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 998edbdf1e2f0e96f349d9c181eb98cc2b82713c..e375fdb171c059baa3e707edcb95523d63239528 100644 index a9c3476669853ff87c699ddc82fa465ed3924eb1..9469c6be9f58b2805d0bfafa189785264ad839c5 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -168,6 +168,7 @@ @@ -168,6 +168,7 @@
@ -23,7 +23,7 @@ index 998edbdf1e2f0e96f349d9c181eb98cc2b82713c..e375fdb171c059baa3e707edcb95523d
#include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1832,6 +1833,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, @@ -1843,6 +1844,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale( web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor); prefs.default_maximum_page_scale_factor);

View file

@ -140,17 +140,20 @@ index e0cdc785d2557bc79bde98728c23c239ed8d0961..74e0acbea1e0c18a6ac8971170efc945
// JavaScript from chrome and chrome-untrusted pages. The resource URLs are // JavaScript from chrome and chrome-untrusted pages. The resource URLs are
diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc
index b6dd7405a5c9275ab699d4b347759427b30ef594..253918a2e54c98ce0075bce4e1a52134032ce367 100644 index 61c8b54bc5a9ea59c90e8627ab01745e0c328382..f9521b7aac19bf3994517906b85fc92800b18003 100644
--- a/content/browser/code_cache/generated_code_cache_browsertest.cc --- a/content/browser/code_cache/generated_code_cache_browsertest.cc
+++ b/content/browser/code_cache/generated_code_cache_browsertest.cc +++ b/content/browser/code_cache/generated_code_cache_browsertest.cc
@@ -8,13 +8,18 @@ @@ -11,17 +11,22 @@
#include "content/browser/code_cache/generated_code_cache.h" #include "base/time/time.h"
#include "content/browser/code_cache/generated_code_cache_context.h" #include "content/browser/code_cache/generated_code_cache_context.h"
#include "content/browser/renderer_host/code_cache_host_impl.h" #include "content/browser/renderer_host/code_cache_host_impl.h"
+#include "content/browser/storage_partition_impl.h" +#include "content/browser/storage_partition_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/renderer.mojom.h"
+#include "content/common/url_schemes.h" +#include "content/common/url_schemes.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_test.h" #include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
@ -158,11 +161,12 @@ index b6dd7405a5c9275ab699d4b347759427b30ef594..253918a2e54c98ce0075bce4e1a52134
#include "content/public/test/content_browser_test_utils.h" #include "content/public/test/content_browser_test_utils.h"
+#include "content/public/test/test_browser_context.h" +#include "content/public/test/test_browser_context.h"
#include "content/shell/browser/shell.h" #include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
+#include "content/test/test_content_client.h" +#include "content/test/test_content_client.h"
#include "net/dns/mock_host_resolver.h" #include "net/dns/mock_host_resolver.h"
#include "third_party/blink/public/common/features.h" #include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/page/v8_compile_hints_histograms.h" #include "third_party/blink/public/common/page/v8_compile_hints_histograms.h"
@@ -23,6 +28,8 @@ namespace content { @@ -30,6 +35,8 @@ namespace content {
namespace { namespace {
@ -171,7 +175,7 @@ index b6dd7405a5c9275ab699d4b347759427b30ef594..253918a2e54c98ce0075bce4e1a52134
bool SupportsSharedWorker() { bool SupportsSharedWorker() {
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
// SharedWorkers are not enabled on Android. https://crbug.com/154571 // SharedWorkers are not enabled on Android. https://crbug.com/154571
@@ -714,4 +721,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) { @@ -875,4 +882,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) {
} }
} }

View file

@ -84,10 +84,10 @@ index 31a2a14a95540477297943df9b09b1e4659a884d..c02a81b1bd14a300dbbb47ad7aac2d2d
DCHECK(GetZygoteForLaunch()); DCHECK(GetZygoteForLaunch());
// Environment variables could be supported in the future, but are not // Environment variables could be supported in the future, but are not
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index 24f86e68b2df0a084ae2151d5cd14a356d067f94..c424edfb7c65b9c5ae542a405446f0c15fce8995 100644 index f1a415f7bd56ece5ab07d2408dbfddf658b45ff3..49bf8f75583cc7b2de415f4ebb42757366a7b51d 100644
--- a/content/browser/child_process_launcher_helper_mac.cc --- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc +++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -123,7 +123,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -110,7 +110,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
'mojo', base::MachRendezvousPort(endpoint.TakeMachReceiveRight()))); 'mojo', base::MachRendezvousPort(endpoint.TakeMachReceiveRight())));
options->environment = delegate_->GetEnvironment(); options->environment = delegate_->GetEnvironment();
@ -97,7 +97,7 @@ index 24f86e68b2df0a084ae2151d5cd14a356d067f94..c424edfb7c65b9c5ae542a405446f0c1
options->disclaim_responsibility = delegate_->DisclaimResponsibility(); options->disclaim_responsibility = delegate_->DisclaimResponsibility();
options->enable_cpu_security_mitigations = options->enable_cpu_security_mitigations =
delegate_->EnableCpuSecurityMitigations(); delegate_->EnableCpuSecurityMitigations();
@@ -193,6 +194,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -176,6 +177,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe)); base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe));
} }

View file

@ -596,10 +596,10 @@ index d7deccb6e6ec63592cd840a05403f402238e645e..4c4356b8def15ed3156db38d0a593b83
// Sends the created child window to the browser process so that it can be // Sends the created child window to the browser process so that it can be
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index d26282108d32f604730cc0101c5b346ce90c7f6c..2545154a6111c6283b2c2262e7d7747533c41dbd 100644 index adcbd1bae0af1142fc2152f9a4148b499934180f..6556352329a9f485059360187abda12d7d431dff 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -36,6 +36,7 @@ struct RootCompositorFrameSinkParams { @@ -38,6 +38,7 @@ struct RootCompositorFrameSinkParams {
bool send_swap_size_notifications = false; bool send_swap_size_notifications = false;
// Disables begin frame rate limiting for the display compositor. // Disables begin frame rate limiting for the display compositor.
bool disable_frame_rate_limit = false; bool disable_frame_rate_limit = false;

View file

@ -112,7 +112,7 @@ index 3450c15835d8b792f37764f6edc4a4560be435ef..b1034aa141d6121f8e1524fb34a28a04
string mime_type; string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 5cf4d84e59fbe1a0d0dd2445294c51ec5773c258..415bdaa464643c9dd98f23bede7d59fc3a958346 100644 index 52f90133c5150e64cf88e837641ea159c74c876a..c77876f0affb091a020cf96c497d5aa800026393 100644
--- a/services/network/url_loader.cc --- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc +++ b/services/network/url_loader.cc
@@ -712,6 +712,7 @@ URLLoader::URLLoader( @@ -712,6 +712,7 @@ URLLoader::URLLoader(

View file

@ -14,10 +14,10 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
this use case in mind currently. this use case in mind currently.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 16b2e484757c686f6cfb5b2b014b406c3e0d21ae..ff9770991c6d1ceec19ce2e2f199475f5eaddada 100644 index 04b1419df5769716de7669b67e7a7f32546813c6..78c39f1659fed684dcaa3abcca9bd8592f4ed94f 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -906,13 +906,13 @@ void HWNDMessageHandler::FrameTypeChanged() { @@ -907,13 +907,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
void HWNDMessageHandler::PaintAsActiveChanged() { void HWNDMessageHandler::PaintAsActiveChanged() {
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
@ -33,7 +33,7 @@ index 16b2e484757c686f6cfb5b2b014b406c3e0d21ae..ff9770991c6d1ceec19ce2e2f199475f
} }
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
@@ -2251,17 +2251,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, @@ -2252,17 +2252,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
if (IsVisible()) if (IsVisible())
delegate_->SchedulePaint(); delegate_->SchedulePaint();

View file

@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow. BrowserWindow.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 73f62b38d4595e9dd3befba196756b311266013d..0b199e2df281aed6224787aaf467ed95ddf61f8f 100644 index 6e51277c4d2e070fdcc04a7055c0fd23260e2507..0bfa27046743e0ef92319aa9c8e1ff59e47d2e9b 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -3672,14 +3672,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, @@ -3673,14 +3673,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size); delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size);

View file

@ -23,7 +23,7 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 16081bce712124eac0cc5a12dbf16bbfa956613f..0b3532608977b618f6d21b90ef372d2cb4b877b2 100644 index d8424716274ca958bdfee87ac39a2cbbd1789a20..ba42acb1f85ae96a39654aaf61e7c5f11a8fb500 100644
--- a/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -10737,6 +10737,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { @@ -10737,6 +10737,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {

View file

@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash. or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index 1830f8b4066fab1586cd1a560c73178a0ddaee2d..58ebde85c37cd5650dd55f993631afc249be300c 100644 index 7e9c031b514bc59c4648587677dc5af0d1156a6e..6abb8e9d9c2ed8a87202aff9794cc4045db31ea7 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts --- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -1015,7 +1015,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { @@ -1029,7 +1029,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
dataArray = [result.dataToSave]; dataArray = [result.dataToSave];
} }
@ -32,7 +32,7 @@ index 1830f8b4066fab1586cd1a560c73178a0ddaee2d..58ebde85c37cd5650dd55f993631afc2
const fileName = this.attachments_[index].name; const fileName = this.attachments_[index].name;
chrome.fileSystem.chooseEntry( chrome.fileSystem.chooseEntry(
{type: 'saveFile', suggestedName: fileName}, {type: 'saveFile', suggestedName: fileName},
@@ -1037,6 +1045,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { @@ -1051,6 +1059,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if> // </if>
}); });
}); });
@ -40,7 +40,7 @@ index 1830f8b4066fab1586cd1a560c73178a0ddaee2d..58ebde85c37cd5650dd55f993631afc2
} }
/** /**
@@ -1160,7 +1169,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { @@ -1174,7 +1183,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
} }
// Create blob before callback to avoid race condition. // Create blob before callback to avoid race condition.
@ -56,7 +56,7 @@ index 1830f8b4066fab1586cd1a560c73178a0ddaee2d..58ebde85c37cd5650dd55f993631afc2
chrome.fileSystem.chooseEntry( chrome.fileSystem.chooseEntry(
{ {
type: 'saveFile', type: 'saveFile',
@@ -1185,6 +1202,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { @@ -1199,6 +1216,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if> // </if>
}); });
}); });

View file

@ -75,10 +75,10 @@ index 5d692d88c9f95845c97f848fd421916c52bd2416..b0131582dc0a308e1525b12b554dd03e
PictureInPictureOcclusionTracker* PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 704655e71dc3f2b53845cc3567fb313aa29303e2..487f707475f442be6327ed51091dad51e02163f6 100644 index 8e96d85a16ce8b5e679df52860db6773c76b49f8..0e3a54d61bc7ee21484bb7320d6744dc6be37c64 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -348,11 +348,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create( @@ -349,11 +349,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
#endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN)

View file

@ -16,10 +16,10 @@ MainFrameImpl is not null.
Upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/5756619 Upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/5756619
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc 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 e375fdb171c059baa3e707edcb95523d63239528..d572195a972ecd59a83acabdc8e8ed3d7f9d00a2 100644 index 9469c6be9f58b2805d0bfafa189785264ad839c5..4d42d8d676b7f12abb41c1de98f5f6f0f8d88688 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -4071,11 +4071,12 @@ bool WebViewImpl::IsFencedFrameRoot() const { @@ -4084,11 +4084,12 @@ bool WebViewImpl::IsFencedFrameRoot() const {
} }
void WebViewImpl::SetSupportsDraggableRegions(bool supports_draggable_regions) { void WebViewImpl::SetSupportsDraggableRegions(bool supports_draggable_regions) {

View file

@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
for opaque frameless windows even with that block commented out. for opaque frameless windows even with that block commented out.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index a7f5a0cebcd8834fd39badbac7740baad1fc0456..16b2e484757c686f6cfb5b2b014b406c3e0d21ae 100644 index 8f5c3689c2f5dc4803fb0a816143484bf305d189..04b1419df5769716de7669b67e7a7f32546813c6 100644
--- a/ui/views/win/hwnd_message_handler.cc --- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -1730,7 +1730,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { @@ -1731,7 +1731,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
0); 0);

View file

@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed. This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index ca9e9f92c397e956b71e36572499ac161552e304..b61644b093911bbefdc95562ff25500136a8055d 100644 index 8e361bf829513502d0c014eeb73c03258d7876db..7392e167b083c733657c91209b7e1740737f688e 100644
--- a/ui/views/controls/menu/menu_controller.cc --- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc
@@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent, @@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent,

View file

@ -20,10 +20,10 @@ index d8e55dd35c7bcfc341585b901ed8dc261d03870a..eaa3b5fe6320a746298c45c799ef4b29
} }
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 793c55425396998f7dfeba3c7dc0e59e90ef3874..31402aa6a863fb32f9ea0b50582570f080fedfaa 100644 index 9aff128608ca60c2031b131eff59622e74b5a55a..64c2b82f58f01f2e3044ca6f2ab212384302f380 100644
--- a/content/public/browser/content_browser_client.h --- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h
@@ -329,6 +329,11 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -330,6 +330,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default; virtual ~ContentBrowserClient() = default;

View file

@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 7e63df4b7dab20d1a0b6b0c906ed3fc297c27793..d6105f6ac27b7059c49f9d429b0cddd9ce51780d 100755 index 29fa96771446b8e29ee2b3df6450dcd4a2a01732..1d464a097e0c4604a30dce3407c94101db394f30 100755
--- a/tools/clang/scripts/update.py --- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -304,6 +304,8 @@ def GetDefaultHostOs(): @@ -304,6 +304,8 @@ def GetDefaultHostOs():

View file

@ -362,10 +362,10 @@ index 2aa2bd8d68c08359461254875f02fc37f8693058..6ba759f96ffff4d31509248bb7add047
bool shouldShowWindowTitle = YES; bool shouldShowWindowTitle = YES;
if (_bridge) if (_bridge)
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 897e8a7d807fa7e6d5b461b5413483114871bfbb..45f292bad3d69073e52de2d4175c6126898ca7a1 100644 index f511bdc7fab3eb36b4a3590922c20212cf6aad34..d5f934512f3acd5a323f8838844a6bb7f3e64ace 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -635,10 +635,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -637,10 +637,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early. // this should be treated as an error and caught early.
CHECK(bridged_view_); CHECK(bridged_view_);
@ -1592,10 +1592,10 @@ index 0ab5fbd2a81d8860c73f29c08896f6755b5ca5fa..9400c6c7698258ff2834c550fb8901b4
// enough. // enough.
return PlatformFontMac::SystemFontType::kGeneral; return PlatformFontMac::SystemFontType::kGeneral;
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index e9d6ed14f532029aa50f342d4f79bdd3bdaf8429..20fde4a3ebaf1bc9a4a054cad625e7bff07aadf8 100644 index d9ba2d8c885e0272b5705276b700a62cfa63412b..c659348a120caeca83d434b5f67905022b0fe195 100644
--- a/ui/views/BUILD.gn --- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn
@@ -718,6 +718,7 @@ component("views") { @@ -721,6 +721,7 @@ component("views") {
"IOSurface.framework", "IOSurface.framework",
"QuartzCore.framework", "QuartzCore.framework",
] ]
@ -1603,8 +1603,8 @@ index e9d6ed14f532029aa50f342d4f79bdd3bdaf8429..20fde4a3ebaf1bc9a4a054cad625e7bf
} }
if (is_win) { if (is_win) {
@@ -1147,6 +1148,8 @@ source_set("test_support") { @@ -1151,6 +1152,8 @@ source_set("test_support") {
"//testing/gtest", "//ui/base/mojom:mojom",
] ]
+ configs += ["//electron/build/config:mas_build"] + configs += ["//electron/build/config:mas_build"]

View file

@ -10,7 +10,7 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 812d7e0afa917cde3fecdb880ae932e04a650a60..4d5a49677bea80375453ffb9a334cdc50477dee0 100644 index 57ba880f320cfd8e5655f097f4408cfd1ed58174..80b602ad8cd0c8042d27484dc192abcfb628ab66 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( @@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(

View file

@ -1,219 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 20 Sep 2018 17:46:17 -0700
Subject: pepper plugin support
This tweaks Chrome's pepper flash and PDF plugin support to make it
usable from Electron.
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
index 46513bf122445f822917a1a80d5d9079f288e1b4..7becf2e72ca677335dbd241fa0fef30768a3fc28 100644
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
@@ -12,17 +12,21 @@
#include <stddef.h>
#include "base/task/sequenced_task_runner.h"
+#if 0
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pepper_permission_util.h"
+#endif
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_view_host.h"
+#if 0
#include "extensions/buildflags/buildflags.h"
+#endif
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/host_message_context.h"
@@ -31,12 +35,11 @@
#include "ppapi/shared_impl/file_system_util.h"
#include "storage/browser/file_system/isolated_context.h"
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if 0
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
-#endif
namespace {
@@ -46,6 +49,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = {
};
} // namespace
+#endif
// static
PepperIsolatedFileSystemMessageFilter*
@@ -69,11 +73,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter(
const base::FilePath& profile_directory,
const GURL& document_url,
ppapi::host::PpapiHost* ppapi_host)
+#if 0
: render_process_id_(render_process_id),
profile_directory_(profile_directory),
document_url_(document_url) {
for (size_t i = 0; i < std::size(kPredefinedAllowedCrxFsOrigins); ++i)
allowed_crxfs_origins_.insert(kPredefinedAllowedCrxFsOrigins[i]);
+#else
+ : profile_directory_(profile_directory),
+ document_url_(document_url) {
+#endif
}
PepperIsolatedFileSystemMessageFilter::
@@ -98,6 +107,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived(
return PP_ERROR_FAILED;
}
+#if 0
Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
ProfileManager* profile_manager = g_browser_process->profile_manager();
@@ -122,6 +132,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) {
return storage::IsolatedContext::ScopedFSHandle();
#endif
}
+#endif
int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
ppapi::host::HostMessageContext* context,
@@ -130,7 +141,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID:
break;
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX:
- return OpenCrxFileSystem(context);
+ return PP_ERROR_NOTSUPPORTED;
}
NOTREACHED_IN_MIGRATION();
context->reply_msg =
@@ -138,6 +149,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
return PP_ERROR_FAILED;
}
+#if 0
int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
ppapi::host::HostMessageContext* context) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -178,3 +190,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
return PP_ERROR_NOTSUPPORTED;
#endif
}
+#endif
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
index 716f5f9abe27a4411f7cc47c37d80d9a72099369..77a5cd69317db2c02a4ca75b91cea9405ea99de5 100644
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
@@ -20,7 +20,9 @@
#include "storage/browser/file_system/isolated_context.h"
#include "url/gurl.h"
+#if 0
class Profile;
+#endif
namespace content {
class BrowserPpapiHost;
@@ -59,6 +61,7 @@ class PepperIsolatedFileSystemMessageFilter
~PepperIsolatedFileSystemMessageFilter() override;
+#if 0
Profile* GetProfile();
// Returns filesystem id of isolated filesystem if valid, or empty string
@@ -66,18 +69,23 @@ class PepperIsolatedFileSystemMessageFilter
// allows access on that thread.
storage::IsolatedContext::ScopedFSHandle CreateCrxFileSystem(
Profile* profile);
+#endif
int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context,
PP_IsolatedFileSystemType_Private type);
+#if 0
int32_t OpenCrxFileSystem(ppapi::host::HostMessageContext* context);
const int render_process_id_;
+#endif
// Keep a copy from original thread.
const base::FilePath profile_directory_;
const GURL document_url_;
+#if 0
// Set of origins that can use CrxFs private APIs from NaCl.
std::set<std::string> allowed_crxfs_origins_;
+#endif
};
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_
diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
index 8687c49c7b8b96b1d51eae1a482154c21bb7e20c..983ef9a013184344514b69e8ef2a48a75e67ed01 100644
--- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
+++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
@@ -5,7 +5,9 @@
#include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h"
#include "base/check_op.h"
+#if 0
#include "chrome/renderer/pepper/pepper_uma_host.h"
+#endif
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
@@ -33,6 +35,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
if (!host_->IsValidInstance(instance))
return nullptr;
+#if 0
// Permissions for the following interfaces will be checked at the
// time of the corresponding instance's method calls. Currently these
// interfaces are available only for whitelisted apps which may not have
@@ -42,6 +45,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
return std::make_unique<PepperUMAHost>(host_, instance, resource);
}
}
+#endif
return nullptr;
}
diff --git a/chrome/renderer/pepper/pepper_helper.h b/chrome/renderer/pepper/pepper_helper.h
index 3270fecaeae81ff98995268613cbe4f834195b53..9b8156a8e188f97647288c96d664a2d733e02afd 100644
--- a/chrome/renderer/pepper/pepper_helper.h
+++ b/chrome/renderer/pepper/pepper_helper.h
@@ -5,11 +5,13 @@
#ifndef CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_
#define CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_
+#include "base/component_export.h"
#include "content/public/renderer/render_frame_observer.h"
// This class listens for Pepper creation events from the RenderFrame and
// attaches the parts required for Chrome-specific plugin support.
-class PepperHelper : public content::RenderFrameObserver {
+class COMPONENT_EXPORT(PEPPER_FLASH) PepperHelper
+ : public content::RenderFrameObserver {
public:
explicit PepperHelper(content::RenderFrame* render_frame);
diff --git a/ppapi/buildflags/buildflags.gni b/ppapi/buildflags/buildflags.gni
index 0bc0e153dff7ef5c093dce4f73b709ac36024d63..fba1a83be000ed58170ff800be1b43862f7d3359 100644
--- a/ppapi/buildflags/buildflags.gni
+++ b/ppapi/buildflags/buildflags.gni
@@ -19,7 +19,7 @@ declare_args() {
# Enables Pepper API (PPAPI) plugin support.
# The only remaining PPAPI plugin supported is NaCl and if is disabled
# we can disable PPAPI.
- enable_ppapi = enable_plugins && enable_nacl && !is_fuchsia
+ enable_ppapi = enable_plugins && !is_fuchsia
}
assert(enable_plugins || !enable_ppapi)

View file

@ -39,7 +39,7 @@ index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e405
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize)); kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 217926ddeca2b30c2a2a2696f4d16e2b57cec54d..704655e71dc3f2b53845cc3567fb313aa29303e2 100644 index 2ff9c6dbcb1f6010b39389d0d35662408dd53aaa..8e96d85a16ce8b5e679df52860db6773c76b49f8 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -17,9 +17,11 @@ @@ -17,9 +17,11 @@
@ -54,7 +54,7 @@ index 217926ddeca2b30c2a2a2696f4d16e2b57cec54d..704655e71dc3f2b53845cc3567fb313a
#include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
#include "chrome/browser/ui/views/overlay/close_image_button.h" #include "chrome/browser/ui/views/overlay/close_image_button.h"
@@ -60,7 +62,7 @@ @@ -61,7 +63,7 @@
#include "ui/aura/window.h" #include "ui/aura/window.h"
#endif #endif
@ -63,7 +63,7 @@ index 217926ddeca2b30c2a2a2696f4d16e2b57cec54d..704655e71dc3f2b53845cc3567fb313a
#include "chrome/browser/shell_integration_win.h" #include "chrome/browser/shell_integration_win.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
@@ -313,7 +315,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create( @@ -314,7 +316,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params)); overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady(); overlay_window->OnRootViewReady();

View file

@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success. This patch also fixes callback for manual user cancellation and success.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index 6845af7a3ee82dd2321c3097795f84a7daaccc86..ef8a4df14c190b6e157a7bc8cd402c09639f12c2 100644 index 1845333d12696aaabc798b3c58e34f8ef3f77e4e..664a43872d8016be7744bcf8d09f7b436862b949 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -998,7 +998,6 @@ if (is_win) { @@ -998,7 +998,6 @@ if (is_win) {
@ -925,10 +925,10 @@ index 63f170c95050416c595e62f4c460c4cd6b7dbd1c..157e3d046889f9c63fdf0fd5d503890f
virtual mojom::ResultCode OnError(); virtual mojom::ResultCode OnError();
diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm
index e89fd87753bad3c5663fa53f8dcc4542e7e307e5..2b433a0705234af6f9808ee741a9795d5e251785 100644 index 8bb26f3212d406419d957250adbaf4cb682df801..2345917c71ddf7fda171672b736724087fc873e8 100644
--- a/sandbox/policy/mac/sandbox_mac.mm --- a/sandbox/policy/mac/sandbox_mac.mm
+++ b/sandbox/policy/mac/sandbox_mac.mm +++ b/sandbox/policy/mac/sandbox_mac.mm
@@ -38,6 +38,10 @@ @@ -35,6 +35,10 @@
#include "sandbox/policy/mac/utility.sb.h" #include "sandbox/policy/mac/utility.sb.h"
#include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/mojom/sandbox.mojom.h"

View file

@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers. This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc 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 c7254525d2940f6f2603d208e26b2f22f75fe6f3..36f6e131ecb135d011b271d2cdbaebf5faeb883b 100644 index b2144b96a5ebcf16811756f8f9dff7d7625faee7..061cde41e69265871b8237c11ebd4c7323616c5f 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -609,7 +609,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) { @@ -623,7 +623,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
execution_context); execution_context);
} }
@ -21,7 +21,7 @@ index c7254525d2940f6f2603d208e26b2f22f75fe6f3..36f6e131ecb135d011b271d2cdbaebf5
v8::Local<v8::Context> context, v8::Local<v8::Context> context,
v8::Local<v8::Data> v8_host_defined_options, v8::Local<v8::Data> v8_host_defined_options,
v8::Local<v8::Value> v8_referrer_resource_url, v8::Local<v8::Value> v8_referrer_resource_url,
@@ -687,7 +689,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically( @@ -701,7 +703,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
} }
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties // https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
@ -30,7 +30,7 @@ index c7254525d2940f6f2603d208e26b2f22f75fe6f3..36f6e131ecb135d011b271d2cdbaebf5
v8::Local<v8::Module> module, v8::Local<v8::Module> module,
v8::Local<v8::Object> meta) { v8::Local<v8::Object> meta) {
v8::Isolate* isolate = context->GetIsolate(); v8::Isolate* isolate = context->GetIsolate();
@@ -730,9 +732,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) { @@ -744,9 +746,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
return os; return os;
} }
@ -40,7 +40,7 @@ index c7254525d2940f6f2603d208e26b2f22f75fe6f3..36f6e131ecb135d011b271d2cdbaebf5
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
// Set up garbage collection before setting up anything else as V8 may trigger // Set up garbage collection before setting up anything else as V8 may trigger
// GCs during Blink setup. // GCs during Blink setup.
@@ -752,9 +751,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { @@ -766,9 +765,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback); isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
isolate->SetSharedArrayBufferConstructorEnabledCallback( isolate->SetSharedArrayBufferConstructorEnabledCallback(
SharedArrayBufferConstructorEnabledCallback); SharedArrayBufferConstructorEnabledCallback);

View file

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Tue, 16 Apr 2019 11:25:08 -0700
Subject: unsandboxed_ppapi_processes_skip_zygote.patch
Unsandboxed ppapi processes should skip zygote.
diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
index 62cc6bca4793447c35b6ab435b461e57c2c59f4f..d9bb02a43b48d731d7e85537f255bc7ba1b128c9 100644
--- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
+++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "content/public/common/content_switches.h"
#include "sandbox/policy/mojom/sandbox.mojom.h"
+#include "sandbox/policy/switches.h"
#if BUILDFLAG(IS_WIN)
#include "sandbox/policy/win/sandbox_win.h"
@@ -56,6 +57,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::AllowWindowsFontsDir() {
ZygoteCommunication* PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
+ if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
+ return nullptr;
+ }
base::CommandLine::StringType plugin_launcher =
browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher);
if (!plugin_launcher.empty())

View file

@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value. `api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index f2f8053be9074fd0e8a6e94b16aa6447bb5d9803..812d7e0afa917cde3fecdb880ae932e04a650a60 100644 index b146b1c93f809667c730c2587e180a29718fc9e3..57ba880f320cfd8e5655f097f4408cfd1ed58174 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7999,6 +7999,17 @@ void RenderFrameHostImpl::EnterFullscreen( @@ -7993,6 +7993,17 @@ void RenderFrameHostImpl::EnterFullscreen(
} }
} }

View file

@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
https://chromium-review.googlesource.com/c/chromium/src/+/1954347 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 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index dd8f6b9a87a0cc5d2b1ba4867a4cc35ab961a3a2..ef247e62733ebe5058803a4c2a8866af300ba16c 100644 index 6dff7d89d284279025548af45d3d0712476c5e89..b9a5f2becbd5401579b25e5f7ffd6ae69902c282 100644
--- a/content/public/renderer/content_renderer_client.h --- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h
@@ -403,6 +403,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -407,6 +407,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread( virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {} v8::Local<v8::Context> context) {}

View file

@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
initialized. initialized.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index ef247e62733ebe5058803a4c2a8866af300ba16c..f020fb016cce18b480c86b53e4cbedf418637567 100644 index b9a5f2becbd5401579b25e5f7ffd6ae69902c282..dd1cea53202ed0422466dfd463b81977c2e96b57 100644
--- a/content/public/renderer/content_renderer_client.h --- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h
@@ -403,6 +403,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -407,6 +407,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread( virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {} v8::Local<v8::Context> context) {}

View file

@ -10,7 +10,7 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code. patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index 29a4e26a80820cb1faa32c49a747353db486ed3e..176c0307fbdb43ce67783d3832174d11e5e7c04b 100644 index 5e55f00f08603a23a1988688e6f54daf2f60c720..cca103c638a6a1fcc1dea69c2d65e07a88f49af1 100644
--- a/front_end/entrypoints/main/MainImpl.ts --- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts
@@ -748,6 +748,8 @@ export class MainImpl { @@ -748,6 +748,8 @@ export class MainImpl {

View file

@ -46,7 +46,7 @@ index 71a6c2c9c149116caa410d25aef4087774b81b44..ad8416ea2500f10aad31f25da96b235f
V8_INLINE static void* GetAlignedPointerFromInternalField( V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) { const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc diff --git a/src/api/api.cc b/src/api/api.cc
index 3510ae817e574801b70d81344ba9cc2019409615..b7c5b3d1eea16f3c113fccde01c50de5df272eee 100644 index 048375bb5d83da2802ea5244c5429ea2f34a2c29..c130f94a1bef089a33c8b57ba804e3201851c9fe 100644
--- a/src/api/api.cc --- a/src/api/api.cc
+++ b/src/api/api.cc +++ b/src/api/api.cc
@@ -6380,14 +6380,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) { @@ -6380,14 +6380,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {

View file

@ -29,7 +29,8 @@ env.PATH = `${env.PATH}${path.delimiter}${DEPOT_TOOLS}`;
const gnCheckDirs = [ const gnCheckDirs = [
'//electron:electron_lib', '//electron:electron_lib',
'//electron:electron_app', '//electron:electron_app',
'//electron/shell/common/api:mojo' '//electron/shell/common:mojo',
'//electron/shell/common:plugin'
]; ];
for (const dir of gnCheckDirs) { for (const dir of gnCheckDirs) {

View file

@ -41,9 +41,7 @@
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
#include "content/public/common/content_plugin_info.h" #include "content/public/common/content_plugin_info.h"
#include "ppapi/shared_impl/ppapi_permissions.h" #endif // BUILDFLAG(ENABLE_PLUGINS)
#include "ppapi/shared_impl/ppapi_switches.h" // nogncheck crbug.com/1125897
#endif // BUILDFLAG(ENABLE_PLUGINS)
namespace electron { namespace electron {
@ -180,7 +178,7 @@ void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
void ElectronContentClient::AddPlugins( void ElectronContentClient::AddPlugins(
std::vector<content::ContentPluginInfo>* plugins) { std::vector<content::ContentPluginInfo>* plugins) {
#if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_PDF_VIEWER) #if BUILDFLAG(ENABLE_PDF_VIEWER)
static constexpr char kPDFPluginExtension[] = "pdf"; static constexpr char kPDFPluginExtension[] = "pdf";
static constexpr char kPDFPluginDescription[] = "Portable Document Format"; static constexpr char kPDFPluginDescription[] = "Portable Document Format";
@ -195,7 +193,7 @@ void ElectronContentClient::AddPlugins(
pdf::kInternalPluginMimeType, kPDFPluginExtension, kPDFPluginDescription); pdf::kInternalPluginMimeType, kPDFPluginExtension, kPDFPluginDescription);
pdf_info.mime_types.push_back(pdf_mime_type); pdf_info.mime_types.push_back(pdf_mime_type);
plugins->push_back(pdf_info); plugins->push_back(pdf_info);
#endif // BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_PDF_VIEWER) #endif // BUILDFLAG(ENABLE_PDF_VIEWER)
} }
void ElectronContentClient::AddContentDecryptionModules( void ElectronContentClient::AddContentDecryptionModules(

View file

@ -205,7 +205,6 @@ std::string ElectronCrashReporterClient::GetUploadUrl() {
bool ElectronCrashReporterClient::EnableBreakpadForProcess( bool ElectronCrashReporterClient::EnableBreakpadForProcess(
const std::string& process_type) { const std::string& process_type) {
return process_type == switches::kRendererProcess || return process_type == switches::kRendererProcess ||
process_type == switches::kPpapiPluginProcess ||
process_type == switches::kZygoteProcess || process_type == switches::kZygoteProcess ||
process_type == switches::kGpuProcess || process_type == switches::kGpuProcess ||
process_type == switches::kUtilityProcess || process_type == "node"; process_type == switches::kUtilityProcess || process_type == "node";

View file

@ -97,7 +97,6 @@ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
// profiles. // profiles.
process_type == ::switches::kGpuProcess || process_type == ::switches::kGpuProcess ||
#endif #endif
process_type == ::switches::kPpapiPluginProcess ||
process_type == ::switches::kRendererProcess || process_type == ::switches::kRendererProcess ||
process_type == ::switches::kUtilityProcess; process_type == ::switches::kUtilityProcess;
} }

View file

@ -77,7 +77,6 @@
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/platform_handle.h" #include "mojo/public/cpp/system/platform_handle.h"
#include "ppapi/buildflags/buildflags.h"
#include "printing/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h"
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
#include "services/service_manager/public/cpp/interface_provider.h" #include "services/service_manager/public/cpp/interface_provider.h"

View file

@ -34,7 +34,6 @@
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" // nogncheck
#include "content/browser/site_instance_impl.h" // nogncheck #include "content/browser/site_instance_impl.h" // nogncheck
#include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/login_delegate.h" #include "content/public/browser/login_delegate.h"
@ -59,10 +58,9 @@
#include "extensions/browser/extension_navigation_ui_data.h" #include "extensions/browser/extension_navigation_ui_data.h"
#include "extensions/common/extension_id.h" #include "extensions/common/extension_id.h"
#include "mojo/public/cpp/bindings/binder_map.h" #include "mojo/public/cpp/bindings/binder_map.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "net/ssl/ssl_cert_request_info.h" #include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_private_key.h" #include "net/ssl/ssl_private_key.h"
#include "ppapi/buildflags/buildflags.h"
#include "ppapi/host/ppapi_host.h"
#include "printing/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h"
#include "services/device/public/cpp/geolocation/geolocation_system_permission_manager.h" #include "services/device/public/cpp/geolocation/geolocation_system_permission_manager.h"
#include "services/device/public/cpp/geolocation/location_provider.h" #include "services/device/public/cpp/geolocation/location_provider.h"
@ -86,6 +84,7 @@
#include "shell/browser/electron_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/browser/electron_browser_main_parts.h" #include "shell/browser/electron_browser_main_parts.h"
#include "shell/browser/electron_navigation_throttle.h" #include "shell/browser/electron_navigation_throttle.h"
#include "shell/browser/electron_plugin_info_host_impl.h"
#include "shell/browser/electron_speech_recognition_manager_delegate.h" #include "shell/browser/electron_speech_recognition_manager_delegate.h"
#include "shell/browser/electron_web_contents_utility_handler_impl.h" #include "shell/browser/electron_web_contents_utility_handler_impl.h"
#include "shell/browser/font_defaults.h" #include "shell/browser/font_defaults.h"
@ -117,6 +116,7 @@
#include "shell/common/logging.h" #include "shell/common/logging.h"
#include "shell/common/options_switches.h" #include "shell/common/options_switches.h"
#include "shell/common/platform_util.h" #include "shell/common/platform_util.h"
#include "shell/common/plugin.mojom.h"
#include "shell/common/thread_restrictions.h" #include "shell/common/thread_restrictions.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h" #include "third_party/blink/public/common/loader/url_loader_throttle.h"
@ -580,9 +580,6 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
} }
} }
void ElectronBrowserClient::DidCreatePpapiPlugin(
content::BrowserPpapiHost* host) {}
// attempt to get api key from env // attempt to get api key from env
std::string ElectronBrowserClient::GetGeolocationApiKey() { std::string ElectronBrowserClient::GetGeolocationApiKey() {
auto env = base::Environment::Create(); auto env = base::Environment::Create();
@ -1460,6 +1457,16 @@ void ElectronBrowserClient::
render_frame_host); render_frame_host);
}, },
&render_frame_host)); &render_frame_host));
associated_registry.AddInterface<mojom::ElectronPluginInfoHost>(
base::BindRepeating(
[](content::RenderFrameHost* render_frame_host,
mojo::PendingAssociatedReceiver<mojom::ElectronPluginInfoHost>
receiver) {
mojo::MakeSelfOwnedAssociatedReceiver(
std::make_unique<ElectronPluginInfoHostImpl>(),
std::move(receiver));
},
&render_frame_host));
#if BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PRINTING)
associated_registry.AddInterface<printing::mojom::PrintManagerHost>( associated_registry.AddInterface<printing::mojom::PrintManagerHost>(
base::BindRepeating( base::BindRepeating(

View file

@ -134,7 +134,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
content::SiteInstance* pending_site_instance) override; content::SiteInstance* pending_site_instance) override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line, void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override; int child_process_id) override;
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
std::string GetGeolocationApiKey() override; std::string GetGeolocationApiKey() override;
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings( content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
content::BrowserContext* context) override; content::BrowserContext* context) override;

View file

@ -0,0 +1,61 @@
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "shell/browser/electron_plugin_info_host_impl.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/common/content_constants.h"
#include "url/gurl.h"
#include "url/origin.h"
using content::PluginService;
using content::WebPluginInfo;
namespace electron {
ElectronPluginInfoHostImpl::ElectronPluginInfoHostImpl() = default;
ElectronPluginInfoHostImpl::~ElectronPluginInfoHostImpl() = default;
struct ElectronPluginInfoHostImpl::GetPluginInfo_Params {
GURL url;
url::Origin main_frame_origin;
std::string mime_type;
};
void ElectronPluginInfoHostImpl::GetPluginInfo(const GURL& url,
const url::Origin& origin,
const std::string& mime_type,
GetPluginInfoCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
GetPluginInfo_Params params = {url, origin, mime_type};
PluginService::GetInstance()->GetPlugins(
base::BindOnce(&ElectronPluginInfoHostImpl::PluginsLoaded,
weak_factory_.GetWeakPtr(), params, std::move(callback)));
}
void ElectronPluginInfoHostImpl::PluginsLoaded(
const GetPluginInfo_Params& params,
GetPluginInfoCallback callback,
const std::vector<WebPluginInfo>& plugins) {
mojom::PluginInfoPtr output = mojom::PluginInfo::New();
std::vector<WebPluginInfo> matching_plugins;
std::vector<std::string> mime_types;
PluginService::GetInstance()->GetPluginInfoArray(
params.url, params.mime_type, true, &matching_plugins, &mime_types);
if (!matching_plugins.empty()) {
output->plugin = matching_plugins[0];
output->actual_mime_type = mime_types[0];
}
std::move(callback).Run(std::move(output));
}
} // namespace electron

View file

@ -0,0 +1,56 @@
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_
#define SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_
#include <string>
#include <vector>
#include "shell/common/plugin.mojom.h"
class GURL;
namespace content {
struct WebPluginInfo;
} // namespace content
namespace url {
class Origin;
}
namespace electron {
// Implements ElectronPluginInfoHost interface.
class ElectronPluginInfoHostImpl : public mojom::ElectronPluginInfoHost {
public:
struct GetPluginInfo_Params;
ElectronPluginInfoHostImpl();
ElectronPluginInfoHostImpl(const ElectronPluginInfoHostImpl&) = delete;
ElectronPluginInfoHostImpl& operator=(const ElectronPluginInfoHostImpl&) =
delete;
~ElectronPluginInfoHostImpl() override;
// mojom::ElectronPluginInfoHost
void GetPluginInfo(const GURL& url,
const url::Origin& origin,
const std::string& mime_type,
GetPluginInfoCallback callback) override;
private:
// |params| wraps the parameters passed to |OnGetPluginInfo|, because
// |base::Bind| doesn't support the required arity <http://crbug.com/98542>.
void PluginsLoaded(const GetPluginInfo_Params& params,
GetPluginInfoCallback callback,
const std::vector<content::WebPluginInfo>& plugins);
base::WeakPtrFactory<ElectronPluginInfoHostImpl> weak_factory_{this};
};
} // namespace electron
#endif // SHELL_BROWSER_ELECTRON_PLUGIN_INFO_HOST_IMPL_H_

View file

@ -1,8 +1,7 @@
import("//mojo/public/tools/bindings/mojom.gni") import("//mojo/public/tools/bindings/mojom.gni")
import("../../../buildflags/buildflags.gni")
mojom("mojo") { mojom("mojo") {
sources = [ "api.mojom" ] sources = [ "api/api.mojom" ]
public_deps = [ public_deps = [
"//mojo/public/mojom/base", "//mojo/public/mojom/base",
@ -15,3 +14,15 @@ mojom("mojo") {
overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ] overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ]
component_deps = [ "//third_party/blink/public/common" ] component_deps = [ "//third_party/blink/public/common" ]
} }
mojom("plugin") {
# We don't want Blink variants of these bindings to be generated.
disable_variants = true
sources = [ "plugin.mojom" ]
public_deps = [
"//content/public/common:interfaces",
"//mojo/public/mojom/base",
]
}

View file

@ -195,12 +195,6 @@ namespace switches {
// Enable chromium sandbox. // Enable chromium sandbox.
const char kEnableSandbox[] = "enable-sandbox"; const char kEnableSandbox[] = "enable-sandbox";
// Ppapi Flash path.
const char kPpapiFlashPath[] = "ppapi-flash-path";
// Ppapi Flash version.
const char kPpapiFlashVersion[] = "ppapi-flash-version";
// Disable HTTP cache. // Disable HTTP cache.
const char kDisableHttpCache[] = "disable-http-cache"; const char kDisableHttpCache[] = "disable-http-cache";

View file

@ -102,8 +102,6 @@ extern const char kSpellcheck[];
namespace switches { namespace switches {
extern const char kEnableSandbox[]; extern const char kEnableSandbox[];
extern const char kPpapiFlashPath[];
extern const char kPpapiFlashVersion[];
extern const char kDisableHttpCache[]; extern const char kDisableHttpCache[];
extern const char kStandardSchemes[]; extern const char kStandardSchemes[];
extern const char kServiceWorkerSchemes[]; extern const char kServiceWorkerSchemes[];

21
shell/common/plugin.mojom Normal file
View file

@ -0,0 +1,21 @@
module electron.mojom;
import "content/public/common/webplugininfo.mojom";
import "mojo/public/mojom/base/string16.mojom";
import "url/mojom/origin.mojom";
import "url/mojom/url.mojom";
struct PluginInfo {
content.mojom.WebPluginInfo plugin;
string actual_mime_type;
};
interface ElectronPluginInfoHost {
// Return information about a plugin for the given URL and MIME type.
// Includes specific reasons why a plugin can't be used, for example because
// it's disabled.
[Sync]
GetPluginInfo(url.mojom.Url url,
url.mojom.Origin origin,
string mime_type) => (PluginInfo plugin_info);
};

View file

@ -1,107 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "shell/renderer/electron_renderer_pepper_host_factory.h"
#include <memory>
#include <string>
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
#include "ppapi/proxy/ppapi_message_utils.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
using ppapi::host::ResourceHost;
// Stub class which ignores all messages
class PepperUMAHost : public ppapi::host::ResourceHost {
public:
PepperUMAHost(content::RendererPpapiHost* host,
PP_Instance instance,
PP_Resource resource)
: ResourceHost(host->GetPpapiHost(), instance, resource) {}
~PepperUMAHost() override = default;
// ppapi::host::ResourceMessageHandler implementation.
int32_t OnResourceMessageReceived(
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) override {
PPAPI_BEGIN_MESSAGE_MAP(PepperUMAHost, msg)
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramCustomTimes,
OnHistogramCustomTimes)
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramCustomCounts,
OnHistogramCustomCounts)
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramEnumeration,
OnHistogramEnumeration)
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
PpapiHostMsg_UMA_IsCrashReportingEnabled, OnIsCrashReportingEnabled)
PPAPI_END_MESSAGE_MAP()
return PP_ERROR_FAILED;
}
private:
int32_t OnHistogramCustomTimes(ppapi::host::HostMessageContext* context,
const std::string& name,
int64_t sample,
int64_t min,
int64_t max,
uint32_t bucket_count) {
return PP_OK;
}
int32_t OnHistogramCustomCounts(ppapi::host::HostMessageContext* context,
const std::string& name,
int32_t sample,
int32_t min,
int32_t max,
uint32_t bucket_count) {
return PP_OK;
}
int32_t OnHistogramEnumeration(ppapi::host::HostMessageContext* context,
const std::string& name,
int32_t sample,
int32_t boundary_value) {
return PP_OK;
}
int32_t OnIsCrashReportingEnabled(ppapi::host::HostMessageContext* context) {
return PP_OK;
}
};
ElectronRendererPepperHostFactory::ElectronRendererPepperHostFactory(
content::RendererPpapiHost* host)
: host_(host) {}
ElectronRendererPepperHostFactory::~ElectronRendererPepperHostFactory() =
default;
std::unique_ptr<ResourceHost>
ElectronRendererPepperHostFactory::CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
const IPC::Message& message) {
DCHECK_EQ(host_->GetPpapiHost(), host);
// Make sure the plugin is giving us a valid instance for this resource.
if (!host_->IsValidInstance(instance))
return nullptr;
// Permissions for the following interfaces will be checked at the
// time of the corresponding instance's method calls. Currently these
// interfaces are available only for specifically permitted apps which may
// not have access to the other private interfaces.
switch (message.type()) {
case PpapiHostMsg_UMA_Create::ID: {
return std::make_unique<PepperUMAHost>(host_, instance, resource);
}
}
return nullptr;
}

View file

@ -1,40 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_
#define ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_
#include <memory>
#include "base/memory/raw_ptr.h"
#include "ppapi/host/host_factory.h"
namespace content {
class RendererPpapiHost;
}
class ElectronRendererPepperHostFactory : public ppapi::host::HostFactory {
public:
explicit ElectronRendererPepperHostFactory(content::RendererPpapiHost* host);
~ElectronRendererPepperHostFactory() override;
// disable copy
ElectronRendererPepperHostFactory(const ElectronRendererPepperHostFactory&) =
delete;
ElectronRendererPepperHostFactory& operator=(
const ElectronRendererPepperHostFactory&) = delete;
// ppapi::host::HostFactory
std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
const IPC::Message& message) override;
private:
// Not owned by this object.
raw_ptr<content::RendererPpapiHost> host_;
};
#endif // ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_

View file

@ -1,33 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "shell/renderer/pepper_helper.h"
#include <memory>
#include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h"
#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "electron/shell/renderer/electron_renderer_pepper_host_factory.h"
#include "ppapi/host/ppapi_host.h"
PepperHelper::PepperHelper(content::RenderFrame* render_frame)
: RenderFrameObserver(render_frame) {}
PepperHelper::~PepperHelper() = default;
void PepperHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
// TODO(brettw) figure out how to hook up the host factory. It needs some
// kind of filter-like system to allow dynamic additions.
host->GetPpapiHost()->AddHostFactoryFilter(
std::make_unique<ChromeRendererPepperHostFactory>(host));
host->GetPpapiHost()->AddHostFactoryFilter(
std::make_unique<ElectronRendererPepperHostFactory>(host));
host->GetPpapiHost()->AddInstanceMessageFilter(
std::make_unique<PepperSharedMemoryMessageFilter>(host));
}
void PepperHelper::OnDestruct() {
delete this;
}

View file

@ -1,27 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_
#define ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_
#include "content/public/renderer/render_frame_observer.h"
// This class listens for Pepper creation events from the RenderFrame and
// attaches the parts required for plugin support.
class PepperHelper : private content::RenderFrameObserver {
public:
explicit PepperHelper(content::RenderFrame* render_frame);
~PepperHelper() override;
// disable copy
PepperHelper(const PepperHelper&) = delete;
PepperHelper& operator=(const PepperHelper&) = delete;
private:
// RenderFrameObserver.
void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;
void OnDestruct() override;
};
#endif // ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_

View file

@ -28,6 +28,7 @@
#include "shell/common/node_includes.h" #include "shell/common/node_includes.h"
#include "shell/common/node_util.h" #include "shell/common/node_util.h"
#include "shell/common/options_switches.h" #include "shell/common/options_switches.h"
#include "shell/common/plugin.mojom.h"
#include "shell/common/world_ids.h" #include "shell/common/world_ids.h"
#include "shell/renderer/api/context_bridge/object_cache.h" #include "shell/renderer/api/context_bridge/object_cache.h"
#include "shell/renderer/api/electron_api_context_bridge.h" #include "shell/renderer/api/electron_api_context_bridge.h"
@ -35,6 +36,7 @@
#include "shell/renderer/content_settings_observer.h" #include "shell/renderer/content_settings_observer.h"
#include "shell/renderer/electron_api_service_impl.h" #include "shell/renderer/electron_api_service_impl.h"
#include "shell/renderer/electron_autofill_agent.h" #include "shell/renderer/electron_autofill_agent.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/platform/web_runtime_features.h" #include "third_party/blink/public/platform/web_runtime_features.h"
@ -80,7 +82,6 @@
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
#include "shell/common/plugin_info.h" #include "shell/common/plugin_info.h"
#include "shell/renderer/pepper_helper.h"
#endif // BUILDFLAG(ENABLE_PLUGINS) #endif // BUILDFLAG(ENABLE_PLUGINS)
#if BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PRINTING)
@ -332,9 +333,6 @@ void RendererClientBase::RenderFrameCreated(
#if defined(TOOLKIT_VIEWS) #if defined(TOOLKIT_VIEWS)
new AutofillAgent(render_frame, new AutofillAgent(render_frame,
render_frame->GetAssociatedInterfaceRegistry()); render_frame->GetAssociatedInterfaceRegistry());
#endif
#if BUILDFLAG(ENABLE_PLUGINS)
new PepperHelper(render_frame);
#endif #endif
new ContentSettingsObserver(render_frame); new ContentSettingsObserver(render_frame);
#if BUILDFLAG(ENABLE_PRINTING) #if BUILDFLAG(ENABLE_PRINTING)
@ -423,32 +421,29 @@ bool RendererClientBase::IsPluginHandledExternally(
#if BUILDFLAG(ENABLE_PDF_VIEWER) #if BUILDFLAG(ENABLE_PDF_VIEWER)
DCHECK(plugin_element.HasHTMLTagName("object") || DCHECK(plugin_element.HasHTMLTagName("object") ||
plugin_element.HasHTMLTagName("embed")); plugin_element.HasHTMLTagName("embed"));
if (mime_type == pdf::kInternalPluginMimeType) {
mojo::AssociatedRemote<mojom::ElectronPluginInfoHost> plugin_info_host;
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_info_host);
mojom::PluginInfoPtr plugin_info = mojom::PluginInfo::New();
plugin_info_host->GetPluginInfo(
original_url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(),
mime_type, &plugin_info);
if (plugin_info->actual_mime_type == pdf::kInternalPluginMimeType) {
if (IsPdfInternalPluginAllowedOrigin( if (IsPdfInternalPluginAllowedOrigin(
render_frame->GetWebFrame()->GetSecurityOrigin())) { render_frame->GetWebFrame()->GetSecurityOrigin())) {
return true; return true;
} }
content::WebPluginInfo info;
info.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS;
info.name = base::ASCIIToUTF16(kPDFInternalPluginName);
info.path = base::FilePath(kPdfPluginPath);
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
info.mime_types.emplace_back(pdf::kInternalPluginMimeType, "pdf",
"Portable Document Format");
return extensions::MimeHandlerViewContainerManager::Get(
content::RenderFrame::FromWebFrame(
plugin_element.GetDocument().GetFrame()),
true /* create_if_does_not_exist */)
->CreateFrameContainer(plugin_element, original_url, mime_type, info);
} }
return extensions::MimeHandlerViewContainerManager::Get( return extensions::MimeHandlerViewContainerManager::Get(
content::RenderFrame::FromWebFrame( content::RenderFrame::FromWebFrame(
plugin_element.GetDocument().GetFrame()), plugin_element.GetDocument().GetFrame()),
true /* create_if_does_not_exist */) true /* create_if_does_not_exist */)
->CreateFrameContainer(plugin_element, original_url, mime_type, ->CreateFrameContainer(plugin_element, original_url,
GetPDFPluginInfo()); plugin_info->actual_mime_type,
plugin_info->plugin);
#else #else
return false; return false;
#endif #endif

View file

@ -28,7 +28,6 @@ group("chromium_unittests") {
"//media/mojo:media_mojo_unittests", "//media/mojo:media_mojo_unittests",
"//mojo:mojo_unittests", "//mojo:mojo_unittests",
"//net:net_unittests", "//net:net_unittests",
"//ppapi:ppapi_unittests",
"//printing:printing_unittests", "//printing:printing_unittests",
"//skia:skia_unittests", "//skia:skia_unittests",
"//sql:sql_unittests", "//sql:sql_unittests",

View file

@ -48,7 +48,6 @@ tests:
- SSLClientSocketTest.* - SSLClientSocketTest.*
- UDPSocketTest.ClientGetLocalPeerAddresses - UDPSocketTest.ClientGetLocalPeerAddresses
- UDPSocketTest.ClientSetDoNotFragment - UDPSocketTest.ClientSetDoNotFragment
- ppapi_unittests
- printing_unittests - printing_unittests
- skia_unittests - skia_unittests
- sql_unittests - sql_unittests