| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Similar to sequence number, but ultimately the |enqueue_order_| is what | 124 // Similar to sequence number, but ultimately the |enqueue_order_| is what |
| 125 // the scheduler uses for task ordering. For immediate tasks |enqueue_order| | 125 // the scheduler uses for task ordering. For immediate tasks |enqueue_order| |
| 126 // is set when posted, but for delayed tasks it's not defined until they are | 126 // is set when posted, but for delayed tasks it's not defined until they are |
| 127 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed | 127 // enqueued on the |delayed_work_queue_|. This is because otherwise delayed |
| 128 // tasks could run before an immediate task posted after the delayed task. | 128 // tasks could run before an immediate task posted after the delayed task. |
| 129 EnqueueOrder enqueue_order_; | 129 EnqueueOrder enqueue_order_; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 // TaskQueue implementation. | 132 // TaskQueue implementation. |
| 133 void UnregisterTaskQueue() override; | 133 void UnregisterTaskQueue() override; |
| 134 bool RunsTasksOnCurrentThread() const override; | 134 bool RunsTasksInCurrentSequence() const override; |
| 135 bool PostDelayedTask(const tracked_objects::Location& from_here, | 135 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 136 base::OnceClosure task, | 136 base::OnceClosure task, |
| 137 base::TimeDelta delay) override; | 137 base::TimeDelta delay) override; |
| 138 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 138 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
| 139 base::OnceClosure task, | 139 base::OnceClosure task, |
| 140 base::TimeDelta delay) override; | 140 base::TimeDelta delay) override; |
| 141 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override; | 141 std::unique_ptr<QueueEnabledVoter> CreateQueueEnabledVoter() override; |
| 142 bool IsQueueEnabled() const override; | 142 bool IsQueueEnabled() const override; |
| 143 bool IsEmpty() const override; | 143 bool IsEmpty() const override; |
| 144 size_t GetNumberOfPendingTasks() const override; | 144 size_t GetNumberOfPendingTasks() const override; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 const bool should_report_when_execution_blocked_; | 392 const bool should_report_when_execution_blocked_; |
| 393 | 393 |
| 394 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 394 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
| 395 }; | 395 }; |
| 396 | 396 |
| 397 } // namespace internal | 397 } // namespace internal |
| 398 } // namespace scheduler | 398 } // namespace scheduler |
| 399 } // namespace blink | 399 } // namespace blink |
| 400 | 400 |
| 401 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 401 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
| OLD | NEW |