2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:45:47 -0700
|
|
|
|
Subject: disable_hidden.patch
|
|
|
|
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
2019-02-04 05:49:22 +00:00
|
|
|
index 316e7cf9819c0ffe3a15a55e6bcada781d6d7832..d90f50ed29740b14e6259c4d6d14434222ddbfb4 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
2019-02-04 05:49:22 +00:00
|
|
|
@@ -760,6 +760,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
2018-09-14 05:02:16 +00:00
|
|
|
if (is_hidden_)
|
|
|
|
return;
|
|
|
|
|
|
|
|
+ if (disable_hidden_)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
RejectMouseLockOrUnlockIfNecessary();
|
|
|
|
|
|
|
|
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
2019-01-24 09:42:21 +00:00
|
|
|
index 4fd95dc7bdcd99342bd110d46b5829eb784e0f40..47af7e316c36c2f1733721170a6eff7fae39fa77 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
2019-01-12 01:00:43 +00:00
|
|
|
@@ -153,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
2018-09-14 05:02:16 +00:00
|
|
|
// RenderWidgetHostImpl.
|
|
|
|
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
|
|
|
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
|
|
+ bool disable_hidden_ = false;
|
|
|
|
+
|
|
|
|
void set_hung_renderer_delay(const base::TimeDelta& delay) {
|
|
|
|
hung_renderer_delay_ = delay;
|
|
|
|
}
|