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

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

Issue 100623003: Remove separate thread for the shell on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: , Created 7 years 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
« no previous file with comments | « mojo/shell/android/mojo_main.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef MOJO_SHELL_TASK_RUNNERS_H_ 5 #ifndef MOJO_SHELL_TASK_RUNNERS_H_
6 #define MOJO_SHELL_TASK_RUNNERS_H_ 6 #define MOJO_SHELL_TASK_RUNNERS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 base::SingleThreadTaskRunner* file_runner() const { 29 base::SingleThreadTaskRunner* file_runner() const {
30 return file_thread_->message_loop_proxy(); 30 return file_thread_->message_loop_proxy();
31 } 31 }
32 32
33 base::MessageLoopProxy* cache_runner() const { 33 base::MessageLoopProxy* cache_runner() const {
34 return cache_thread_->message_loop_proxy(); 34 return cache_thread_->message_loop_proxy();
35 } 35 }
36 36
37 #if defined(OS_ANDROID)
38 void set_java_runner(base::SingleThreadTaskRunner* java_runner) {
39 java_runner_ = java_runner;
40 }
41
42 base::SingleThreadTaskRunner* java_runner() const {
43 return java_runner_.get();
44 }
45 #endif // defined(OS_ANDROID)
46
47 private: 37 private:
38 // TODO(beng): should this be named shell_runner_?
48 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_; 39 scoped_refptr<base::SingleThreadTaskRunner> ui_runner_;
49 scoped_ptr<base::Thread> cache_thread_; 40 scoped_ptr<base::Thread> cache_thread_;
50 scoped_ptr<base::Thread> io_thread_; 41 scoped_ptr<base::Thread> io_thread_;
51 scoped_ptr<base::Thread> file_thread_; 42 scoped_ptr<base::Thread> file_thread_;
52 43
53 #if defined(OS_ANDROID)
54 scoped_refptr<base::SingleThreadTaskRunner> java_runner_;
55 #endif // defined(OS_ANDROID)
56
57 DISALLOW_COPY_AND_ASSIGN(TaskRunners); 44 DISALLOW_COPY_AND_ASSIGN(TaskRunners);
58 }; 45 };
59 46
60 } // namespace shell 47 } // namespace shell
61 } // namespace mojo 48 } // namespace mojo
62 49
63 #endif // MOJO_SHELL_TASK_RUNNERS_H_ 50 #endif // MOJO_SHELL_TASK_RUNNERS_H_
OLDNEW
« no previous file with comments | « mojo/shell/android/mojo_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698