Index: Source/platform/scheduler/Scheduler.h |
diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h |
index 4813b21a53b2dad14c4906ae506c1abda1a3518c..8d2f3231d0ab758a4bbb8b3c978758e6e78fe42e 100644 |
--- a/Source/platform/scheduler/Scheduler.h |
+++ b/Source/platform/scheduler/Scheduler.h |
@@ -11,6 +11,7 @@ |
#include "wtf/PassOwnPtr.h" |
namespace blink { |
+class CancellableTask; |
Sami
2015/01/26 16:08:15
Unused?
alex clarke (OOO till 29th)
2015/01/26 17:00:45
Done.
|
class TraceLocation; |
class WebScheduler; |
@@ -30,6 +31,10 @@ public: |
// for an arbitrarily long time if no idle time is available. |
void postIdleTask(const TraceLocation&, PassOwnPtr<IdleTask>); |
+ // For tasks related to loading, e.g. HTML parsing. Loading tasks usually have default priority |
+ // but they may be deprioritized when the user is interacting with the device. |
+ void postLoadingTask(const TraceLocation&, PassOwnPtr<Closure>); |
Sami
2015/01/26 16:08:15
Should we have a variant of this that takes a Task
alex clarke (OOO till 29th)
2015/01/26 17:00:45
I think WebScheduler::postLoadingTask() takes care
rmcilroy
2015/01/26 18:09:01
Would it be worth only having the WebThread::Task
alex clarke (OOO till 29th)
2015/01/27 11:41:19
Done.
|
+ |
// Returns true if there is high priority work pending on the main thread |
// and the caller should yield to let the scheduler service that work. |
// Must be called on the main thread. |