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 #include "remoting/host/desktop_session_proxy.h" | 5 #include "remoting/host/desktop_session_proxy.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // On posix: |desktop_pipe| is a valid file descriptor. | 246 // On posix: |desktop_pipe| is a valid file descriptor. |
247 DCHECK(desktop_pipe.auto_close); | 247 DCHECK(desktop_pipe.auto_close); |
248 | 248 |
249 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe); | 249 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe); |
250 | 250 |
251 #else | 251 #else |
252 #error Unsupported platform. | 252 #error Unsupported platform. |
253 #endif | 253 #endif |
254 | 254 |
255 // Connect to the desktop process. | 255 // Connect to the desktop process. |
256 desktop_channel_.reset(new IPC::ChannelProxy(desktop_channel_handle, | 256 desktop_channel_ = IPC::ChannelProxy::Create(desktop_channel_handle, |
257 IPC::Channel::MODE_CLIENT, | 257 IPC::Channel::MODE_CLIENT, |
258 this, | 258 this, |
259 io_task_runner_.get())); | 259 io_task_runner_.get()); |
260 | 260 |
261 // Pass ID of the client (which is authenticated at this point) to the desktop | 261 // Pass ID of the client (which is authenticated at this point) to the desktop |
262 // session agent and start the agent. | 262 // session agent and start the agent. |
263 SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent( | 263 SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent( |
264 client_session_control_->client_jid(), | 264 client_session_control_->client_jid(), |
265 screen_resolution_, | 265 screen_resolution_, |
266 virtual_terminal_)); | 266 virtual_terminal_)); |
267 | 267 |
268 return true; | 268 return true; |
269 } | 269 } |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 } | 555 } |
556 | 556 |
557 // static | 557 // static |
558 void DesktopSessionProxyTraits::Destruct( | 558 void DesktopSessionProxyTraits::Destruct( |
559 const DesktopSessionProxy* desktop_session_proxy) { | 559 const DesktopSessionProxy* desktop_session_proxy) { |
560 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, | 560 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, |
561 desktop_session_proxy); | 561 desktop_session_proxy); |
562 } | 562 } |
563 | 563 |
564 } // namespace remoting | 564 } // namespace remoting |
OLD | NEW |