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 COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
6 #define COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ | 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
12 #include "components/scheduler/scheduler_export.h" | 12 #include "public/platform/WebCommon.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 namespace trace_event { | 15 namespace trace_event { |
16 class BlameContext; | 16 class BlameContext; |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
| 20 namespace blink { |
20 namespace scheduler { | 21 namespace scheduler { |
21 class TimeDomain; | 22 class TimeDomain; |
22 | 23 |
23 class SCHEDULER_EXPORT TaskQueue : public base::SingleThreadTaskRunner { | 24 class BLINK_PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner { |
24 public: | 25 public: |
25 TaskQueue() {} | 26 TaskQueue() {} |
26 | 27 |
27 // Unregisters the task queue after which no tasks posted to it will run and | 28 // Unregisters the task queue after which no tasks posted to it will run and |
28 // the TaskQueueManager's reference to it will be released soon. | 29 // the TaskQueueManager's reference to it will be released soon. |
29 virtual void UnregisterTaskQueue() = 0; | 30 virtual void UnregisterTaskQueue() = 0; |
30 | 31 |
31 enum QueuePriority { | 32 enum QueuePriority { |
32 // Queues with control priority will run before any other queue, and will | 33 // Queues with control priority will run before any other queue, and will |
33 // explicitly starve other queues. Typically this should only be used for | 34 // explicitly starve other queues. Typically this should only be used for |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Returns the queue's current TimeDomain. Can be called from any thread. | 205 // Returns the queue's current TimeDomain. Can be called from any thread. |
205 virtual TimeDomain* GetTimeDomain() const = 0; | 206 virtual TimeDomain* GetTimeDomain() const = 0; |
206 | 207 |
207 protected: | 208 protected: |
208 ~TaskQueue() override {} | 209 ~TaskQueue() override {} |
209 | 210 |
210 DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 211 DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
211 }; | 212 }; |
212 | 213 |
213 } // namespace scheduler | 214 } // namespace scheduler |
| 215 } // namespace blink |
214 | 216 |
215 #endif // COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ | 217 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ |
OLD | NEW |