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

Unified Diff: Source/platform/scheduler/Scheduler.h

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 11 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 | « Source/platform/scheduler/ClosureRunnerTask.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/Scheduler.h
diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h
index 4813b21a53b2dad14c4906ae506c1abda1a3518c..c7d252b36d44383cbecc533c4a01e1a10356f2e9 100644
--- a/Source/platform/scheduler/Scheduler.h
+++ b/Source/platform/scheduler/Scheduler.h
@@ -6,6 +6,7 @@
#define Scheduler_h
#include "platform/PlatformExport.h"
+#include "public/platform/WebThread.h"
#include "wtf/Functional.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h"
@@ -30,6 +31,11 @@ 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.
+ // Takes ownership of |WebThread::Task|.
+ void postLoadingTask(const TraceLocation&, WebThread::Task*);
+
// 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.
« no previous file with comments | « Source/platform/scheduler/ClosureRunnerTask.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698