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 CONTENT_CHILD_SCHEDULER_NULL_WORKER_SCHEDULER_H_
6 #define CONTENT_CHILD_SCHEDULER_NULL_WORKER_SCHEDULER_H_
8 #include "content/child/scheduler/worker_scheduler.h"
12 class NullWorkerScheduler
: public WorkerScheduler
{
14 NullWorkerScheduler();
15 ~NullWorkerScheduler() override
;
17 scoped_refptr
<base::SingleThreadTaskRunner
> DefaultTaskRunner() override
;
18 scoped_refptr
<SingleThreadIdleTaskRunner
> IdleTaskRunner() override
;
20 void AddTaskObserver(base::MessageLoop::TaskObserver
* task_observer
) override
;
21 void RemoveTaskObserver(
22 base::MessageLoop::TaskObserver
* task_observer
) override
;
23 bool CanExceedIdleDeadlineIfRequired() const override
;
25 void Shutdown() override
;
28 scoped_refptr
<base::SingleThreadTaskRunner
> task_runner_
;
29 scoped_refptr
<SingleThreadIdleTaskRunner
> idle_task_runner_
;
31 DISALLOW_COPY_AND_ASSIGN(NullWorkerScheduler
);
34 } // namespace content
36 #endif // CONTENT_CHILD_SCHEDULER_NULL_WORKER_SCHEDULER_H_