Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: components/scheduler/base/task_queue_manager.h

Issue 1652083002: Prepare for per-webview virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 TaskQueue* currently_executing_task_queue() const {
130 return currently_executing_task_queue_;
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
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 internal::TaskQueueImpl* currently_executing_task_queue_; // NOT OWNED
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_
OLDNEW
« no previous file with comments | « components/scheduler/base/task_queue_impl.cc ('k') | components/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698