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

Side by Side Diff: mojo/runner/task_runners.h

Issue 1630823002: Move mojo/runner to mojo/shell/standalone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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
« no previous file with comments | « mojo/runner/switches.cc ('k') | mojo/runner/task_runners.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef MOJO_RUNNER_TASK_RUNNERS_H_
6 #define MOJO_RUNNER_TASK_RUNNERS_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/thread.h"
12
13 namespace base {
14 class SequencedWorkerPool;
15 }
16
17 namespace mojo {
18 namespace runner {
19
20 // A context object that contains the common task runners for the shell's main
21 // process.
22 class TaskRunners {
23 public:
24 explicit TaskRunners(
25 const scoped_refptr<base::SingleThreadTaskRunner>& shell_runner);
26 ~TaskRunners();
27
28 base::SingleThreadTaskRunner* shell_runner() const {
29 return shell_runner_.get();
30 }
31
32 base::SingleThreadTaskRunner* io_runner() const {
33 return io_thread_->task_runner().get();
34 }
35
36 base::SequencedWorkerPool* blocking_pool() const {
37 return blocking_pool_.get();
38 }
39
40 private:
41 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_;
42 scoped_ptr<base::Thread> io_thread_;
43
44 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
45
46 DISALLOW_COPY_AND_ASSIGN(TaskRunners);
47 };
48
49 } // namespace runner
50 } // namespace mojo
51
52 #endif // MOJO_RUNNER_TASK_RUNNERS_H_
OLDNEW
« no previous file with comments | « mojo/runner/switches.cc ('k') | mojo/runner/task_runners.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698