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 e4638ffd3b7cec19d2483762aa349a24a8d5beac..cdb1b94d4487ac500897f4556e820a9932515c3a 100644 |
| --- a/remoting/host/chromoting_host_context.h |
| +++ b/remoting/host/chromoting_host_context.h |
| @@ -13,6 +13,10 @@ namespace net { |
| class URLRequestContextGetter; |
| } // namespace net |
| +namespace policy { |
| +class PolicyService; |
| +} // namespace net |
|
Jamie
2014/10/14 01:18:41
s/net/policy/
kelvinp
2014/10/15 23:03:09
Done.
|
| + |
| namespace remoting { |
| class AutoThreadTaskRunner; |
| @@ -23,13 +27,18 @@ class ChromotingHostContext { |
| public: |
| ~ChromotingHostContext(); |
| - // Create threads and URLRequestContextGetter for use by a host. |
| + // Creates threads and URLRequestContextGetter for use by a host. |
|
Jamie
2014/10/14 01:18:42
The previous sense was more consistent with the ot
kelvinp
2014/10/15 23:03:09
Done.
|
| // During shutdown the caller should tear-down the ChromotingHostContext and |
| // then continue to run until |ui_task_runner| is no longer referenced. |
| // NULL is returned if any threads fail to start. |
| static scoped_ptr<ChromotingHostContext> Create( |
| scoped_refptr<AutoThreadTaskRunner> ui_task_runner); |
| + static scoped_ptr<ChromotingHostContext> CreateForChromeOS( |
| + scoped_refptr<AutoThreadTaskRunner> ui_task_runner, |
| + scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, |
| + policy::PolicyService* policy_service); |
| + |
| // Task runner for the thread used for audio capture and encoding. |
| scoped_refptr<AutoThreadTaskRunner> audio_task_runner(); |
| @@ -61,9 +70,14 @@ class ChromotingHostContext { |
| scoped_refptr<net::URLRequestContextGetter> url_request_context_getter(); |
| + policy::PolicyService* policy_service(); |
| + |
| private: |
| ChromotingHostContext(AutoThreadTaskRunner* ui_task_runner); |
| + // Verify that all threads has started. |
|
Jamie
2014/10/14 01:18:42
s/has/have/
kelvinp
2014/10/15 23:03:09
Done.
|
| + bool VerifyInitialized(); |
| + |
| // Thread for audio capture and encoding. |
| scoped_refptr<AutoThreadTaskRunner> audio_task_runner_; |
| @@ -88,6 +102,8 @@ class ChromotingHostContext { |
| // Serves URLRequestContexts that use the network and UI task runners. |
| scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
| + policy::PolicyService* policy_service_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext); |
| }; |