OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Similar to sequence number, but ultimately the |enqueue_order_| is what | 126 // Similar to sequence number, but ultimately the |enqueue_order_| is what |
127 // the scheduler uses for task ordering. For immediate tasks |enqueue_order| | 127 // the scheduler uses for task ordering. For immediate tasks |enqueue_order| |
128 // is set when posted, but for delayed tasks it's not defined until they are | 128 // is set when posted, but for delayed tasks it's not defined until they are |
129 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed | 129 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed |
130 // tasks could run before an immediate task posted after the delayed task. | 130 // tasks could run before an immediate task posted after the delayed task. |
131 EnqueueOrder enqueue_order_; | 131 EnqueueOrder enqueue_order_; |
132 }; | 132 }; |
133 | 133 |
134 // TaskQueue implementation. | 134 // TaskQueue implementation. |
135 void UnregisterTaskQueue() override; | 135 void UnregisterTaskQueue() override; |
136 bool RunsTasksOnCurrentThread() const override; | 136 bool RunsTasksInCurrentSequence() const override; |
137 bool PostDelayedTask(const tracked_objects::Location& from_here, | 137 bool PostDelayedTask(const tracked_objects::Location& from_here, |
138 base::OnceClosure task, | 138 base::OnceClosure task, |
139 base::TimeDelta delay) override; | 139 base::TimeDelta delay) override; |
140 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 140 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
141 base::OnceClosure task, | 141 base::OnceClosure task, |
142 base::TimeDelta delay) override; | 142 base::TimeDelta delay) override; |
143 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override; | 143 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override; |
144 bool IsQueueEnabled() const override; | 144 bool IsQueueEnabled() const override; |
145 bool IsEmpty() const override; | 145 bool IsEmpty() const override; |
146 size_t GetNumberOfPendingTasks() const override; | 146 size_t GetNumberOfPendingTasks() const override; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 const bool should_report_when_execution_blocked_; | 387 const bool should_report_when_execution_blocked_; |
388 | 388 |
389 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 389 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
390 }; | 390 }; |
391 | 391 |
392 } // namespace internal | 392 } // namespace internal |
393 } // namespace scheduler | 393 } // namespace scheduler |
394 } // namespace blink | 394 } // namespace blink |
395 | 395 |
396 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 396 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
OLD | NEW |