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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; | 134 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; |
135 void InsertFence() override; | 135 void InsertFence() override; |
136 void RemoveFence() override; | 136 void RemoveFence() override; |
137 bool BlockedByFence() const override; | 137 bool BlockedByFence() const override; |
138 | 138 |
139 // If this returns false then future updates for this queue are not needed | 139 // If this returns false then future updates for this queue are not needed |
140 // unless requested. | 140 // unless requested. |
141 bool MaybeUpdateImmediateWorkQueues(); | 141 bool MaybeUpdateImmediateWorkQueues(); |
142 | 142 |
143 const char* GetName() const override; | 143 const char* GetName() const override; |
| 144 QueueType GetQueueType() const override; |
144 | 145 |
145 void AsValueInto(base::trace_event::TracedValue* state) const; | 146 void AsValueInto(base::trace_event::TracedValue* state) const; |
146 | 147 |
147 bool GetQuiescenceMonitored() const { return should_monitor_quiescence_; } | 148 bool GetQuiescenceMonitored() const { return should_monitor_quiescence_; } |
148 bool GetShouldNotifyObservers() const { return should_notify_observers_; } | 149 bool GetShouldNotifyObservers() const { return should_notify_observers_; } |
149 | 150 |
150 void NotifyWillProcessTask(const base::PendingTask& pending_task); | 151 void NotifyWillProcessTask(const base::PendingTask& pending_task); |
151 void NotifyDidProcessTask(const base::PendingTask& pending_task); | 152 void NotifyDidProcessTask(const base::PendingTask& pending_task); |
152 | 153 |
153 // Can be called on any thread. | 154 // Can be called on any thread. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 AnyThread any_thread_; | 272 AnyThread any_thread_; |
272 struct AnyThread& any_thread() { | 273 struct AnyThread& any_thread() { |
273 any_thread_lock_.AssertAcquired(); | 274 any_thread_lock_.AssertAcquired(); |
274 return any_thread_; | 275 return any_thread_; |
275 } | 276 } |
276 const struct AnyThread& any_thread() const { | 277 const struct AnyThread& any_thread() const { |
277 any_thread_lock_.AssertAcquired(); | 278 any_thread_lock_.AssertAcquired(); |
278 return any_thread_; | 279 return any_thread_; |
279 } | 280 } |
280 | 281 |
| 282 const QueueType type_; |
281 const char* name_; | 283 const char* name_; |
282 const char* disabled_by_default_tracing_category_; | 284 const char* disabled_by_default_tracing_category_; |
283 const char* disabled_by_default_verbose_tracing_category_; | 285 const char* disabled_by_default_verbose_tracing_category_; |
284 | 286 |
285 base::ThreadChecker main_thread_checker_; | 287 base::ThreadChecker main_thread_checker_; |
286 MainThreadOnly main_thread_only_; | 288 MainThreadOnly main_thread_only_; |
287 MainThreadOnly& main_thread_only() { | 289 MainThreadOnly& main_thread_only() { |
288 DCHECK(main_thread_checker_.CalledOnValidThread()); | 290 DCHECK(main_thread_checker_.CalledOnValidThread()); |
289 return main_thread_only_; | 291 return main_thread_only_; |
290 } | 292 } |
291 const MainThreadOnly& main_thread_only() const { | 293 const MainThreadOnly& main_thread_only() const { |
292 DCHECK(main_thread_checker_.CalledOnValidThread()); | 294 DCHECK(main_thread_checker_.CalledOnValidThread()); |
293 return main_thread_only_; | 295 return main_thread_only_; |
294 } | 296 } |
295 | 297 |
296 const bool should_monitor_quiescence_; | 298 const bool should_monitor_quiescence_; |
297 const bool should_notify_observers_; | 299 const bool should_notify_observers_; |
298 const bool should_report_when_execution_blocked_; | 300 const bool should_report_when_execution_blocked_; |
299 | 301 |
300 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 302 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
301 }; | 303 }; |
302 | 304 |
303 } // namespace internal | 305 } // namespace internal |
304 } // namespace scheduler | 306 } // namespace scheduler |
305 } // namespace blink | 307 } // namespace blink |
306 | 308 |
307 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 309 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
OLD | NEW |