OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGER_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/atomic_sequence_num.h" | 10 #include "base/atomic_sequence_num.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // run loop. The queue must not be empty. | 182 // run loop. The queue must not be empty. |
183 enum class ProcessTaskResult { | 183 enum class ProcessTaskResult { |
184 DEFERRED, | 184 DEFERRED, |
185 EXECUTED, | 185 EXECUTED, |
186 TASK_QUEUE_MANAGER_DELETED | 186 TASK_QUEUE_MANAGER_DELETED |
187 }; | 187 }; |
188 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue); | 188 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue); |
189 | 189 |
190 bool RunsTasksOnCurrentThread() const; | 190 bool RunsTasksOnCurrentThread() const; |
191 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 191 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
192 const base::Closure& task, | 192 base::OnceClosure task, |
193 base::TimeDelta delay); | 193 base::TimeDelta delay); |
194 | 194 |
195 internal::EnqueueOrder GetNextSequenceNumber(); | 195 internal::EnqueueOrder GetNextSequenceNumber(); |
196 | 196 |
197 // Calls MaybeAdvanceTime on all time domains and returns true if one of them | 197 // Calls MaybeAdvanceTime on all time domains and returns true if one of them |
198 // was able to advance. | 198 // was able to advance. |
199 bool TryAdvanceTimeDomains(); | 199 bool TryAdvanceTimeDomains(); |
200 | 200 |
201 void MaybeRecordTaskDelayHistograms( | 201 void MaybeRecordTaskDelayHistograms( |
202 const internal::TaskQueueImpl::Task& pending_task, | 202 const internal::TaskQueueImpl::Task& pending_task, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 scoped_refptr<DeletionSentinel> deletion_sentinel_; | 252 scoped_refptr<DeletionSentinel> deletion_sentinel_; |
253 base::WeakPtrFactory<TaskQueueManager> weak_factory_; | 253 base::WeakPtrFactory<TaskQueueManager> weak_factory_; |
254 | 254 |
255 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); | 255 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); |
256 }; | 256 }; |
257 | 257 |
258 } // namespace scheduler | 258 } // namespace scheduler |
259 } // namespace blink | 259 } // namespace blink |
260 | 260 |
261 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ | 261 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ |
OLD | NEW |