OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/desktop_process.h" | 8 #include "remoting/host/desktop_process.h" |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 #else // !defined(OS_WIN) | 114 #else // !defined(OS_WIN) |
115 audio_task_runner = AutoThread::CreateWithType( | 115 audio_task_runner = AutoThread::CreateWithType( |
116 "ChromotingAudioThread", caller_task_runner_, base::MessageLoop::TYPE_IO); | 116 "ChromotingAudioThread", caller_task_runner_, base::MessageLoop::TYPE_IO); |
117 #endif // !defined(OS_WIN) | 117 #endif // !defined(OS_WIN) |
118 | 118 |
119 // Launch the I/O thread. | 119 // Launch the I/O thread. |
120 scoped_refptr<AutoThreadTaskRunner> io_task_runner = | 120 scoped_refptr<AutoThreadTaskRunner> io_task_runner = |
121 AutoThread::CreateWithType( | 121 AutoThread::CreateWithType( |
122 "I/O thread", caller_task_runner_, base::MessageLoop::TYPE_IO); | 122 "I/O thread", caller_task_runner_, base::MessageLoop::TYPE_IO); |
123 | 123 |
124 // Launch the video capture thread. | |
125 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner = | |
126 AutoThread::Create("Video capture thread", caller_task_runner_); | |
127 | |
128 // Create a desktop agent. | 124 // Create a desktop agent. |
129 desktop_agent_ = new DesktopSessionAgent(audio_task_runner, | 125 desktop_agent_ = |
130 caller_task_runner_, | 126 new DesktopSessionAgent(audio_task_runner, caller_task_runner_, |
131 input_task_runner_, | 127 input_task_runner_, io_task_runner); |
132 io_task_runner, | |
133 video_capture_task_runner); | |
134 | 128 |
135 // Start the agent and create an IPC channel to talk to it. | 129 // Start the agent and create an IPC channel to talk to it. |
136 IPC::PlatformFileForTransit desktop_pipe; | 130 IPC::PlatformFileForTransit desktop_pipe; |
137 if (!desktop_agent_->Start(AsWeakPtr(), &desktop_pipe)) { | 131 if (!desktop_agent_->Start(AsWeakPtr(), &desktop_pipe)) { |
138 desktop_agent_ = nullptr; | 132 desktop_agent_ = nullptr; |
139 caller_task_runner_ = nullptr; | 133 caller_task_runner_ = nullptr; |
140 input_task_runner_ = nullptr; | 134 input_task_runner_ = nullptr; |
141 desktop_environment_factory_.reset(); | 135 desktop_environment_factory_.reset(); |
142 return false; | 136 return false; |
143 } | 137 } |
(...skipping 26 matching lines...) Expand all Loading... |
170 base::snprintf(message, sizeof(message), | 164 base::snprintf(message, sizeof(message), |
171 "Requested by %s at %s, line %d.", | 165 "Requested by %s at %s, line %d.", |
172 function_name.c_str(), file_name.c_str(), line_number); | 166 function_name.c_str(), file_name.c_str(), line_number); |
173 base::debug::Alias(message); | 167 base::debug::Alias(message); |
174 | 168 |
175 // The daemon requested us to crash the process. | 169 // The daemon requested us to crash the process. |
176 CHECK(false) << message; | 170 CHECK(false) << message; |
177 } | 171 } |
178 | 172 |
179 } // namespace remoting | 173 } // namespace remoting |
OLD | NEW |