Index: content/renderer/render_thread_impl.h |
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h |
index 1506ecf06f0346a10c7415cde00d725604a34303..910c9fd559ff915485fdda6c5aeb56fec6cc9c47 100644 |
--- a/content/renderer/render_thread_impl.h |
+++ b/content/renderer/render_thread_impl.h |
@@ -517,6 +517,9 @@ class CONTENT_EXPORT RenderThreadImpl |
void RecordAction(const base::UserMetricsAction& action) override; |
void RecordComputedAction(const std::string& action) override; |
+ void PurgeBeforeSuspendTimerQueue(); |
+ void SuspendTimerQueueWhenBackgrounded(); |
+ |
bool IsMainThread(); |
// base::MemoryCoordinatorClient implementation: |
@@ -763,6 +766,14 @@ class CONTENT_EXPORT RenderThreadImpl |
scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr> |
thread_safe_render_message_filter_; |
+ // The amount of time to wait before suspending shared timers after the |
+ // renderer has been backgrounded. This is used only if background suspension |
+ // of shared timers is enabled. |
+ static const int kSuspendTimersWhenBackgroundedDelayMillis = 5 * 60 * 1000; |
+ |
+ base::CancelableClosure purge_before_suspend_timers_closure_; |
+ base::CancelableClosure suspend_timers_when_backgrounded_closure_; |
+ |
base::CancelableClosure record_purge_suspend_metric_closure_; |
RendererMemoryMetrics purge_and_suspend_memory_metrics_; |
base::CancelableClosure record_purge_suspend_growth_metric_closure_; |