37db307153
* chore: bump chromium in DEPS to 461ecae368fd0832f18e0b13e61f3561d83f0031 * update patches * update patches * Remove both vs browser/child split in content gn files. https://chromium-review.googlesource.com/c/chromium/src/+/2157965 * chore: bump chromium in DEPS to 7ff3897f3104563763ef26ad940d4e988d7245dd * update patches * update patches * Add ElectronKioskDelegate for extensions https://chromium-review.googlesource.com/c/chromium/src/+/2159760 Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Electron Bot <anonymous@electronjs.org>
48 lines
2.2 KiB
Diff
48 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:45:47 -0700
|
|
Subject: disable_hidden.patch
|
|
|
|
Electron uses this to disable background throttling for hidden windows.
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
index 5345442d1a71c45db1cfb2c3d098816e8dfdc0ac..7cd54d67f2245d197d0f145c3af0c8feab7ac559 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -655,6 +655,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
|
if (is_hidden_)
|
|
return;
|
|
|
|
+ if (disable_hidden_)
|
|
+ return;
|
|
+
|
|
RejectMouseLockOrUnlockIfNecessary(
|
|
blink::mojom::PointerLockResult::kWrongDocument);
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
|
index 7bec7d8c2f9955768d69d15eb825ffb9782de05b..6ed5f0e49094d03211a59e9b9e9c3cf22086ff4e 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -179,6 +179,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
// RenderWidgetHostImpl.
|
|
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
+ bool disable_hidden_ = false;
|
|
+
|
|
void set_new_content_rendering_delay_for_testing(
|
|
const base::TimeDelta& delay) {
|
|
new_content_rendering_delay_ = delay;
|
|
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
index 18f8dd370b6999e0c8526d68d38d60d16a668709..b261aaef15dd9c040dc3a30d19029414d43f005a 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
|
DCHECK(visibility_ == Visibility::HIDDEN ||
|
|
visibility_ == Visibility::OCCLUDED);
|
|
|
|
- if (!host()->is_hidden()) {
|
|
+ if (!host()->is_hidden() && !host()->disable_hidden_) {
|
|
host()->WasHidden();
|
|
aura::WindowTreeHost* host = window_->GetHost();
|
|
if (delegated_frame_host_) {
|