mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
* chore: bump chromium in DEPS to 146.0.7643.0 * chore: bump chromium in DEPS to 146.0.7645.0 * chore: update patches * 7402162: Refactor app shims to call ContentMain Refs https://chromium-review.googlesource.com/c/chromium/src/+/7402162 * 7454282: Add master key management for HTTP Cache Encryption Refs https://chromium-review.googlesource.com/c/chromium/src/+/7454282 * 7490440: Reland "Delete unused base::Contains()" Refs https://chromium-review.googlesource.com/c/chromium/src/+/7490440 * chore: update patches * 7414864: Pass CSSParserLocalContext down to CSSMathExpressionNodeParser Refs https://chromium-review.googlesource.com/c/chromium/src/+/7414864 * 7460969: Move child_process_id.h to common Refs https://chromium-review.googlesource.com/c/chromium/src/+/7460969 * 7474608: [api] Remove deprecated v8::PropertyCallbackInfo<T>::This() Refs https://chromium-review.googlesource.com/c/v8/v8/+/7474608 * 7461067: [Viz] Rename kPreferGpuMemoryBuffer Refs https://chromium-review.googlesource.com/c/chromium/src/+/7461067 * 7487174: Remove GLHelper Refs https://chromium-review.googlesource.com/c/chromium/src/+/7487174 * 7457538: Set timeout from multi source page context fetcher Refs https://chromium-review.googlesource.com/c/chromium/src/+/7457538 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
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 7651e982578b5546393086fa87e6d410ca617027..5a71b4e88c22517c5ad296213b3bfefde06115cb 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -845,6 +845,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 614390e29fa84af4c141102d86f3ebdb7293b813..0bb31ec2e957301e55c81225683ec9982ba63039 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -1036,6 +1036,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
return synthetic_gesture_controller_.get();
|
|
}
|
|
|
|
+ // 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 1aeb55dc79528bf36abd25ded50f7365724bf0b2..722eff1cf2e51fe628b873c67694764c99dae496 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -710,7 +710,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();
|