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

Unified Diff: content/renderer/scheduler/renderer_scheduler.h

Issue 985813002: Experimental: Remove chromium shared timers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More tests Created 5 years, 9 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: content/renderer/scheduler/renderer_scheduler.h
diff --git a/content/renderer/scheduler/renderer_scheduler.h b/content/renderer/scheduler/renderer_scheduler.h
index 7d2c39e3a86d5379382a8bf6929026343eee5bb4..d7fb30cff39dc42c537a9849b2556a70482ae620 100644
--- a/content/renderer/scheduler/renderer_scheduler.h
+++ b/content/renderer/scheduler/renderer_scheduler.h
@@ -36,6 +36,9 @@ class CONTENT_EXPORT RendererScheduler {
// to resource dispatch, foreground HTML parsing, etc...
virtual scoped_refptr<base::SingleThreadTaskRunner> LoadingTaskRunner() = 0;
+ // Returns the timer task runner. This queue is intended for DOM Timers.
+ virtual scoped_refptr<base::SingleThreadTaskRunner> TimerTaskRunner() = 0;
+
// Called to notify about the start of an extended period where no frames
// need to be drawn. Must be called from the main thread.
virtual void BeginFrameNotExpectedSoon() = 0;
@@ -83,6 +86,15 @@ class CONTENT_EXPORT RendererScheduler {
// silently dropped.
virtual void Shutdown() = 0;
+ // Suspends the timer queue 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
+ // if the suspension count is zero and the scheduler is not in TOUCH_START
+ // policy.
+ virtual void ResumeTimerQueue() = 0;
+
protected:
RendererScheduler();
DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
« no previous file with comments | « content/renderer/scheduler/null_renderer_scheduler.cc ('k') | content/renderer/scheduler/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698