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 CONTENT_RENDERER_SCHEDULER_BASE_WORK_QUEUE_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_BASE_WORK_QUEUE_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "base/trace_event/trace_event_argument.h" | 13 #include "base/trace_event/trace_event_argument.h" |
14 #include "components/scheduler/base/enqueue_order.h" | 14 #include "platform/scheduler/base/enqueue_order.h" |
15 #include "components/scheduler/base/task_queue_impl.h" | 15 #include "platform/scheduler/base/task_queue_impl.h" |
16 #include "components/scheduler/scheduler_export.h" | |
17 | 16 |
| 17 namespace blink { |
18 namespace scheduler { | 18 namespace scheduler { |
19 namespace internal { | 19 namespace internal { |
20 class WorkQueueSets; | 20 class WorkQueueSets; |
21 | 21 |
22 class SCHEDULER_EXPORT WorkQueue { | 22 class BLINK_PLATFORM_EXPORT WorkQueue { |
23 public: | 23 public: |
24 WorkQueue(TaskQueueImpl* task_queue, const char* name); | 24 WorkQueue(TaskQueueImpl* task_queue, const char* name); |
25 ~WorkQueue(); | 25 ~WorkQueue(); |
26 | 26 |
27 // Associates this work queue with the given work queue sets. This must be | 27 // Associates this work queue with the given work queue sets. This must be |
28 // called before any tasks can be inserted into this work queue. | 28 // called before any tasks can be inserted into this work queue. |
29 void AssignToWorkQueueSets(WorkQueueSets* work_queue_sets); | 29 void AssignToWorkQueueSets(WorkQueueSets* work_queue_sets); |
30 | 30 |
31 // Assigns the current set index. | 31 // Assigns the current set index. |
32 void AssignSetIndex(size_t work_queue_set_index); | 32 void AssignSetIndex(size_t work_queue_set_index); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 WorkQueueSets* work_queue_sets_; // NOT OWNED. | 87 WorkQueueSets* work_queue_sets_; // NOT OWNED. |
88 TaskQueueImpl* task_queue_; // NOT OWNED. | 88 TaskQueueImpl* task_queue_; // NOT OWNED. |
89 size_t work_queue_set_index_; | 89 size_t work_queue_set_index_; |
90 const char* name_; | 90 const char* name_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(WorkQueue); | 92 DISALLOW_COPY_AND_ASSIGN(WorkQueue); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace internal | 95 } // namespace internal |
96 } // namespace scheduler | 96 } // namespace scheduler |
| 97 } // namespace blink |
97 | 98 |
98 #endif // CONTENT_RENDERER_SCHEDULER_BASE_WORK_QUEUE_H_ | 99 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_ |
OLD | NEW |