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

Unified Diff: public/platform/WebScheduler.h

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed the idle implementation 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: public/platform/WebScheduler.h
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h
index 551327fc999ab6b2a3bc1b2838c9ab23d3e348dc..e5d13ca49acd6011d96a30a25ed4f27632858a52 100644
--- a/public/platform/WebScheduler.h
+++ b/public/platform/WebScheduler.h
@@ -57,6 +57,12 @@ public:
// when the user is interacting with the device.
// Takes ownership of |WebThread::Task|. Can be called from any thread.
virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { }
+
+ // Schedule a timer task to be run on the Blink main thread. Timer Tasks
+ // tasks usually have the default priority, but may be delayed
+ // when the user is interacting with the device.
+ // Takes ownership of |WebThread::Task|. Can be called from any thread.
+ virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long long delayMs) { }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698