mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 147.0.7727.2 * chore: bump chromium in DEPS to 148.0.7728.0 * chore: bump chromium in DEPS to 148.0.7729.0 * chore: bump chromium in DEPS to 148.0.7730.0 * chore: bump chromium in DEPS to 148.0.7732.0 * chore: update WrappablePointerTag patch Refs https://chromium-review.googlesource.com/c/chromium/src/+/7641766 * chore: update custom protocol patch for removed code Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653454 * chore: update patches * fix: cleanup removed CHILD_PLUGIN code Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653455 * fix: move from int to ChildProcessId Refs https://chromium-review.googlesource.com/c/chromium/src/+/7621912 * fix: update extensions CreateTab signature Refs https://chromium-review.googlesource.com/c/chromium/src/+/7644389 * fix: draggable hit region test interface update for mac windows Refs https://chromium-review.googlesource.com/c/chromium/src/+/7655245 * chore: bump chromium in DEPS to 148.0.7733.0 * feat: restore macos child plugin process Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653455 * fixup! chore: merge main * chore: update patches * fix: replace clipboard IsFormatAvailable with async GetAllAvailableFormats Refs https://chromium-review.googlesource.com/c/chromium/src/+/7631097 Async API pending RFC https://github.com/electron/rfcs/pull/19 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
49 lines
2.3 KiB
Diff
49 lines
2.3 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 60c27d90b3c78e0d119fe02f7ee3547d19344fc0..64b3baf601e20381e7dd18facded2066a50a82c6 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -810,6 +810,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
|
return;
|
|
}
|
|
|
|
+ if (disable_hidden_) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
// Cancel pending pointer lock requests, unless there's an open user prompt.
|
|
// Prompts should remain open and functional across tab switches.
|
|
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
|
index 8fc7d892a54e0890e86b01713f0cf6b75aa14ab0..d60b540934b290e9303b1dacfa990e85ce47b4e0 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -1042,6 +1042,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
|
|
base::TimeDelta GetHungRendererDelayForTesting();
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
+ bool disable_hidden_ = false;
|
|
protected:
|
|
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
|
|
// If this object outlives |delegate|, DetachDelegate() must be called when
|
|
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 95f75a24fa3e799dc4227e6438b1d0cc316ba4b9..79bd8d43a71731e5076196877448462656a04d48 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -719,7 +719,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
|
CHECK(visibility_ == Visibility::HIDDEN ||
|
|
visibility_ == Visibility::OCCLUDED);
|
|
|
|
- if (!host()->IsHidden()) {
|
|
+ if (!host()->IsHidden() && !host()->disable_hidden_) {
|
|
host()->WasHidden();
|
|
aura::WindowTreeHost* host = window_->GetHost();
|
|
aura::Window* parent = window_->parent();
|