| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Runs a single nestable task from the |queue|. On exit, |out_task| will | 265 // Runs a single nestable task from the |queue|. On exit, |out_task| will |
| 266 // contain the task which was executed. Non-nestable task are reposted on the | 266 // contain the task which was executed. Non-nestable task are reposted on the |
| 267 // run loop. The queue must not be empty. On exit |time_after_task| may get | 267 // run loop. The queue must not be empty. On exit |time_after_task| may get |
| 268 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately | 268 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately |
| 269 // after running the task. | 269 // after running the task. |
| 270 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue, | 270 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue, |
| 271 bool is_nested, | 271 bool is_nested, |
| 272 LazyNow time_before_task, | 272 LazyNow time_before_task, |
| 273 base::TimeTicks* time_after_task); | 273 base::TimeTicks* time_after_task); |
| 274 | 274 |
| 275 bool RunsTasksOnCurrentThread() const; | 275 bool RunsTasksInCurrentSequence() const; |
| 276 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 276 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
| 277 const base::Closure& task, | 277 const base::Closure& task, |
| 278 base::TimeDelta delay); | 278 base::TimeDelta delay); |
| 279 | 279 |
| 280 internal::EnqueueOrder GetNextSequenceNumber(); | 280 internal::EnqueueOrder GetNextSequenceNumber(); |
| 281 | 281 |
| 282 // Calls DelayTillNextTask on all time domains and returns the smallest delay | 282 // Calls DelayTillNextTask on all time domains and returns the smallest delay |
| 283 // requested if any. | 283 // requested if any. |
| 284 base::Optional<NextTaskDelay> ComputeDelayTillNextTaskLocked( | 284 base::Optional<NextTaskDelay> ComputeDelayTillNextTaskLocked( |
| 285 LazyNow* lazy_now); | 285 LazyNow* lazy_now); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 scoped_refptr<DeletionSentinel> deletion_sentinel_; | 375 scoped_refptr<DeletionSentinel> deletion_sentinel_; |
| 376 base::WeakPtrFactory<TaskQueueManager> weak_factory_; | 376 base::WeakPtrFactory<TaskQueueManager> weak_factory_; |
| 377 | 377 |
| 378 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); | 378 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 } // namespace scheduler | 381 } // namespace scheduler |
| 382 } // namespace blink | 382 } // namespace blink |
| 383 | 383 |
| 384 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ | 384 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_
H_ |
| OLD | NEW |