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

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

Issue 1652083002: Prepare for per-webview virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 10 months 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/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "components/scheduler/child/child_scheduler.h" 10 #include "components/scheduler/child/child_scheduler.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Decrements the timer queue suspension count and re-enables the timer queue 147 // Decrements the timer queue suspension count and re-enables the timer queue
148 // if the suspension count is zero and the current schduler policy allows it. 148 // if the suspension count is zero and the current schduler policy allows it.
149 virtual void ResumeTimerQueue() = 0; 149 virtual void ResumeTimerQueue() = 0;
150 150
151 // Sets whether to allow suspension of timers after the backgrounded signal is 151 // Sets whether to allow suspension of timers after the backgrounded signal is
152 // received via OnRendererBackgrounded. Defaults to disabled. 152 // received via OnRendererBackgrounded. Defaults to disabled.
153 virtual void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) = 0; 153 virtual void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) = 0;
154 154
155 // Returns a double which is the number of seconds since epoch (Jan 1, 1970). 155 // Returns a double which is the number of seconds since epoch (Jan 1, 1970).
156 virtual double CurrentTimeSeconds() const = 0; 156 // This may represent either the real time, or a virtual time depending on
157 // whether or not the system is currently running a task associated with a
158 // virtual time domain or real time domain.
159 virtual double VirtualTimeSeconds() const = 0;
157 160
158 // Returns a microsecond resolution platform dependant time source. 161 // Returns a microsecond resolution platform dependant time source.
159 virtual double MonotonicallyIncreasingTimeSeconds() const = 0; 162 // This may represent either the real time, or a virtual time depending on
163 // whether or not the system is currently running a task associated with a
164 // virtual time domain or real time domain.
165 virtual double MonotonicallyIncreasingVirtualTimeSeconds() const = 0;
160 166
161 protected: 167 protected:
162 RendererScheduler(); 168 RendererScheduler();
163 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 169 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
164 }; 170 };
165 171
166 } // namespace scheduler 172 } // namespace scheduler
167 173
168 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 174 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698