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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue.h

Issue 2808843003: [scheduler] Change TaskQueue observer call mechanism. (Closed)
Patch Set: Fix compilation Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
index 64c39a6fe75ee22db3736dd16b9a35092f921b45..8ac280a0fe3aaf8a61290c1bec3a0361878d767c 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
@@ -37,6 +37,9 @@ class PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
// Can be called on any thread
// All methods but SetObserver, SetTimeDomain and GetTimeDomain can be
// called on |queue|.
+ //
+ // TODO(altimin): Make it base::Optional<base::TimeTicks> to tell
+ // observer about cancellations.
virtual void OnQueueNextWakeUpChanged(TaskQueue* queue,
base::TimeTicks next_wake_up) = 0;
};
@@ -162,7 +165,7 @@ class PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
// Returns true if the queue has work that's ready to execute now.
// NOTE: this must be called on the thread this TaskQueue was created by.
- virtual bool HasPendingImmediateWork() const = 0;
+ virtual bool HasTaskToRunImmediately() const = 0;
// Returns requested run time of next scheduled wake-up for a delayed task
// which is not ready to run. If there are no such tasks or the queue is
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698