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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue, | 273 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue, |
274 bool is_nested, | 274 bool is_nested, |
275 LazyNow time_before_task, | 275 LazyNow time_before_task, |
276 base::TimeTicks* time_after_task); | 276 base::TimeTicks* time_after_task); |
277 | 277 |
278 bool RunsTasksOnCurrentThread() const; | 278 bool RunsTasksOnCurrentThread() const; |
279 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 279 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
280 const base::Closure& task, | 280 const base::Closure& task, |
281 base::TimeDelta delay); | 281 base::TimeDelta delay); |
282 | 282 |
283 internal::EnqueueOrder GetNextSequenceNumber(); | 283 internal::EnqueueOrder GetNextEnqueueOrder(base::TimeTicks delayed_run_time); |
284 | 284 |
285 // Calls DelayTillNextTask on all time domains and returns the smallest delay | 285 // Calls DelayTillNextTask on all time domains and returns the smallest delay |
286 // requested if any. | 286 // requested if any. |
287 base::Optional<NextTaskDelay> ComputeDelayTillNextTaskLocked( | 287 base::Optional<NextTaskDelay> ComputeDelayTillNextTaskLocked( |
288 LazyNow* lazy_now); | 288 LazyNow* lazy_now); |
289 | 289 |
290 void MaybeRecordTaskDelayHistograms( | 290 void MaybeRecordTaskDelayHistograms( |
291 const internal::TaskQueueImpl::Task& pending_task, | 291 const internal::TaskQueueImpl::Task& pending_task, |
292 const internal::TaskQueueImpl* queue); | 292 const internal::TaskQueueImpl* queue); |
293 | 293 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 scoped_refptr<DeletionSentinel> deletion_sentinel_; | 382 scoped_refptr<DeletionSentinel> deletion_sentinel_; |
383 base::WeakPtrFactory<TaskQueueManager> weak_factory_; | 383 base::WeakPtrFactory<TaskQueueManager> weak_factory_; |
384 | 384 |
385 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); | 385 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); |
386 }; | 386 }; |
387 | 387 |
388 } // namespace scheduler | 388 } // namespace scheduler |
389 } // namespace blink | 389 } // namespace blink |
390 | 390 |
391 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ | 391 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ |
OLD | NEW |