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

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

Issue 301973003: Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build Created 6 years, 6 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/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/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // On posix: |desktop_pipe| is a valid file descriptor. 247 // On posix: |desktop_pipe| is a valid file descriptor.
248 DCHECK(desktop_pipe.auto_close); 248 DCHECK(desktop_pipe.auto_close);
249 249
250 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe); 250 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe);
251 251
252 #else 252 #else
253 #error Unsupported platform. 253 #error Unsupported platform.
254 #endif 254 #endif
255 255
256 // Connect to the desktop process. 256 // Connect to the desktop process.
257 desktop_channel_.reset(new IPC::ChannelProxy(desktop_channel_handle, 257 desktop_channel_ = IPC::ChannelProxy::CreateClient(
258 IPC::Channel::MODE_CLIENT, 258 desktop_channel_handle,
259 this, 259 this,
260 io_task_runner_.get())); 260 io_task_runner_.get());
261 261
262 // Pass ID of the client (which is authenticated at this point) to the desktop 262 // Pass ID of the client (which is authenticated at this point) to the desktop
263 // session agent and start the agent. 263 // session agent and start the agent.
264 SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent( 264 SendToDesktop(new ChromotingNetworkDesktopMsg_StartSessionAgent(
265 client_session_control_->client_jid(), 265 client_session_control_->client_jid(),
266 screen_resolution_, 266 screen_resolution_,
267 virtual_terminal_)); 267 virtual_terminal_));
268 268
269 return true; 269 return true;
270 } 270 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 556 }
557 557
558 // static 558 // static
559 void DesktopSessionProxyTraits::Destruct( 559 void DesktopSessionProxyTraits::Destruct(
560 const DesktopSessionProxy* desktop_session_proxy) { 560 const DesktopSessionProxy* desktop_session_proxy) {
561 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, 561 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE,
562 desktop_session_proxy); 562 desktop_session_proxy);
563 } 563 }
564 564
565 } // namespace remoting 565 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698