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 COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 5 #ifndef COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ |
6 #define COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 6 #define COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Schedules a call to TaskQueueImpl::MoveReadyDelayedTasksToDelayedWorkQueue | 82 // Schedules a call to TaskQueueImpl::MoveReadyDelayedTasksToDelayedWorkQueue |
83 // when this TimeDomain reaches |delayed_run_time|. | 83 // when this TimeDomain reaches |delayed_run_time|. |
84 void ScheduleDelayedWork(internal::TaskQueueImpl* queue, | 84 void ScheduleDelayedWork(internal::TaskQueueImpl* queue, |
85 base::TimeTicks delayed_run_time, | 85 base::TimeTicks delayed_run_time, |
86 base::TimeTicks now); | 86 base::TimeTicks now); |
87 | 87 |
88 // Registers the |queue|. | 88 // Registers the |queue|. |
89 void RegisterQueue(internal::TaskQueueImpl* queue); | 89 void RegisterQueue(internal::TaskQueueImpl* queue); |
90 | 90 |
91 // Removes |queue| from the set of task queues that UpdateWorkQueues calls | 91 // Removes |queue| from the set of task queues that UpdateWorkQueues calls |
92 // UpdateWorkQueue on. | 92 // UpdateWorkQueue on. Returns true if |queue| was updatable. |
93 void UnregisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue); | 93 bool UnregisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue); |
94 | 94 |
95 // Removes |queue| from all internal data structures. | 95 // Removes |queue| from all internal data structures. |
96 void UnregisterQueue(internal::TaskQueueImpl* queue); | 96 void UnregisterQueue(internal::TaskQueueImpl* queue); |
97 | 97 |
98 // Updates active queues associated with this TimeDomain. | 98 // Updates active queues associated with this TimeDomain. |
99 void UpdateWorkQueues(bool should_trigger_wakeup, | 99 void UpdateWorkQueues(bool should_trigger_wakeup, |
100 const internal::TaskQueueImpl::Task* previous_task, | 100 const internal::TaskQueueImpl::Task* previous_task, |
101 LazyNow lazy_now); | 101 LazyNow lazy_now); |
102 | 102 |
103 // Called by the TaskQueueManager when the TimeDomain is registered. | 103 // Called by the TaskQueueManager when the TimeDomain is registered. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 Observer* observer_; // NOT OWNED. | 148 Observer* observer_; // NOT OWNED. |
149 | 149 |
150 base::ThreadChecker main_thread_checker_; | 150 base::ThreadChecker main_thread_checker_; |
151 | 151 |
152 DISALLOW_COPY_AND_ASSIGN(TimeDomain); | 152 DISALLOW_COPY_AND_ASSIGN(TimeDomain); |
153 }; | 153 }; |
154 | 154 |
155 } // namespace scheduler | 155 } // namespace scheduler |
156 | 156 |
157 #endif // COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 157 #endif // COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ |
OLD | NEW |