Index: components/scheduler/renderer/renderer_scheduler_impl.cc |
diff --git a/components/scheduler/renderer/renderer_scheduler_impl.cc b/components/scheduler/renderer/renderer_scheduler_impl.cc |
index 3ae7991381cf6b59f152c4dbce6d4b3b2a3a95e5..7d9ef4ff7a8c31f4a4eb62a00b3027dd7d2e31ef 100644 |
--- a/components/scheduler/renderer/renderer_scheduler_impl.cc |
+++ b/components/scheduler/renderer/renderer_scheduler_impl.cc |
@@ -387,6 +387,15 @@ void RendererSchedulerImpl::OnRendererForegrounded() { |
ResumeTimerQueueWhenForegrounded(); |
} |
+void RendererSchedulerImpl::SuspendRenderer() { |
+ helper_.CheckOnValidThread(); |
+ DCHECK(MainThreadOnly().renderer_backgrounded); |
+ if (helper_.IsShutdown()) |
+ return; |
+ suspend_timers_when_backgrounded_closure_.Cancel(); |
Sami
2016/05/12 11:31:35
Could you add a TODO about possibly suspending oth
hajimehoshi
2016/05/13 06:07:45
Done.
|
+ SuspendTimerQueueWhenBackgrounded(); |
+} |
+ |
void RendererSchedulerImpl::EndIdlePeriod() { |
if (MainThreadOnly().in_idle_period_for_testing) |
return; |