OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/child/scheduler/null_worker_scheduler.h" | 5 #include "components/scheduler/child/null_worker_scheduler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/child/scheduler/null_idle_task_runner.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "components/scheduler/child/null_idle_task_runner.h" |
10 | 11 |
11 namespace content { | 12 namespace scheduler { |
12 | 13 |
13 NullWorkerScheduler::NullWorkerScheduler() | 14 NullWorkerScheduler::NullWorkerScheduler() |
14 : task_runner_(base::MessageLoopProxy::current()), | 15 : task_runner_(base::ThreadTaskRunnerHandle::Get()), |
15 idle_task_runner_(new NullIdleTaskRunner()) { | 16 idle_task_runner_(new NullIdleTaskRunner()) { |
16 } | 17 } |
17 | 18 |
18 NullWorkerScheduler::~NullWorkerScheduler() { | 19 NullWorkerScheduler::~NullWorkerScheduler() { |
19 } | 20 } |
20 | 21 |
21 scoped_refptr<base::SingleThreadTaskRunner> | 22 scoped_refptr<base::SingleThreadTaskRunner> |
22 NullWorkerScheduler::DefaultTaskRunner() { | 23 NullWorkerScheduler::DefaultTaskRunner() { |
23 return task_runner_; | 24 return task_runner_; |
24 } | 25 } |
(...skipping 20 matching lines...) Expand all Loading... |
45 bool NullWorkerScheduler::ShouldYieldForHighPriorityWork() { | 46 bool NullWorkerScheduler::ShouldYieldForHighPriorityWork() { |
46 return false; | 47 return false; |
47 } | 48 } |
48 | 49 |
49 void NullWorkerScheduler::Init() { | 50 void NullWorkerScheduler::Init() { |
50 } | 51 } |
51 | 52 |
52 void NullWorkerScheduler::Shutdown() { | 53 void NullWorkerScheduler::Shutdown() { |
53 } | 54 } |
54 | 55 |
55 } // namespace content | 56 } // namespace scheduler |
OLD | NEW |