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

Unified Diff: public/platform/WebScheduler.h

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Exposed ClosureRunnerTask as per Ross's suggestion 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
Index: public/platform/WebScheduler.h
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h
index 443c02ccf0688a2e33c0f49a50998c9468cc470d..2fcf99dc118090fee61d3e4aa1e7d003a95fd88e 100644
--- a/public/platform/WebScheduler.h
+++ b/public/platform/WebScheduler.h
@@ -5,6 +5,8 @@
#ifndef WebScheduler_h
#define WebScheduler_h
+#include "public/platform/WebThread.h"
+
namespace blink {
class WebTraceLocation;
@@ -37,6 +39,12 @@ public:
// starved for an arbitrarily long time if no idle time is available.
// Takes ownership of |IdleTask|. Can be called from any thread.
virtual void postIdleTask(const WebTraceLocation&, IdleTask*) { }
+
+ // Schedule a loading task to be run on the Blink main thread. Loading
+ // 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.
+ virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { }
};
} // namespace blink
« Source/platform/scheduler/CancellableTaskFactoryTest.cpp ('K') | « Source/wtf/WeakPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698