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

Unified Diff: public/platform/WebScheduler.h

Issue 940433005: Add postIdleTaskAfterWakeup to WebScheduler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/Scheduler.cpp ('k') | no next file » | 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 749f58e4d29f68400813863f2a09b79957911207..a2cda3eac91603b1f741794377d01c942d88d16e 100644
--- a/public/platform/WebScheduler.h
+++ b/public/platform/WebScheduler.h
@@ -41,6 +41,12 @@ public:
// Takes ownership of |IdleTask|. Can be called from any thread.
virtual void postIdleTask(const WebTraceLocation&, IdleTask*) { }
+ // Like postIdleTask but does not run the idle task until after some other
+ // task has run. This enables posting of a task which won't stop the Blink
+ // main thread from sleeping, but will start running after it wakes up.
+ // Takes ownership of |IdleTask|. Can be called from any thread.
+ virtual void postIdleTaskAfterWakeup(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.
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698