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

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: AuraDesktopCapturer clean up 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..00aa2176ea8552173ae179c31dabdf1f73ff6274 100644
--- a/remoting/host/chromoting_host_context.h
+++ b/remoting/host/chromoting_host_context.h
@@ -21,8 +21,6 @@ class AutoThreadTaskRunner;
// process. This class is virtual only for testing purposes (see below).
class ChromotingHostContext {
public:
- ~ChromotingHostContext();
-
// Create threads and URLRequestContextGetter for use by a host.
// During shutdown the caller should tear-down the ChromotingHostContext and
// then continue to run until |ui_task_runner| is no longer referenced.
@@ -30,6 +28,20 @@ class ChromotingHostContext {
static scoped_ptr<ChromotingHostContext> Create(
scoped_refptr<AutoThreadTaskRunner> ui_task_runner);
+#if defined(OS_CHROMEOS)
+ // Attaches task runners to the relevant browser threads for the chromoting
+ // host. Must be called on the UI thread of the browser process.
Wez 2014/10/24 23:29:27 Still need to document why |url_request_context_ge
kelvinp 2014/10/29 01:22:52 Done.
+ static scoped_ptr<ChromotingHostContext> CreateForChromeOS(
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
+#endif // defined(OS_CHROMEOS)
+
+ ~ChromotingHostContext();
+
+ scoped_ptr<ChromotingHostContext> Copy();
+
+ // Task runner for the thread that is used for the UI.
+ scoped_refptr<AutoThreadTaskRunner> ui_task_runner();
+
// Task runner for the thread used for audio capture and encoding.
scoped_refptr<AutoThreadTaskRunner> audio_task_runner();
@@ -49,9 +61,6 @@ class ChromotingHostContext {
// libjingle code may be run.
scoped_refptr<AutoThreadTaskRunner> network_task_runner();
- // Task runner for the thread that is used for the UI.
- scoped_refptr<AutoThreadTaskRunner> ui_task_runner();
-
// Task runner for the thread used by the ScreenRecorder to capture
// the screen.
scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner();
@@ -62,7 +71,18 @@ class ChromotingHostContext {
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter();
private:
- ChromotingHostContext(AutoThreadTaskRunner* ui_task_runner);
+ ChromotingHostContext(
+ scoped_refptr<AutoThreadTaskRunner> ui_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> audio_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> file_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> input_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> network_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> video_encode_task_runner,
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
+
+ // 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 +96,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_;

Powered by Google App Engine
This is Rietveld 408576698