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_TASK_QUEUE_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ |
7 | 7 |
8 #include "base/atomic_sequence_num.h" | 8 #include "base/atomic_sequence_num.h" |
9 #include "base/debug/task_annotator.h" | 9 #include "base/debug/task_annotator.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 std::vector<scoped_refptr<internal::TaskQueue>> queues_; | 123 std::vector<scoped_refptr<internal::TaskQueue>> queues_; |
124 base::AtomicSequenceNumber task_sequence_num_; | 124 base::AtomicSequenceNumber task_sequence_num_; |
125 base::debug::TaskAnnotator task_annotator_; | 125 base::debug::TaskAnnotator task_annotator_; |
126 | 126 |
127 base::ThreadChecker main_thread_checker_; | 127 base::ThreadChecker main_thread_checker_; |
128 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 128 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
129 TaskQueueSelector* selector_; | 129 TaskQueueSelector* selector_; |
130 | 130 |
131 base::WeakPtr<TaskQueueManager> task_queue_manager_weak_ptr_; | 131 base::WeakPtr<TaskQueueManager> task_queue_manager_weak_ptr_; |
132 base::WeakPtrFactory<TaskQueueManager> weak_factory_; | |
133 | 132 |
134 // The pending_dowork_count_ is only tracked on the main thread since that's | 133 // The pending_dowork_count_ is only tracked on the main thread since that's |
135 // where re-entrant problems happen. | 134 // where re-entrant problems happen. |
136 int pending_dowork_count_; | 135 int pending_dowork_count_; |
137 | 136 |
| 137 base::WeakPtrFactory<TaskQueueManager> weak_factory_; |
| 138 |
138 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); | 139 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace content | 142 } // namespace content |
142 | 143 |
143 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ | 144 #endif // CONTENT_RENDERER_SCHEDULER_TASK_QUEUE_MANAGER_H_ |
OLD | NEW |