| Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| index 53b95608089341615c3bcaf7ed958a35eb90907d..37c331fbe8eb9427cc835f50f392b5631d4d110b 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| +++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
|
| @@ -176,23 +176,27 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
|
|
|
| // Delayed Tasks with run_times <= Now() are enqueued onto the work queue and
|
| // reloads any empty work queues.
|
| - void UpdateWorkQueues(LazyNow lazy_now);
|
| + void UpdateWorkQueues(LazyNow* lazy_now);
|
|
|
| // Chooses the next work queue to service. Returns true if |out_queue|
|
| // indicates the queue from which the next task should be run, false to
|
| // avoid running any tasks.
|
| bool SelectWorkQueueToService(internal::WorkQueue** out_work_queue);
|
|
|
| - // Runs a single nestable task from the |queue|. On exit, |out_task| will
|
| - // contain the task which was executed. Non-nestable task are reposted on the
|
| - // run loop. The queue must not be empty.
|
| enum class ProcessTaskResult {
|
| DEFERRED,
|
| EXECUTED,
|
| TASK_QUEUE_MANAGER_DELETED
|
| };
|
| +
|
| + // Runs a single nestable task from the |queue|. On exit, |out_task| will
|
| + // contain the task which was executed. Non-nestable task are reposted on the
|
| + // run loop. The queue must not be empty. On exit |time_after_task| may get
|
| + // set (not guaranteed), sampling |real_time_domain()->Now()| immediately
|
| + // after running the task.
|
| ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue,
|
| - LazyNow*);
|
| + LazyNow time_before_task,
|
| + base::TimeTicks* time_after_task);
|
|
|
| bool RunsTasksOnCurrentThread() const;
|
| bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
|
| @@ -201,9 +205,9 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
|
|
|
| internal::EnqueueOrder GetNextSequenceNumber();
|
|
|
| - // Calls MaybeAdvanceTime on all time domains and returns true if one of them
|
| - // was able to advance.
|
| - bool TryAdvanceTimeDomains();
|
| + // Calls DelayTillNextTask on all time domains and returns the smallest delay
|
| + // requested if any.
|
| + base::Optional<base::TimeDelta> ComputeDelayTillNextTask(LazyNow* lazy_now);
|
|
|
| void MaybeRecordTaskDelayHistograms(
|
| const internal::TaskQueueImpl::Task& pending_task,
|
|
|