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..83c810377753ab516752626b015a5689739ea452 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 policy |
+ |
namespace remoting { |
class AutoThreadTaskRunner; |
@@ -30,6 +34,12 @@ class ChromotingHostContext { |
static scoped_ptr<ChromotingHostContext> Create( |
scoped_refptr<AutoThreadTaskRunner> ui_task_runner); |
+ // Must be called on the UI thread of the browser process. |
+ static scoped_ptr<ChromotingHostContext> CreateForChromeOS( |
+ scoped_refptr<AutoThreadTaskRunner> ui_task_runner, |
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, |
+ policy::PolicyService* policy_service); |
Wez
2014/10/17 17:58:00
What are the lifetime/ownership properties of |pol
kelvinp
2014/10/20 00:21:17
Done.
|
+ |
// Task runner for the thread used for audio capture and encoding. |
scoped_refptr<AutoThreadTaskRunner> audio_task_runner(); |
@@ -61,8 +71,24 @@ class ChromotingHostContext { |
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter(); |
+ policy::PolicyService* policy_service(); |
Wez
2014/10/17 17:58:00
Wouldn't it be cleaner to push the PolicyWatcher o
Wez
2014/10/17 17:58:00
Add a comment to clarify how this is used / why it
kelvinp
2014/10/20 00:21:17
Done.
kelvinp
2014/10/20 00:21:17
Done.
|
+ |
private: |
- ChromotingHostContext(AutoThreadTaskRunner* ui_task_runner); |
+ ChromotingHostContext( |
+ AutoThreadTaskRunner* ui_task_runner, |
+ AutoThreadTaskRunner* file_task_runner, |
+ AutoThreadTaskRunner* input_task_runner, |
+ AutoThreadTaskRunner* network_task_runner, |
+ AutoThreadTaskRunner* video_capture_task_runner, |
Wez
2014/10/17 17:58:00
Why are these bare pointers?
kelvinp
2014/10/20 00:21:17
Done.
|
+ net::URLRequestContextGetter* url_request_context_getter, |
+ policy::PolicyService* policy_service |
+ ); |
+ |
+ // Verify that all threads have started. |
+ bool VerifyInitialized(); |
Wez
2014/10/17 17:58:00
Under what circumstances could the threads _not_ b
Wez
2014/10/17 17:58:00
AreThreadsStarted()?
kelvinp
2014/10/20 00:21:17
Done.
|
+ |
+ // Caller-supplied UI thread. This is usually the application main thread. |
+ scoped_refptr<AutoThreadTaskRunner> ui_task_runner_; |
// Thread for audio capture and encoding. |
scoped_refptr<AutoThreadTaskRunner> audio_task_runner_; |
@@ -76,9 +102,6 @@ class ChromotingHostContext { |
// Thread for network operations. |
scoped_refptr<AutoThreadTaskRunner> network_task_runner_; |
- // Caller-supplied UI thread. This is usually the application main thread. |
- scoped_refptr<AutoThreadTaskRunner> ui_task_runner_; |
- |
// Thread for screen capture. |
scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner_; |
@@ -88,6 +111,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); |
}; |