Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: components/scheduler/renderer/renderer_scheduler.h

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/scheduler/child/child_scheduler.h" 9 #include "components/scheduler/child/child_scheduler.h"
10 #include "components/scheduler/child/single_thread_idle_task_runner.h" 10 #include "components/scheduler/child/single_thread_idle_task_runner.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 virtual void SuspendTimerQueue() = 0; 137 virtual void SuspendTimerQueue() = 0;
138 138
139 // Decrements the timer queue suspension count and re-enables the timer queue 139 // Decrements the timer queue suspension count and re-enables the timer queue
140 // if the suspension count is zero and the current schduler policy allows it. 140 // if the suspension count is zero and the current schduler policy allows it.
141 virtual void ResumeTimerQueue() = 0; 141 virtual void ResumeTimerQueue() = 0;
142 142
143 // Sets whether to allow suspension of timers after the backgrounded signal is 143 // Sets whether to allow suspension of timers after the backgrounded signal is
144 // received via OnRendererBackgrounded. Defaults to disabled. 144 // received via OnRendererBackgrounded. Defaults to disabled.
145 virtual void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) = 0; 145 virtual void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) = 0;
146 146
147 // Returns a double which is the number of seconds since epoch (Jan 1, 1970).
148 virtual double CurrentTimeSeconds() const = 0;
149
150 // Returns a microsecond resolution platform dependant time source.
151 virtual double MonotonicallyIncreasingTimeSeconds() const = 0;
152
147 protected: 153 protected:
148 RendererScheduler(); 154 RendererScheduler();
149 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 155 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
150 }; 156 };
151 157
152 } // namespace scheduler 158 } // namespace scheduler
153 159
154 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 160 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « components/scheduler/child/virtual_time_tqm_delegate.cc ('k') | components/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698