| OLD | NEW |
| 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_RUNNER_TASK_RUNNERS_H_ | 5 #ifndef MOJO_RUNNER_TASK_RUNNERS_H_ |
| 6 #define MOJO_RUNNER_TASK_RUNNERS_H_ | 6 #define MOJO_RUNNER_TASK_RUNNERS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 explicit TaskRunners( | 25 explicit TaskRunners( |
| 26 const scoped_refptr<base::SingleThreadTaskRunner>& shell_runner); | 26 const scoped_refptr<base::SingleThreadTaskRunner>& shell_runner); |
| 27 ~TaskRunners(); | 27 ~TaskRunners(); |
| 28 | 28 |
| 29 base::SingleThreadTaskRunner* shell_runner() const { | 29 base::SingleThreadTaskRunner* shell_runner() const { |
| 30 return shell_runner_.get(); | 30 return shell_runner_.get(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 base::SingleThreadTaskRunner* io_runner() const { | 33 base::SingleThreadTaskRunner* io_runner() const { |
| 34 return io_thread_->message_loop_proxy().get(); | 34 return io_thread_->task_runner().get(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 base::SequencedWorkerPool* blocking_pool() const { | 37 base::SequencedWorkerPool* blocking_pool() const { |
| 38 return blocking_pool_.get(); | 38 return blocking_pool_.get(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; | 42 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; |
| 43 scoped_ptr<base::Thread> io_thread_; | 43 scoped_ptr<base::Thread> io_thread_; |
| 44 | 44 |
| 45 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 45 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(TaskRunners); | 47 DISALLOW_COPY_AND_ASSIGN(TaskRunners); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace runner | 50 } // namespace runner |
| 51 } // namespace mojo | 51 } // namespace mojo |
| 52 | 52 |
| 53 #endif // MOJO_RUNNER_TASK_RUNNERS_H_ | 53 #endif // MOJO_RUNNER_TASK_RUNNERS_H_ |
| OLD | NEW |