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

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc
index 754ea8b5c23be1bd7643b20d9eb0a9bde81803d1..df8f8abd3230926829d3fa31ad6574e75c2467ed 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -15,55 +15,11 @@ namespace remoting {
ChromotingHostContext::ChromotingHostContext(
AutoThreadTaskRunner* ui_task_runner)
: ui_task_runner_(ui_task_runner) {
-#if defined(OS_WIN)
- // On Windows the AudioCapturer requires COM, so we run a single-threaded
- // apartment, which requires a UI thread.
- audio_task_runner_ =
- AutoThread::CreateWithLoopAndComInitTypes("ChromotingAudioThread",
- ui_task_runner_,
- base::MessageLoop::TYPE_UI,
- AutoThread::COM_INIT_STA);
-#else // !defined(OS_WIN)
- audio_task_runner_ = AutoThread::CreateWithType(
- "ChromotingAudioThread", ui_task_runner_, base::MessageLoop::TYPE_IO);
-#endif // !defined(OS_WIN)
-
- file_task_runner_ = AutoThread::CreateWithType(
- "ChromotingFileThread", ui_task_runner_, base::MessageLoop::TYPE_IO);
- input_task_runner_ = AutoThread::CreateWithType(
- "ChromotingInputThread", ui_task_runner_, base::MessageLoop::TYPE_IO);
- network_task_runner_ = AutoThread::CreateWithType(
- "ChromotingNetworkThread", ui_task_runner_, base::MessageLoop::TYPE_IO);
- video_capture_task_runner_ =
- AutoThread::Create("ChromotingCaptureThread", ui_task_runner_);
- video_encode_task_runner_ = AutoThread::Create(
- "ChromotingEncodeThread", ui_task_runner_);
-
- url_request_context_getter_ = new URLRequestContextGetter(
- network_task_runner_, file_task_runner_);
}
ChromotingHostContext::~ChromotingHostContext() {
}
-scoped_ptr<ChromotingHostContext> ChromotingHostContext::Create(
- scoped_refptr<AutoThreadTaskRunner> ui_task_runner) {
- DCHECK(ui_task_runner->BelongsToCurrentThread());
-
- scoped_ptr<ChromotingHostContext> context(
- new ChromotingHostContext(ui_task_runner.get()));
- if (!context->audio_task_runner_.get() || !context->file_task_runner_.get() ||
- !context->input_task_runner_.get() ||
- !context->network_task_runner_.get() ||
- !context->video_capture_task_runner_.get() ||
- !context->video_encode_task_runner_.get() ||
- !context->url_request_context_getter_.get()) {
- context.reset();
- }
-
- return context.Pass();
-}
-
scoped_refptr<AutoThreadTaskRunner>
ChromotingHostContext::audio_task_runner() {
return audio_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698