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

Side by Side Diff: remoting/host/daemon_process_win.cc

Issue 12544020: Remote RDP sessions, rather than the console, if curtain-mode is configured. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "remoting/host/daemon_process.h" 5 #include "remoting/host/daemon_process.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/process.h" 13 #include "base/process.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/timer.h" 16 #include "base/timer.h"
17 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
18 #include "base/win/scoped_handle.h" 18 #include "base/win/scoped_handle.h"
19 #include "ipc/ipc_message.h" 19 #include "ipc/ipc_message.h"
20 #include "ipc/ipc_message_macros.h" 20 #include "ipc/ipc_message_macros.h"
21 #include "remoting/base/auto_thread_task_runner.h" 21 #include "remoting/base/auto_thread_task_runner.h"
22 #include "remoting/host/chromoting_messages.h" 22 #include "remoting/host/chromoting_messages.h"
23 #include "remoting/host/desktop_session_win.h" 23 #include "remoting/host/desktop_session_win.h"
24 #include "remoting/host/host_exit_codes.h" 24 #include "remoting/host/host_exit_codes.h"
25 #include "remoting/host/host_main.h" 25 #include "remoting/host/host_main.h"
26 #include "remoting/host/ipc_constants.h" 26 #include "remoting/host/ipc_constants.h"
27 #include "remoting/host/win/host_service.h"
28 #include "remoting/host/win/launch_process_with_token.h" 27 #include "remoting/host/win/launch_process_with_token.h"
29 #include "remoting/host/win/unprivileged_process_delegate.h" 28 #include "remoting/host/win/unprivileged_process_delegate.h"
30 #include "remoting/host/win/worker_process_launcher.h" 29 #include "remoting/host/win/worker_process_launcher.h"
31 30
32 using base::win::ScopedHandle; 31 using base::win::ScopedHandle;
33 using base::TimeDelta; 32 using base::TimeDelta;
34 33
35 namespace remoting { 34 namespace remoting {
36 35
37 class WtsTerminalMonitor; 36 class WtsTerminalMonitor;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 network_launcher_.reset(); 140 network_launcher_.reset();
142 DaemonProcess::DoStop(); 141 DaemonProcess::DoStop();
143 } 142 }
144 143
145 scoped_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession( 144 scoped_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession(
146 int terminal_id, 145 int terminal_id,
147 const DesktopSessionParams& params, 146 const DesktopSessionParams& params,
148 bool virtual_terminal) { 147 bool virtual_terminal) {
149 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 148 DCHECK(caller_task_runner()->BelongsToCurrentThread());
150 149
151 return scoped_ptr<DesktopSession>(new DesktopSessionWin( 150 if (virtual_terminal) {
152 caller_task_runner(), io_task_runner(), this, terminal_id, 151 return DesktopSessionWin::CreateForVirtualTerminal(
153 params, virtual_terminal, HostService::GetInstance())); 152 caller_task_runner(), io_task_runner(), this, terminal_id, params);
153 } else {
154 return DesktopSessionWin::CreateForConsole(
155 caller_task_runner(), io_task_runner(), this, terminal_id, params);
156 }
154 } 157 }
155 158
156 void DaemonProcessWin::LaunchNetworkProcess() { 159 void DaemonProcessWin::LaunchNetworkProcess() {
157 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 160 DCHECK(caller_task_runner()->BelongsToCurrentThread());
158 DCHECK(!network_launcher_); 161 DCHECK(!network_launcher_);
159 162
160 // Construct the host binary name. 163 // Construct the host binary name.
161 base::FilePath host_binary; 164 base::FilePath host_binary;
162 if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) { 165 if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) {
163 Stop(); 166 Stop();
(...skipping 18 matching lines...) Expand all
182 scoped_refptr<AutoThreadTaskRunner> io_task_runner, 185 scoped_refptr<AutoThreadTaskRunner> io_task_runner,
183 const base::Closure& stopped_callback) { 186 const base::Closure& stopped_callback) {
184 scoped_ptr<DaemonProcessWin> daemon_process( 187 scoped_ptr<DaemonProcessWin> daemon_process(
185 new DaemonProcessWin(caller_task_runner, io_task_runner, 188 new DaemonProcessWin(caller_task_runner, io_task_runner,
186 stopped_callback)); 189 stopped_callback));
187 daemon_process->Initialize(); 190 daemon_process->Initialize();
188 return daemon_process.PassAs<DaemonProcess>(); 191 return daemon_process.PassAs<DaemonProcess>();
189 } 192 }
190 193
191 } // namespace remoting 194 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698