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

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

Issue 27943002: Teach mojo_shell how to load http URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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_SHELL_TASK_RUNNERS_H_
6 #define MOJO_SHELL_TASK_RUNNERS_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/threading/thread.h"
11
12 namespace mojo {
13 namespace shell {
14
15 // A context object that contains the common task runners for the shell
16 class TaskRunners {
17 public:
18 explicit TaskRunners(base::SingleThreadTaskRunner* ui_runner);
19 ~TaskRunners();
20
21 base::SingleThreadTaskRunner* ui_runner() const {
22 return ui_runner_.get();
23 }
24
25 base::SingleThreadTaskRunner* io_runner() const {
26 return io_thread_->message_loop_proxy();
27 }
28
29 private:
30 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_;
31 scoped_ptr<base::Thread> io_thread_;
32
33 DISALLOW_COPY_AND_ASSIGN(TaskRunners);
34 };
35
36 } // namespace shell
37 } // namespace mojo
38
39 #endif // MOJO_SHELL_TASK_RUNNERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698