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

Unified Diff: third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h

Issue 2909293002: Allow tasks scheduled for the instant virtual time budges expires to run (Closed)
Patch Set: Changes for altimin@ Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
diff --git a/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h b/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
index 821f5b5701caa62904c2b876e8dd7f0fca932a1c..65b3f5ab4feb83e9a70f03f7ee2d9cf37c19e429 100644
--- a/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
+++ b/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
@@ -159,14 +159,24 @@ class BLINK_PLATFORM_EXPORT RendererScheduler : public ChildScheduler {
// Must be called from the main thread.
virtual bool IsHighPriorityWorkAnticipated() = 0;
- // Suspends the timer queue and increments the timer queue suspension count.
+ // Suspends the timer queues and increments the timer queue suspension count.
// May only be called from the main thread.
virtual void SuspendTimerQueue() = 0;
- // Decrements the timer queue suspension count and re-enables the timer queue
+ // Decrements the timer queue suspension count and re-enables the timer queues
// if the suspension count is zero and the current schduler policy allows it.
virtual void ResumeTimerQueue() = 0;
+ // Suspends the timer queues by inserting a fence that blocks any tasks posted
+ // after this point from running. Orthogonal to SuspendTimerQueue. Care must
+ // be taken when using this API to avoid fighting with the TaskQueueThrottler.
+ virtual void VirtualTimePaused() = 0;
+
+ // Removes the fence added by VirtualTimePaused allowing timers to execute
+ // normally. Care must be taken when using this API to avoid fighting with the
+ // TaskQueueThrottler.
+ virtual void VirtualTimeResumed() = 0;
+
// Sets whether to allow suspension of timers after the backgrounded signal is
// received via OnRendererBackgrounded. Defaults to disabled.
virtual void SetTimerQueueSuspensionWhenBackgroundedEnabled(bool enabled) = 0;

Powered by Google App Engine
This is Rietveld 408576698