Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h |
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h |
| index 02be214e55591f00dd7fc00dd2c297678b504743..56d108be3ff3db1dccbbd3f499626ee6219b805a 100644 |
| --- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h |
| +++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h |
| @@ -177,6 +177,14 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue { |
| void NotifyWillProcessTask(const base::PendingTask& pending_task); |
| void NotifyDidProcessTask(const base::PendingTask& pending_task); |
| + void SetScheduledTimeDomainWakeUp( |
| + base::Optional<base::TimeTicks> scheduled_time_domain_wake_up); |
| + |
| + // Check for pending immediate work, but do not look in |
| + // delayed_incoming_queue. |
| + // Used check if we need to generate notifications about delayed work. |
|
Sami
2017/04/10 17:45:07
"Used to check"?
altimin
2017/05/08 15:40:12
Done.
|
| + bool HasPendingImmediateWorkWithoutDelayedIncomingQueue(); |
|
Sami
2017/04/10 17:45:07
This name is pretty hard to parse. HasPendingNonDe
altimin
2017/05/08 15:40:12
HasPendingImmediateWork -> HasTasksToRunImmediatel
|
| + |
| WorkQueue* delayed_work_queue() { |
| return main_thread_only().delayed_work_queue.get(); |
| } |
| @@ -202,16 +210,10 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue { |
| // any. Must be called from the main thread. |
| base::Optional<DelayedWakeUp> WakeUpForDelayedWork(LazyNow* lazy_now); |
| - base::TimeTicks scheduled_time_domain_wake_up() const { |
| + base::Optional<base::TimeTicks> scheduled_time_domain_wake_up() const { |
| return main_thread_only().scheduled_time_domain_wake_up; |
| } |
| - void set_scheduled_time_domain_wake_up( |
| - base::TimeTicks scheduled_time_domain_wake_up) { |
| - main_thread_only().scheduled_time_domain_wake_up = |
| - scheduled_time_domain_wake_up; |
| - } |
| - |
| HeapHandle heap_handle() const { return main_thread_only().heap_handle; } |
| void set_heap_handle(HeapHandle heap_handle) { |
| @@ -285,7 +287,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue { |
| int voter_refcount; |
| base::trace_event::BlameContext* blame_context; // Not owned. |
| EnqueueOrder current_fence; |
| - base::TimeTicks scheduled_time_domain_wake_up; |
| + base::Optional<base::TimeTicks> scheduled_time_domain_wake_up; |
| }; |
| ~TaskQueueImpl() override; |
| @@ -340,8 +342,6 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue { |
| // Schedules delayed work on time domain and calls the observer. |
| void ScheduleDelayedWorkInTimeDomain(base::TimeTicks now); |
| - void NotifyWakeUpChangedOnMainThread(base::TimeTicks wake_up); |
| - |
| const base::PlatformThreadId thread_id_; |
| mutable base::Lock any_thread_lock_; |