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

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: fixing remoting_unittests 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
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/desktop_session_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
16 #include "base/time.h" 16 #include "base/time.h"
17 #include "base/timer.h" 17 #include "base/timer.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "base/win/scoped_handle.h" 19 #include "base/win/scoped_handle.h"
20 #include "ipc/ipc_message.h" 20 #include "ipc/ipc_message.h"
21 #include "ipc/ipc_message_macros.h" 21 #include "ipc/ipc_message_macros.h"
22 #include "remoting/base/auto_thread_task_runner.h" 22 #include "remoting/base/auto_thread_task_runner.h"
23 #include "remoting/host/chromoting_messages.h" 23 #include "remoting/host/chromoting_messages.h"
24 #include "remoting/host/desktop_session_win.h" 24 #include "remoting/host/desktop_session_win.h"
25 #include "remoting/host/host_exit_codes.h" 25 #include "remoting/host/host_exit_codes.h"
26 #include "remoting/host/host_main.h" 26 #include "remoting/host/host_main.h"
27 #include "remoting/host/ipc_constants.h" 27 #include "remoting/host/ipc_constants.h"
28 #include "remoting/host/win/host_service.h"
29 #include "remoting/host/win/launch_process_with_token.h" 28 #include "remoting/host/win/launch_process_with_token.h"
30 #include "remoting/host/win/unprivileged_process_delegate.h" 29 #include "remoting/host/win/unprivileged_process_delegate.h"
31 #include "remoting/host/win/worker_process_launcher.h" 30 #include "remoting/host/win/worker_process_launcher.h"
32 31
33 using base::win::ScopedHandle; 32 using base::win::ScopedHandle;
34 using base::TimeDelta; 33 using base::TimeDelta;
35 34
36 namespace remoting { 35 namespace remoting {
37 36
38 class WtsTerminalMonitor; 37 class WtsTerminalMonitor;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 network_launcher_.reset(); 143 network_launcher_.reset();
145 DaemonProcess::DoStop(); 144 DaemonProcess::DoStop();
146 } 145 }
147 146
148 scoped_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession( 147 scoped_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession(
149 int terminal_id, 148 int terminal_id,
150 const DesktopSessionParams& params, 149 const DesktopSessionParams& params,
151 bool virtual_terminal) { 150 bool virtual_terminal) {
152 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 151 DCHECK(caller_task_runner()->BelongsToCurrentThread());
153 152
154 return scoped_ptr<DesktopSession>(new DesktopSessionWin( 153 if (virtual_terminal) {
155 caller_task_runner(), io_task_runner(), this, terminal_id, 154 return DesktopSessionWin::CreateForVirtualTerminal(
156 params, virtual_terminal, HostService::GetInstance())); 155 caller_task_runner(), io_task_runner(), this, terminal_id, params);
156 } else {
157 return DesktopSessionWin::CreateForConsole(
158 caller_task_runner(), io_task_runner(), this, terminal_id, params);
159 }
157 } 160 }
158 161
159 void DaemonProcessWin::DoCrashNetworkProcess( 162 void DaemonProcessWin::DoCrashNetworkProcess(
160 const tracked_objects::Location& location) { 163 const tracked_objects::Location& location) {
161 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 164 DCHECK(caller_task_runner()->BelongsToCurrentThread());
162 165
163 network_launcher_->Crash(location); 166 network_launcher_->Crash(location);
164 } 167 }
165 168
166 void DaemonProcessWin::LaunchNetworkProcess() { 169 void DaemonProcessWin::LaunchNetworkProcess() {
(...skipping 25 matching lines...) Expand all
192 scoped_refptr<AutoThreadTaskRunner> io_task_runner, 195 scoped_refptr<AutoThreadTaskRunner> io_task_runner,
193 const base::Closure& stopped_callback) { 196 const base::Closure& stopped_callback) {
194 scoped_ptr<DaemonProcessWin> daemon_process( 197 scoped_ptr<DaemonProcessWin> daemon_process(
195 new DaemonProcessWin(caller_task_runner, io_task_runner, 198 new DaemonProcessWin(caller_task_runner, io_task_runner,
196 stopped_callback)); 199 stopped_callback));
197 daemon_process->Initialize(); 200 daemon_process->Initialize();
198 return daemon_process.PassAs<DaemonProcess>(); 201 return daemon_process.PassAs<DaemonProcess>();
199 } 202 }
200 203
201 } // namespace remoting 204 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/desktop_session_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698