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

Unified Diff: public/platform/WebThread.h

Issue 1031843002: Move IdleTask to WebThread side 1/3 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compile 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
« no previous file with comments | « public/platform/WebScheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebThread.h
diff --git a/public/platform/WebThread.h b/public/platform/WebThread.h
index 3915cf54a0b5af108428977a5c8f8c483777d4e3..ff37d9f3378071880898df206fe7dbd1a420b653 100644
--- a/public/platform/WebThread.h
+++ b/public/platform/WebThread.h
@@ -44,6 +44,14 @@ typedef uintptr_t PlatformThreadId;
// run.
class BLINK_PLATFORM_EXPORT WebThread {
public:
+ // An IdleTask is passed a deadline in CLOCK_MONOTONIC seconds and is
+ // expected to complete before this deadline.
+ class IdleTask {
+ public:
+ virtual ~IdleTask() { }
+ virtual void run(double deadlineSeconds) = 0;
+ };
+
class BLINK_PLATFORM_EXPORT Task {
public:
virtual ~Task() { }
« no previous file with comments | « public/platform/WebScheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698