d8737734bf
* chore: bump chromium in DEPS to 9321f32fb1b3af8fdfce55c7bbfacf3f75118dca * Update patches * Update electron_swiftshader_binaries deps https://chromium-review.googlesource.com/c/chromium/src/+/2056931 * Use Promise with RequestPointerLock calls https://chromium-review.googlesource.com/c/chromium/src/+/2069199 * Replace content::CursorInfo with ui::Cursor https://chromium-review.googlesource.com/c/chromium/src/+/1999201 * Convert MaterialDesignController to a true singleton. https://chromium-review.googlesource.com/c/chromium/src/+/2090877 * Drop WebContentsView::RenderViewCreated hook https://chromium-review.googlesource.com/c/chromium/src/+/2093535 * chore: bump chromium in DEPS to 6478123cfa0102ed754c70eb9bbdd391d676a4dd * Splitting context_menu_params.h into separate browser VS common parts. https://chromium-review.googlesource.com/c/chromium/src/+/2097468 * Fix DCHECK on OnThemeChanged() https://chromium-review.googlesource.com/c/chromium/src/+/2090713 * chore: bump chromium in DEPS to b0269bb003f699bc8ea7dcba8b0795ef963696d7 * Remove no longer needed patch * Check PointerLock requests for new options and update accordingly https://chromium-review.googlesource.com/c/chromium/src/+/2071788 * Address issues from review * Fixup compile error * Add additional library files * chore: bump chromium in DEPS to a41285fb8aebc8f70ed4cfe2262ea833750eaddb * Update patches Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
63 lines
2.5 KiB
Diff
63 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Anonymous <anonymous@electronjs.org>
|
|
Date: Thu, 20 Sep 2018 17:46:53 -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 b57520fe4254335fd31bb86673d30e79c0656d51..6f2e0c12e7b4a2928346f6690c2e8a072822124b 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -2066,6 +2066,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
|
std::string unique_name;
|
|
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
|
|
|
+ if (params.view && params.delegate_view) {
|
|
+ view_.reset(params.view);
|
|
+ render_view_host_delegate_view_ = params.delegate_view;
|
|
+ }
|
|
+
|
|
+ if (!view_) {
|
|
WebContentsViewDelegate* delegate =
|
|
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
|
|
|
@@ -2076,6 +2082,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
|
view_.reset(CreateWebContentsView(this, 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 cf98180740c4adaf0082e987e4b7fc482b11d348..376aaaebcb45b078c59f013437ac9baf7c9dd037 100644
|
|
--- a/content/public/browser/web_contents.h
|
|
+++ b/content/public/browser/web_contents.h
|
|
@@ -82,9 +82,12 @@ class BrowserPluginGuestDelegate;
|
|
class InterstitialPage;
|
|
class RenderFrameHost;
|
|
class RenderViewHost;
|
|
+class RenderViewHostDelegateView;
|
|
class RenderWidgetHost;
|
|
class RenderWidgetHostView;
|
|
+class RenderWidgetHostViewBase;
|
|
class WebContentsDelegate;
|
|
+class WebContentsView;
|
|
class WebUI;
|
|
struct CustomContextMenuContext;
|
|
struct DropData;
|
|
@@ -209,6 +212,10 @@ class WebContents : public PageNavigator,
|
|
kInitializeAndWarmupRendererProcess,
|
|
} desired_renderer_state;
|
|
|
|
+ // Optionally specify the view and delegate view.
|
|
+ content::WebContentsView* view = nullptr;
|
|
+ content::RenderViewHostDelegateView* delegate_view = nullptr;
|
|
+
|
|
// Sandboxing flags set on the new WebContents.
|
|
blink::mojom::WebSandboxFlags starting_sandbox_flags;
|
|
|