Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Side by Side Diff: third_party/WebKit/public/platform/scheduler/base/task_queue.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 LazyNow; 22 class LazyNow;
22 class TimeDomain; 23 class TimeDomain;
23 24
24 class SCHEDULER_EXPORT TaskQueue : public base::SingleThreadTaskRunner { 25 class BLINK_PLATFORM_EXPORT TaskQueue : public base::SingleThreadTaskRunner {
25 public: 26 public:
26 TaskQueue() {} 27 TaskQueue() {}
27 28
28 // Unregisters the task queue after which no tasks posted to it will run and 29 // Unregisters the task queue after which no tasks posted to it will run and
29 // the TaskQueueManager's reference to it will be released soon. 30 // the TaskQueueManager's reference to it will be released soon.
30 virtual void UnregisterTaskQueue() = 0; 31 virtual void UnregisterTaskQueue() = 0;
31 32
32 enum QueuePriority { 33 enum QueuePriority {
33 // Queues with control priority will run before any other queue, and will 34 // Queues with control priority will run before any other queue, and will
34 // explicitly starve other queues. Typically this should only be used for 35 // explicitly starve other queues. Typically this should only be used for
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Returns the queue's current TimeDomain. Can be called from any thread. 206 // Returns the queue's current TimeDomain. Can be called from any thread.
206 virtual TimeDomain* GetTimeDomain() const = 0; 207 virtual TimeDomain* GetTimeDomain() const = 0;
207 208
208 protected: 209 protected:
209 ~TaskQueue() override {} 210 ~TaskQueue() override {}
210 211
211 DISALLOW_COPY_AND_ASSIGN(TaskQueue); 212 DISALLOW_COPY_AND_ASSIGN(TaskQueue);
212 }; 213 };
213 214
214 } // namespace scheduler 215 } // namespace scheduler
216 } // namespace blink
215 217
216 #endif // COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ 218 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698