Add a WorkerScheduler and a WebThreadImplForWorker
[chromium-blink-merge.git] / content / child / scheduler / null_worker_scheduler.h
blob919ffadc854749bc403578eba438c369b8f6a943
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"
10 namespace content {
12 class NullWorkerScheduler : public WorkerScheduler {
13 public:
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;
24 void Init() override;
25 void Shutdown() override;
27 private:
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_