OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_CHILD_SCHEDULER_WORKER_SCHEDULER_H_ | |
6 #define CONTENT_CHILD_SCHEDULER_WORKER_SCHEDULER_H_ | |
7 | |
8 #include "base/message_loop/message_loop.h" | |
9 #include "content/child/scheduler/child_scheduler.h" | |
10 #include "content/child/scheduler/single_thread_idle_task_runner.h" | |
11 #include "content/common/content_export.h" | |
12 | |
13 namespace base { | |
14 class MessageLoop; | |
15 } | |
16 | |
17 namespace content { | |
18 | |
19 class CONTENT_EXPORT WorkerScheduler : public ChildScheduler { | |
20 public: | |
21 ~WorkerScheduler() override; | |
22 static scoped_ptr<WorkerScheduler> Create(base::MessageLoop* message_loop); | |
23 | |
24 // Must be called before the scheduler can be used. Does any post construction | |
25 // initialization needed such as initializing idle period detection. | |
26 virtual void Init() = 0; | |
27 | |
28 protected: | |
29 WorkerScheduler(); | |
30 DISALLOW_COPY_AND_ASSIGN(WorkerScheduler); | |
31 }; | |
32 | |
33 } // namespace content | |
34 | |
35 #endif // CONTENT_CHILD_SCHEDULER_WORKER_SCHEDULER_H_ | |
OLD | NEW |