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
|
2018-10-24 23:25:48 +00:00
|
|
|
index 437b43ade73d0a154be0bf4aa14c29a9081b04d0..70e985b7b13031c760d2e791930b1361586a1707 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
|
2018-10-24 23:25:48 +00:00
|
|
|
@@ -718,6 +718,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
|
2018-10-24 23:25:48 +00:00
|
|
|
index c2d8cd562433ebdbb3372cae530c8967edb37225..c1e59acbfb0392833ddbcc4da60664c3eb51c7d6 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
|
2018-09-21 00:30:26 +00:00
|
|
|
@@ -154,6 +154,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;
|
|
|
|
}
|