Index: public/platform/WebScheduler.h |
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h |
index b29ef632388710979433c70326a05b8eed5eb57e..6164d7638a07fd48f96220e8e0f313b14d1199ef 100644 |
--- a/public/platform/WebScheduler.h |
+++ b/public/platform/WebScheduler.h |
@@ -6,6 +6,7 @@ |
#define WebScheduler_h |
#include "WebCommon.h" |
+#include "public/platform/WebTaskRunner.h" |
#include "public/platform/WebThread.h" |
namespace blink { |
@@ -60,12 +61,14 @@ public: |
// tasks usually have the default priority, but may be deprioritised |
// when the user is interacting with the device. |
// Takes ownership of |WebThread::Task|. Can be called from any thread. |
+ // TODO(alexclarke): Remove this in favour of loadingTaskRunner(). |
virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } |
// Schedule a timer task to be run on the the associated WebThread. 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. |
+ // TODO(alexclarke): Remove this in favour of timerTaskRunner(). |
virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long long delayMs) {} |
// Schedule a timer task to be run on the the associated WebThread. Timer Tasks |
@@ -75,6 +78,12 @@ public: |
// Takes ownership of |WebThread::Task|. Can be called from any thread. |
virtual void postTimerTaskAt(const WebTraceLocation&, WebThread::Task*, double monotonicTime) {} |
+ // Returns a WebTaskRunner for loading tasks. Can be called from any thread. |
+ virtual WebTaskRunner* loadingTaskRunner() { return nullptr; } |
+ |
+ // Returns a WebTaskRunner for timer tasks. Can be called from any thread. |
+ virtual WebTaskRunner* timerTaskRunner() { return nullptr; } |
+ |
// Suspends the timer queue and increments the timer queue suspension count. |
// May only be called from the main thread. |
virtual void suspendTimerQueue() { } |