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

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

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit 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
« no previous file with comments | « mojo/shell/switches.cc ('k') | mojo/shell/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 SHELL_TASK_RUNNERS_H_
6 #define SHELL_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/message_loop/message_loop_proxy.h"
12 #include "base/threading/thread.h"
13
14 namespace base {
15 class SequencedWorkerPool;
16 }
17
18 namespace mojo {
19 namespace shell {
20
21 // A context object that contains the common task runners for the shell's main
22 // process.
23 class TaskRunners {
24 public:
25 explicit TaskRunners(
26 const scoped_refptr<base::SingleThreadTaskRunner>& shell_runner);
27 ~TaskRunners();
28
29 base::SingleThreadTaskRunner* shell_runner() const {
30 return shell_runner_.get();
31 }
32
33 base::SingleThreadTaskRunner* io_runner() const {
34 return io_thread_->message_loop_proxy().get();
35 }
36
37 base::SequencedWorkerPool* blocking_pool() const {
38 return blocking_pool_.get();
39 }
40
41 private:
42 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_;
43 scoped_ptr<base::Thread> io_thread_;
44
45 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
46
47 DISALLOW_COPY_AND_ASSIGN(TaskRunners);
48 };
49
50 } // namespace shell
51 } // namespace mojo
52
53 #endif // SHELL_TASK_RUNNERS_H_
OLDNEW
« no previous file with comments | « mojo/shell/switches.cc ('k') | mojo/shell/task_runners.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698