Chromium Code Reviews| Index: remoting/host/chromoting_host_context.h |
| diff --git a/remoting/host/chromoting_host_context.h b/remoting/host/chromoting_host_context.h |
| index 2e3480d69d3a1c50f59421615d2aad0d494ce494..bfe6c7181e860ed3cb8370a43bba2c888b9b2697 100644 |
| --- a/remoting/host/chromoting_host_context.h |
| +++ b/remoting/host/chromoting_host_context.h |
| @@ -5,17 +5,11 @@ |
| #ifndef REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ |
| #define REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ |
| -#include <string> |
| - |
| #include "base/gtest_prod_util.h" |
| #include "base/memory/ref_counted.h" |
| -#include "base/threading/platform_thread.h" |
| +#include "base/single_thread_task_runner.h" |
| #include "base/threading/thread.h" |
| -namespace base { |
| -class SingleThreadTaskRunner; |
| -} // namespace base |
| - |
| namespace net { |
| class URLRequestContextGetter; |
| } // namespace net |
| @@ -38,6 +32,8 @@ class ChromotingHostContext { |
| // this API. |
| virtual bool Start(); |
| + void Stop(); |
|
Sergey Ulanov
2012/08/31 01:25:18
Seems wrong to call this method Stop() given that
alexeypa (please no reviews)
2012/08/31 19:57:36
Done. ReleaseTaskRunners()
|
| + |
| // Task runner for the thread that is used for the UI. In the NPAPI |
| // plugin this corresponds to the main plugin thread. |
| virtual base::SingleThreadTaskRunner* ui_task_runner(); |
| @@ -86,6 +82,14 @@ class ChromotingHostContext { |
| // Thread for blocking IO operations. |
| base::Thread file_thread_; |
| + // Task runners wrapping the above threads. These should be declared after |
| + // the corresponding threads to guarantee proper order of destruction. |
| + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
| + scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; |
| + scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; |
| + scoped_refptr<base::SingleThreadTaskRunner> desktop_task_runner_; |
| + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
| + |
| scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |