Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: components/scheduler/child/null_worker_scheduler.cc

Issue 1058873010: Move blink scheduler implementation into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/scheduler/child/null_worker_scheduler.h ('k') | components/scheduler/child/prioritizing_task_queue_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698