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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 base::MessageLoop::TaskObserver* task_observer) override; | 133 base::MessageLoop::TaskObserver* task_observer) override; |
134 void SetTimeDomain(TimeDomain* time_domain) override; | 134 void SetTimeDomain(TimeDomain* time_domain) override; |
135 TimeDomain* GetTimeDomain() const override; | 135 TimeDomain* GetTimeDomain() const override; |
136 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; | 136 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; |
137 void InsertFence(InsertFencePosition position) override; | 137 void InsertFence(InsertFencePosition position) override; |
138 void RemoveFence() override; | 138 void RemoveFence() override; |
139 bool BlockedByFence() const override; | 139 bool BlockedByFence() const override; |
140 const char* GetName() const override; | 140 const char* GetName() const override; |
141 QueueType GetQueueType() const override; | 141 QueueType GetQueueType() const override; |
142 | 142 |
| 143 // Returns true if a (potentially hypothetical) task with the specified |
| 144 // |enqueue_order| could run on the queue. Must be called from the main |
| 145 // thread. |
| 146 bool CouldTaskRun(EnqueueOrder enqueue_order) const; |
| 147 |
143 // Must only be called from the thread this task queue was created on. | 148 // Must only be called from the thread this task queue was created on. |
144 void ReloadImmediateWorkQueueIfEmpty(); | 149 void ReloadImmediateWorkQueueIfEmpty(); |
145 | 150 |
146 void AsValueInto(base::trace_event::TracedValue* state) const; | 151 void AsValueInto(base::trace_event::TracedValue* state) const; |
147 | 152 |
148 bool GetQuiescenceMonitored() const { return should_monitor_quiescence_; } | 153 bool GetQuiescenceMonitored() const { return should_monitor_quiescence_; } |
149 bool GetShouldNotifyObservers() const { return should_notify_observers_; } | 154 bool GetShouldNotifyObservers() const { return should_notify_observers_; } |
150 | 155 |
151 void NotifyWillProcessTask(const base::PendingTask& pending_task); | 156 void NotifyWillProcessTask(const base::PendingTask& pending_task); |
152 void NotifyDidProcessTask(const base::PendingTask& pending_task); | 157 void NotifyDidProcessTask(const base::PendingTask& pending_task); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 const bool should_report_when_execution_blocked_; | 349 const bool should_report_when_execution_blocked_; |
345 | 350 |
346 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 351 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
347 }; | 352 }; |
348 | 353 |
349 } // namespace internal | 354 } // namespace internal |
350 } // namespace scheduler | 355 } // namespace scheduler |
351 } // namespace blink | 356 } // namespace blink |
352 | 357 |
353 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 358 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
OLD | NEW |