OLD | NEW |
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_CHILD_WORKER_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ |
6 #define COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include "components/scheduler/child/idle_helper.h" | 8 #include "components/scheduler/child/idle_helper.h" |
9 #include "components/scheduler/child/scheduler_helper.h" | 9 #include "components/scheduler/child/scheduler_helper.h" |
10 #include "components/scheduler/child/worker_scheduler.h" | 10 #include "components/scheduler/child/worker_scheduler.h" |
11 #include "components/scheduler/scheduler_export.h" | 11 #include "components/scheduler/scheduler_export.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 namespace trace_event { | 14 namespace trace_event { |
15 class ConvertableToTraceFormat; | 15 class ConvertableToTraceFormat; |
16 } | 16 } |
17 } | 17 } |
18 | 18 |
19 namespace scheduler { | 19 namespace scheduler { |
20 | 20 |
21 class SchedulerTaskRunnerDelegate; | 21 class SchedulerTqmDelegate; |
22 | 22 |
23 class SCHEDULER_EXPORT WorkerSchedulerImpl : public WorkerScheduler, | 23 class SCHEDULER_EXPORT WorkerSchedulerImpl : public WorkerScheduler, |
24 public IdleHelper::Delegate { | 24 public IdleHelper::Delegate { |
25 public: | 25 public: |
26 explicit WorkerSchedulerImpl( | 26 explicit WorkerSchedulerImpl( |
27 scoped_refptr<SchedulerTaskRunnerDelegate> main_task_runner); | 27 scoped_refptr<SchedulerTqmDelegate> main_task_runner); |
28 ~WorkerSchedulerImpl() override; | 28 ~WorkerSchedulerImpl() override; |
29 | 29 |
30 // WorkerScheduler implementation: | 30 // WorkerScheduler implementation: |
31 scoped_refptr<TaskQueue> DefaultTaskRunner() override; | 31 scoped_refptr<TaskQueue> DefaultTaskRunner() override; |
32 scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() override; | 32 scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() override; |
33 bool CanExceedIdleDeadlineIfRequired() const override; | 33 bool CanExceedIdleDeadlineIfRequired() const override; |
34 bool ShouldYieldForHighPriorityWork() override; | 34 bool ShouldYieldForHighPriorityWork() override; |
35 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; | 35 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; |
36 void RemoveTaskObserver( | 36 void RemoveTaskObserver( |
37 base::MessageLoop::TaskObserver* task_observer) override; | 37 base::MessageLoop::TaskObserver* task_observer) override; |
(...skipping 18 matching lines...) Expand all Loading... |
56 SchedulerHelper helper_; | 56 SchedulerHelper helper_; |
57 IdleHelper idle_helper_; | 57 IdleHelper idle_helper_; |
58 bool initialized_; | 58 bool initialized_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(WorkerSchedulerImpl); | 60 DISALLOW_COPY_AND_ASSIGN(WorkerSchedulerImpl); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace scheduler | 63 } // namespace scheduler |
64 | 64 |
65 #endif // COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ | 65 #endif // COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ |
OLD | NEW |