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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // Runs a single nestable task from the |queue|. On exit, |out_task| will | 268 // Runs a single nestable task from the |queue|. On exit, |out_task| will |
269 // contain the task which was executed. Non-nestable task are reposted on the | 269 // contain the task which was executed. Non-nestable task are reposted on the |
270 // run loop. The queue must not be empty. On exit |time_after_task| may get | 270 // run loop. The queue must not be empty. On exit |time_after_task| may get |
271 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately | 271 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately |
272 // after running the task. | 272 // after running the task. |
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 RunsTasksInCurrentSequence() 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 GetNextSequenceNumber(); |
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); |
(...skipping 93 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 |