![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 141.0.7341.0 * chore: bump chromium in DEPS to 141.0.7342.0 * chore: update patches manually resolved conflict in `osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch` due to https://crrev.com/c/6681354 * 6819541: WebShare: Improve mac share behavior when sharing a URL https://chromium-review.googlesource.com/c/chromium/src/+/6819541 * Add missing include for SkBitmap Couldn't quickly find where we lost the full definition in this file's includes. 🤷 * 6771055: [SxS] Move devtools to ContentsContainerView supporting side-by-side. https://chromium-review.googlesource.com/c/chromium/src/+/6771055 There may be some simplification possible here (set_x, Rect position, ...), but this change is satisfactory to maintain the current behavior. * 6813689: Switch SystemMemoryInfoKB to use ByteCount https://chromium-review.googlesource.com/c/chromium/src/+/6813689 * 6818486: Track DevTools feature usage in new badge tracker https://chromium-review.googlesource.com/c/chromium/src/+/6818486 * chore: bump chromium in DEPS to 141.0.7344.0 * Remove ELECTRON_OZONE_PLATFORM_HINT env var 6819616: Remove OzonePlatformHint | https://chromium-review.googlesource.com/c/chromium/src/+/6819616 See: https://github.com/electron/electron/issues/48001 * chore: update patches * Add missing include for `base::NumberToString` * Remove `DESKTOP_STARTUP_ID` code This was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6819616 and I confirmed with the author that it was an intentional change. Going to mirror upstream and remove it here too. * chore: bump chromium in DEPS to 141.0.7346.0 * chore: update patches * 6828465: Reland "Remove BluezDBusThreadManager" https://chromium-review.googlesource.com/c/chromium/src/+/6828465 * Patch change to Node.js test output V8 enhanced the stack trace of "thenable" async tasks. A couple of Node.js tests needed to have their snapshots updates to accomodate the extra stack trace frames in the output. This patch should be upstreamed to Node.js. See: 6826001: fix thenable async stack trace https://chromium-review.googlesource.com/c/v8/v8/+/6826001 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org>
66 lines
2.7 KiB
Diff
66 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 64f7b20657c9e004083ecb32544d0dcd1a443343..fd83df444e1ec37b24764411a6e2f16f26a0663f 100644
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
|
@@ -4168,6 +4168,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);
|
|
|
|
@@ -4178,6 +4185,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 dc706127394e7cd8e529dc74cef25b21fd79787c..cb3246775f97feb5a971cd31482c250b56866461 100644
|
|
--- a/content/public/browser/web_contents.h
|
|
+++ b/content/public/browser/web_contents.h
|
|
@@ -125,11 +125,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 MHTMLGenerationParams;
|
|
@@ -283,6 +286,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
|