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.
5 #ifndef COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_H_
8 #include "base/message_loop/message_loop.h"
9 #include "components/scheduler/child/child_scheduler.h"
10 #include "components/scheduler/child/single_thread_idle_task_runner.h"
11 #include "components/scheduler/scheduler_export.h"
18 class SchedulerTaskRunnerDelegate
;
20 class SCHEDULER_EXPORT WorkerScheduler
: public ChildScheduler
{
22 ~WorkerScheduler() override
;
23 static scoped_ptr
<WorkerScheduler
> Create(
24 scoped_refptr
<SchedulerTaskRunnerDelegate
> main_task_runner
);
26 // Must be called before the scheduler can be used. Does any post construction
27 // initialization needed such as initializing idle period detection.
28 virtual void Init() = 0;
32 DISALLOW_COPY_AND_ASSIGN(WorkerScheduler
);
35 } // namespace scheduler
37 #endif // COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_H_