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

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: 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/wtf/WeakPtr.h ('k') | public/platform/WebThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebScheduler.h
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h
index 49421a8bfb8bb40fa6527bd3fe0c3df4f37f0e47..749f58e4d29f68400813863f2a09b79957911207 100644
--- a/public/platform/WebScheduler.h
+++ b/public/platform/WebScheduler.h
@@ -6,6 +6,7 @@
#define WebScheduler_h
#include "WebCommon.h"
+#include "public/platform/WebThread.h"
namespace blink {
@@ -39,6 +40,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
« no previous file with comments | « Source/wtf/WeakPtr.h ('k') | public/platform/WebThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698