| Index: third_party/WebKit/public/platform/scheduler/base/task_queue.h
|
| diff --git a/third_party/WebKit/public/platform/scheduler/base/task_queue.h b/third_party/WebKit/public/platform/scheduler/base/task_queue.h
|
| index da4102e477edd7e008de9833827167e9542a197c..de227cc40f376a60f8b96c724160cf3e6c9f7efa 100644
|
| --- a/third_party/WebKit/public/platform/scheduler/base/task_queue.h
|
| +++ b/third_party/WebKit/public/platform/scheduler/base/task_queue.h
|
| @@ -27,6 +27,20 @@ class BLINK_PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
|
| public:
|
| TaskQueue() {}
|
|
|
| + class BLINK_PLATFORM_EXPORT Observer {
|
| + public:
|
| + virtual ~Observer() {}
|
| +
|
| + // Notify observer that the time at which this queue wants to run
|
| + // the next task has changed. |next_wakeup| can be in the past
|
| + // (e.g. base::TimeTicks() can be used to notify about immediate work).
|
| + // Can be called on any thread
|
| + // All methods but SetObserver, SetTimeDomain and GetTimeDomain can be
|
| + // called on |queue|.
|
| + virtual void OnQueueNextWakeUpChanged(TaskQueue* queue,
|
| + base::TimeTicks next_wake_up) = 0;
|
| + };
|
| +
|
| // Unregisters the task queue after which no tasks posted to it will run and
|
| // the TaskQueueManager's reference to it will be released soon.
|
| virtual void UnregisterTaskQueue() = 0;
|
| @@ -208,6 +222,8 @@ class BLINK_PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
|
|
|
| virtual bool BlockedByFence() const = 0;
|
|
|
| + virtual void SetObserver(Observer* observer) = 0;
|
| +
|
| protected:
|
| ~TaskQueue() override {}
|
|
|
|
|