d9ba26273a
* chore: bump chromium in DEPS to 118.0.5982.0 * chore: bump chromium in DEPS to 118.0.5983.0 * chore: bump chromium in DEPS to 118.0.5985.0 * chore: bump chromium in DEPS to 118.0.5987.0 * chore: update v8 patches * chore: update chromium patches * chore: update patches * [PEPC] Add new structs to contain permission request data Refs https://chromium-review.googlesource.com/c/chromium/src/+/4756727 * Add ThumbnailCapturer interface Refs https://chromium-review.googlesource.com/c/chromium/src/+/4812256 * Reland "[ChromeRefresh2023] Update document pip windows for Chrome Refresh" Refs https://chromium-review.googlesource.com/c/chromium/src/+/4814275 * chore: bump chromium in DEPS to 118.0.5989.0 * chore: bump chromium in DEPS to 118.0.5991.0 * chore: update patches --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
65 lines
2.7 KiB
Diff
65 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 60d76d4ecf3bbda940f9a43d86259fcfd7d4a349..d4fc5a92413234196a531edc90aae66d3131b5fb 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -3324,6 +3324,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);
|
|
|
|
@@ -3334,6 +3341,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 f02cd75e7ad4c841e026309ec7ff35f242bffe16..ba00ce434e23aa899e048d388f4d67ec8ee6c0bb 100644
|
|
--- a/content/public/browser/web_contents.h
|
|
+++ b/content/public/browser/web_contents.h
|
|
@@ -98,10 +98,13 @@ class BrowserContext;
|
|
class BrowserPluginGuestDelegate;
|
|
class RenderFrameHost;
|
|
class RenderViewHost;
|
|
+class RenderViewHostDelegateView;
|
|
class RenderWidgetHostView;
|
|
+class RenderWidgetHostViewBase;
|
|
class ScreenOrientationDelegate;
|
|
class SiteInstance;
|
|
class WebContentsDelegate;
|
|
+class WebContentsView;
|
|
class WebUI;
|
|
struct DropData;
|
|
struct MHTMLGenerationParams;
|
|
@@ -244,6 +247,10 @@ class WebContents : public PageNavigator,
|
|
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 GetLastActiveTime(). If this is left
|
|
// default initialized then the value is not passed on to the WebContents
|