![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 136.0.7066.1 * chore: bump chromium in DEPS to 136.0.7067.0 * chore: bump chromium in DEPS to 136.0.7067.3 * chore: bump chromium in DEPS to 136.0.7069.1 * chore: bump chromium in DEPS to 136.0.7071.0 * chore: bump chromium in DEPS to 136.0.7073.1 * chore: bump chromium in DEPS to 136.0.7075.1 * chore: bump chromium in DEPS to 136.0.7076.1 * chore: bump chromium in DEPS to 136.0.7077.1 * chore: bump chromium to 136.0.7064.0 (main) (#45985) * chore: bump chromium in DEPS to 136.0.7063.0 * chore: bump chromium in DEPS to 136.0.7064.0 * 6169919: Instantiate Linux (or CrOS) system fonts using Fontations Refs6169919
* 6341209: Remove file-wide unsafe buffer suppression from content/ [1 of N]. Refs6341209
* chore: update patches --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> (cherry picked from commit962d8b325a
) * chore: bump chromium to 136.0.7067.0 (main) (#46018) * chore: bump chromium in DEPS to 136.0.7066.0 * chore: bump chromium in DEPS to 136.0.7067.0 * 6325710: [LNA] Add Local Network Access permission type Refs6325710
* 6342514: Create frame mojo endpoints in renderer during window.open() Refs6342514
* 6344040: Create widget mojo endpoints in renderer process for window.open() Refs6344040
* chore: update patches * 6349218: Move ExtensionService::install_directory() to ExtensionRegistrar Refs6349218
* 6349395: Move ExtensionService::extensions_enabled() to ExtensionRegistrar Refs6349395
* 6331510: Migrate views::Background class to ui::ColorVariant |6331510
* build: reorder set-cookie step https://github.com/electron/electron/pull/46091 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: alice <alice@makenotion.com> (cherry picked from commitb13f05e2dc
) * chore: update patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
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 59b05937ceb1b81b69d913f587150021b9031106..97512399db631236afd1aeafb1ecee97cb754f60 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -3882,6 +3882,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);
|
|
|
|
@@ -3892,6 +3899,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 4cf7eef3b54bb4d3770786f8eb03d1678516fa54..772b029c67cc74b2922fe7a034edc14bcfda6c31 100644
|
|
--- a/content/public/browser/web_contents.h
|
|
+++ b/content/public/browser/web_contents.h
|
|
@@ -119,10 +119,13 @@ class BrowserPluginGuestDelegate;
|
|
class GuestPageHolder;
|
|
class RenderFrameHost;
|
|
class RenderViewHost;
|
|
+class RenderViewHostDelegateView;
|
|
class RenderWidgetHostView;
|
|
+class RenderWidgetHostViewBase;
|
|
class ScreenOrientationDelegate;
|
|
class SiteInstance;
|
|
class WebContentsDelegate;
|
|
+class WebContentsView;
|
|
class WebUI;
|
|
struct DropData;
|
|
struct MHTMLGenerationParams;
|
|
@@ -268,6 +271,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
|