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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 // Removes |queue| from the set of task queues that UpdateWorkQueues calls | 98 // Removes |queue| from the set of task queues that UpdateWorkQueues calls |
99 // UpdateWorkQueue on. | 99 // UpdateWorkQueue on. |
100 void UnregisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue); | 100 void UnregisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue); |
101 | 101 |
102 // Removes |queue| from all internal data structures. | 102 // Removes |queue| from all internal data structures. |
103 void UnregisterQueue(internal::TaskQueueImpl* queue); | 103 void UnregisterQueue(internal::TaskQueueImpl* queue); |
104 | 104 |
105 // Updates active queues associated with this TimeDomain. | 105 // Updates active queues associated with this TimeDomain. |
106 void UpdateWorkQueues(bool should_trigger_wakeup, | 106 void UpdateWorkQueues(bool should_trigger_wakeup, |
107 const internal::TaskQueueImpl::Task* previous_task); | 107 const internal::TaskQueueImpl::Task* previous_task, |
| 108 LazyNow lazy_now); |
108 | 109 |
109 // Called by the TaskQueueManager when the TimeDomain is registered. | 110 // Called by the TaskQueueManager when the TimeDomain is registered. |
110 virtual void OnRegisterWithTaskQueueManager( | 111 virtual void OnRegisterWithTaskQueueManager( |
111 TaskQueueManager* task_queue_manager) = 0; | 112 TaskQueueManager* task_queue_manager) = 0; |
112 | 113 |
113 // The implementaion will secedule task processing to run with |delay| with | 114 // The implementaion will secedule task processing to run with |delay| with |
114 // respect to the TimeDomain's time source. Always called on the main thread. | 115 // respect to the TimeDomain's time source. Always called on the main thread. |
115 // NOTE this is only called by ScheduleDelayedWork if the scheduled runtime | 116 // NOTE this is only called by ScheduleDelayedWork if the scheduled runtime |
116 // is sooner than any previously sheduled work or if there is no other | 117 // is sooner than any previously sheduled work or if there is no other |
117 // scheduled work. | 118 // scheduled work. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 Observer* observer_; // NOT OWNED. | 155 Observer* observer_; // NOT OWNED. |
155 | 156 |
156 base::ThreadChecker main_thread_checker_; | 157 base::ThreadChecker main_thread_checker_; |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(TimeDomain); | 159 DISALLOW_COPY_AND_ASSIGN(TimeDomain); |
159 }; | 160 }; |
160 | 161 |
161 } // namespace scheduler | 162 } // namespace scheduler |
162 | 163 |
163 #endif // COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ | 164 #endif // COMPONENTS_SCHEDULER_BASE_TIME_DOMAIN_H_ |
OLD | NEW |