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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 const WorkQueue* immediate_work_queue() const { | 166 const WorkQueue* immediate_work_queue() const { |
167 return main_thread_only().immediate_work_queue.get(); | 167 return main_thread_only().immediate_work_queue.get(); |
168 } | 168 } |
169 | 169 |
170 bool should_report_when_execution_blocked() const { | 170 bool should_report_when_execution_blocked() const { |
171 return should_report_when_execution_blocked_; | 171 return should_report_when_execution_blocked_; |
172 } | 172 } |
173 | 173 |
174 // Enqueues any delayed tasks which should be run now on the | 174 // Enqueues any delayed tasks which should be run now on the |
175 // |delayed_work_queue|. It also schedules the next wake up with the | 175 // |delayed_work_queue|. Must be called from the main thread. |
176 // TimeDomain. Must be called from the main thread. | 176 void MoveReadyDelayedTasksToDelayedWorkQueue(LazyNow* lazy_now); |
177 void WakeUpForDelayedWork(LazyNow* lazy_now); | |
178 | 177 |
179 private: | 178 private: |
180 friend class WorkQueue; | 179 friend class WorkQueue; |
181 friend class WorkQueueTest; | 180 friend class WorkQueueTest; |
182 | 181 |
183 enum class TaskType { | 182 enum class TaskType { |
184 NORMAL, | 183 NORMAL, |
185 NON_NESTABLE, | 184 NON_NESTABLE, |
186 }; | 185 }; |
187 | 186 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 const bool should_report_when_execution_blocked_; | 296 const bool should_report_when_execution_blocked_; |
298 | 297 |
299 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 298 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
300 }; | 299 }; |
301 | 300 |
302 } // namespace internal | 301 } // namespace internal |
303 } // namespace scheduler | 302 } // namespace scheduler |
304 } // namespace blink | 303 } // namespace blink |
305 | 304 |
306 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 305 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
OLD | NEW |