mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 148.0.7776.0 * chore: bump chromium in DEPS to 148.0.7778.0 * fix(patch): buffered_data_source_host_impl include added upstream Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7712714 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): ASan process info callback added upstream Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7724018 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): ServiceProcessHost per-instance observer migration Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700794 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): FSA BlockPath factory method refactor Upstream refactored BlockPath initialization to use factory methods (CreateRelative, CreateAbsolute, CreateSuffix) and a switch statement. Updated the exposed code in the header to match. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7665590 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): service process tracker per-instance observer refactor Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700794 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * chore: update patches (trivial only) * 7723958: Rename blink::WebString::FromUTF16() to FromUtf16() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7723958 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fixup! fix(patch): ASan process info callback added upstream --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org> Co-authored-by: Claude <svc-devxp-claude@slack-corp.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 fe46ebe4e5bcda2eff543aa5b5a2310628a3ea5a..8df679251dc314a94079fcc9d4edd7fab12873d4 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -818,6 +818,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 37b2ca1000ead76ec7e403bf1e2dc647bcee74ce..1312c87909729ac59ea661321c10862f34072f95 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -1059,6 +1059,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 550a2090d11ea151d8003610cb39a8035c5d299c..53ec5cd693539d74424c683f78e953e85c13c098 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -712,7 +712,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();
|