mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 148.0.7765.0 * chore: bump chromium in DEPS to 148.0.7766.0 * fix(patch-conflict): update packed_resources dep name after upstream rename Upstream renamed //chrome:packed_resources_integrity_header to //chrome:packed_resources. Updated the patch to guard the new dependency name with !is_electron_build while preserving the same intent. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714543 Co-Authored-By: Claude <noreply@anthropic.com> * fix(patch-conflict): update code_cache_host_impl.cc for upstream includes and TODO Upstream added #include <stdint.h> and a TODO comment in code_cache_host_impl.cc which conflicted with the Electron code cache custom schemes patch. Resolved by keeping both upstream additions and the Electron ProcessLockURLIsCodeCacheScheme function. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7615151 Co-Authored-By: Claude <noreply@anthropic.com> * chore: update patch hunk headers Co-Authored-By: Claude <noreply@anthropic.com> * 7700837: update RecordContentToVisibleTimeRequest from mojom to native struct Upstream typemapped RecordContentToVisibleTimeRequest from a Mojo struct to a native C++ struct. Updated OSR virtual method signatures from blink::mojom::RecordContentToVisibleTimeRequestPtr to std::optional<blink::RecordContentToVisibleTimeRequest> and blink::RecordContentToVisibleTimeRequest to match. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700837 Co-Authored-By: Claude <noreply@anthropic.com> * 7714579: update WebString::FromASCII to FromUTF8 Upstream renamed blink::WebString::FromASCII to FromAscii. Updated Electron's usage to FromUTF8 which is equivalent for ASCII scheme strings and avoids a dependency on the renamed method. Also fixed blink::String::FromUTF8 to use the String constructor directly. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714579 Co-Authored-By: Claude <noreply@anthropic.com> * 7696480: add stream_info dep after StreamInfo extraction Upstream extracted extensions::StreamInfo from PdfViewerStreamManager to a standalone class in extensions/browser/mime_handler/stream_info.h. Added the new target as a dependency since Electron's streams_private and pdf_viewer_private APIs use PdfViewerStreamManager which now depends on the separate StreamInfo target. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7696480 Co-Authored-By: Claude <noreply@anthropic.com> * chore: bump chromium in DEPS to 148.0.7768.0 * fix(patch-conflict): update PiP patch for new toggle_mute_button in overlay window Upstream added a toggle_mute_button to the live caption dialog controls in VideoOverlayWindowViews::SetLiveCaptionDialogVisibility. Extended the existing #if 0 guard to include the new button handling since Electron disables live caption dialog functionality. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7682308 Co-Authored-By: Claude <noreply@anthropic.com> * fix(patch-conflict): update packed_resource_integrity patch after upstream dep removal Upstream removed the deps += [ "//chrome:packed_resources" ] line from the if (!is_win) block in chrome/browser/BUILD.gn. The Electron patch no longer needs to guard this dep with !is_electron_build in this location since the dep was already relocated by an earlier upstream CL. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7714543 Co-Authored-By: Claude <noreply@anthropic.com> * fix(patch-conflict): update WebSocket throttling revert for DisconnectWebSocketOnBFCache guard Upstream added a DisconnectWebSocketOnBFCacheEnabled() runtime feature check that wraps the WebSocket BFCache feature registration. Updated the Electron revert patch to place the kAllowAggressiveThrottlingWithWebSocket ternary inside the new conditional guard. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7698838 Co-Authored-By: Claude <noreply@anthropic.com> * fix(patch-conflict): update SCContentSharingPicker patch for upstream native picker refactor Upstream added is_native_picker and filter_ based native picker session validation to ScreenCaptureKitDeviceMac. Electron's patch uses its own native picker approach (active_streams_ counter + direct SCContentSharingPicker API), so marked the new upstream parameters as [[maybe_unused]] and kept Electron's implementation. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7713560 Co-Authored-By: Claude <noreply@anthropic.com> * chore: update patch hunk headers Co-Authored-By: Claude <noreply@anthropic.com> * 7708800: update StartDragging signature to use RenderFrameHost Upstream refactored StartDragging to take a RenderFrameHost& instead of separate source_origin and source_rwh parameters. Updated OffScreenWebContentsView to match the new signature and derive the RenderWidgetHostImpl from the RenderFrameHost internally. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7708800 Co-Authored-By: Claude <noreply@anthropic.com> * 7682308: add toggle_mute_button to chromium_src build sources Upstream added a ToggleMuteButton to the PiP overlay window controls. Added the new toggle_mute_button.cc/h source files to Electron's chromium_src/BUILD.gn to resolve linker errors. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7682308 Co-Authored-By: Claude <noreply@anthropic.com> * chore: update patches after main rebase * fixup! 7708800: update StartDragging signature to use RenderFrameHost fix linting * 7705541: [trap-handler] Track individual Wasm memories | https://chromium-review.googlesource.com/c/v8/v8/+/7705541 Moved the SetUpWebAssemblyTrapHandler() call to before the V8 isolate is created * fixup! fix utility process tests --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
67 lines
2.7 KiB
Diff
67 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
Date: Sat, 24 Apr 2021 18:07:09 -0700
|
|
Subject: web_contents.patch
|
|
|
|
This allows overriding the RenderViewHostDelegateView of a WebContents, which
|
|
is needed for OSR.
|
|
|
|
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
|
|
|
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
|
index 1a45bab9c0e4e429bb338c757cdc49d64f337b88..462a05f830906518366182140c36ae73e96d6fc0 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -4305,6 +4305,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
|
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
|
base::UnguessableToken::Create());
|
|
|
|
+ if (params.view && params.delegate_view) {
|
|
+ view_.reset(params.view);
|
|
+ render_view_host_delegate_view_ = params.delegate_view;
|
|
+ }
|
|
+
|
|
+ if (!view_) {
|
|
+
|
|
std::unique_ptr<WebContentsViewDelegate> delegate =
|
|
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
|
|
|
@@ -4315,6 +4322,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
|
view_ = CreateWebContentsView(this, std::move(delegate),
|
|
&render_view_host_delegate_view_);
|
|
}
|
|
+ } // !view_
|
|
CHECK(render_view_host_delegate_view_);
|
|
CHECK(view_.get());
|
|
|
|
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
|
index f2f2ca4ec75b7a33d2f32c79cdc7394e5a296938..28cfb4e91d660ac8a00604379cc48a59fcab7bed 100644
|
|
--- a/content/public/browser/web_contents.h
|
|
+++ b/content/public/browser/web_contents.h
|
|
@@ -130,11 +130,14 @@ class PrerenderHandle;
|
|
class RenderFrameHost;
|
|
class RenderViewHost;
|
|
class RenderWidgetHost;
|
|
+class RenderViewHostDelegateView;
|
|
class RenderWidgetHostView;
|
|
+class RenderWidgetHostViewBase;
|
|
class ScreenOrientationDelegate;
|
|
class SiteInstance;
|
|
class UnownedInnerWebContentsClient;
|
|
class WebContentsDelegate;
|
|
+class WebContentsView;
|
|
class WebUI;
|
|
struct DropData;
|
|
struct GlobalRenderFrameHostId;
|
|
@@ -296,6 +299,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
|
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
|
network::mojom::WebSandboxFlags::kNone;
|
|
|
|
+ // Optionally specify the view and delegate view.
|
|
+ raw_ptr<content::WebContentsView> view = nullptr;
|
|
+ raw_ptr<content::RenderViewHostDelegateView> delegate_view = nullptr;
|
|
+
|
|
// Value used to set the last time the WebContents was made active, this is
|
|
// the value that'll be returned by GetLastActiveTimeTicks(). If this is
|
|
// left default initialized then the value is not passed on to the
|