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

Unified Diff: remoting/host/chromoting_host_context.h

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedbacks Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698