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 f241d7bb755b5c2ca1f66aeb42c9d38581ed7d3f..9f3bbd9548f009fe8ebf06d7e356474dcacbcc0e 100644 |
--- a/components/scheduler/renderer/renderer_scheduler_impl.cc |
+++ b/components/scheduler/renderer/renderer_scheduler_impl.cc |
@@ -384,6 +384,14 @@ void RendererSchedulerImpl::OnRendererForegrounded() { |
ResumeTimerQueueWhenForegrounded(); |
} |
+void RendererSchedulerImpl::OnRendererPurgeAndSuspend() { |
+ helper_.CheckOnValidThread(); |
+ if (helper_.IsShutdown() || !MainThreadOnly().renderer_backgrounded) |
Sami
2016/04/27 15:44:43
We should probably cancel suspend_timers_when_back
hajimehoshi
2016/04/28 10:26:58
Done.
|
+ return; |
+ // TODO(hajimehoshi): Implement purging e.g. cache (crbug/607077) |
Sami
2016/04/27 15:44:43
Have you thought about what kind of interfaces wou
hajimehoshi
2016/04/28 10:26:58
Right. Moved this comment to RenderThreadImpl and
|
+ SuspendTimerQueueWhenBackgrounded(); |
Sami
2016/04/27 15:44:43
We should think about whether we need to suspend o
hajimehoshi
2016/04/28 10:26:58
Good point, we might need to do what you suggest.
|
+} |
+ |
void RendererSchedulerImpl::EndIdlePeriod() { |
if (MainThreadOnly().in_idle_period_for_testing) |
return; |