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

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

Issue 2808843003: [scheduler] Change TaskQueue observer call mechanism. (Closed)
Patch Set: Tests & comments 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
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
alex clarke (OOO till 29th) 2017/05/09 12:50:50 Probably a discussion for the follow on patch but
altimin 2017/05/09 13:15:03 Acknowledged.
+ // 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

Powered by Google App Engine
This is Rietveld 408576698