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 CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ | 6 #define CONTENT_RENDERER_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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 const scoped_refptr<TaskQueueManagerDelegate>& delegate() const; | 119 const scoped_refptr<TaskQueueManagerDelegate>& delegate() const; |
120 | 120 |
121 // Time domains must be registered for the task queues to get updated. | 121 // Time domains must be registered for the task queues to get updated. |
122 void RegisterTimeDomain(TimeDomain* time_domain); | 122 void RegisterTimeDomain(TimeDomain* time_domain); |
123 void UnregisterTimeDomain(TimeDomain* time_domain); | 123 void UnregisterTimeDomain(TimeDomain* time_domain); |
124 | 124 |
125 RealTimeDomain* real_time_domain() const { return real_time_domain_.get(); } | 125 RealTimeDomain* real_time_domain() const { return real_time_domain_.get(); } |
126 | 126 |
127 LazyNow CreateLazyNow() const; | 127 LazyNow CreateLazyNow() const; |
128 | 128 |
129 internal::TaskQueueImpl* currently_executing_task_queue() const { | |
Sami
2016/02/01 17:05:39
Forgot to make this use the non-internal interface
alex clarke (OOO till 29th)
2016/02/01 17:50:09
Done.
| |
130 return currently_executing_task_queue_.get(); | |
131 } | |
132 | |
129 private: | 133 private: |
130 friend class LazyNow; | 134 friend class LazyNow; |
131 friend class internal::TaskQueueImpl; | 135 friend class internal::TaskQueueImpl; |
132 friend class TaskQueueManagerTest; | 136 friend class TaskQueueManagerTest; |
133 | 137 |
134 class DeletionSentinel : public base::RefCounted<DeletionSentinel> { | 138 class DeletionSentinel : public base::RefCounted<DeletionSentinel> { |
135 private: | 139 private: |
136 friend class base::RefCounted<DeletionSentinel>; | 140 friend class base::RefCounted<DeletionSentinel>; |
137 ~DeletionSentinel() {} | 141 ~DeletionSentinel() {} |
138 }; | 142 }; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 | 233 |
230 int work_batch_size_; | 234 int work_batch_size_; |
231 size_t task_count_; | 235 size_t task_count_; |
232 | 236 |
233 base::ObserverList<base::MessageLoop::TaskObserver> task_observers_; | 237 base::ObserverList<base::MessageLoop::TaskObserver> task_observers_; |
234 | 238 |
235 const char* tracing_category_; | 239 const char* tracing_category_; |
236 const char* disabled_by_default_tracing_category_; | 240 const char* disabled_by_default_tracing_category_; |
237 const char* disabled_by_default_verbose_tracing_category_; | 241 const char* disabled_by_default_verbose_tracing_category_; |
238 | 242 |
243 scoped_refptr<internal::TaskQueueImpl> currently_executing_task_queue_; | |
244 | |
239 Observer* observer_; // NOT OWNED | 245 Observer* observer_; // NOT OWNED |
240 scoped_refptr<DeletionSentinel> deletion_sentinel_; | 246 scoped_refptr<DeletionSentinel> deletion_sentinel_; |
241 base::WeakPtrFactory<TaskQueueManager> weak_factory_; | 247 base::WeakPtrFactory<TaskQueueManager> weak_factory_; |
242 | 248 |
243 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); | 249 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); |
244 }; | 250 }; |
245 | 251 |
246 } // namespace scheduler | 252 } // namespace scheduler |
247 | 253 |
248 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ | 254 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ |
OLD | NEW |