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-10-18 19:57:34 +00:00
|
|
|
index 55c13fa06f7c6a5e7b3bd072ed7ffc452fd24438..09b6a881a5644859eafb216eee1172aeb8d086b2 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-09-21 14:51:28 +00:00
|
|
|
@@ -683,6 +683,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-10-18 19:57:34 +00:00
|
|
|
index 71bfb5e5e6e0aba5615bc76cae1b551ac1880d09..c5175b7fd5c5394703fca85e57b4be5faf618b63 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-09-21 14:51:28 +00:00
|
|
|
@@ -200,6 +200,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;
|
|
|
|
}
|