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

Unified Diff: public/platform/WebScheduler.h

Issue 1087203002: Patch 2/3 to get WebScheduler via WebThread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compile Created 5 years, 8 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..4ce434b30e4739ea72c228785efa57eeb56dd5db 100644
--- a/public/platform/WebScheduler.h
+++ b/public/platform/WebScheduler.h
@@ -57,6 +57,23 @@ 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
rmcilroy 2015/04/16 12:53:00 should we update the comments here to change 'Blin
alex clarke (OOO till 29th) 2015/04/16 13:41:36 Done.
+ // 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) { }
+
+#ifdef INSIDE_BLINK
+ // Helpers for posting bound functions as tasks.
+ typedef Function<void(double deadlineSeconds)> IdleTask;
+ typedef Function<void()> Task;
+
+ void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
+ void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
+ void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>);
+ void postLoadingTask(const WebTraceLocation&, PassOwnPtr<Task>);
+#endif
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698