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

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

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup Created 8 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/desktop_session_agent.h"
6
7 #include "base/logging.h"
8 #include "base/single_thread_task_runner.h"
9 #include "ipc/ipc_channel_proxy.h"
10 #include "ipc/ipc_message.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "remoting/host/chromoting_messages.h"
13
14 namespace remoting {
15
16 DesktopSessionAgent::~DesktopSessionAgent() {
17 DCHECK(caller_task_runner()->BelongsToCurrentThread());
18 }
19
20 bool DesktopSessionAgent::OnMessageReceived(const IPC::Message& message) {
21 DCHECK(caller_task_runner()->BelongsToCurrentThread());
22
23 NOTIMPLEMENTED();
24 return false;
25 }
26
27 void DesktopSessionAgent::OnChannelConnected(int32 peer_pid) {
28 DCHECK(caller_task_runner()->BelongsToCurrentThread());
29
30 VLOG(1) << "IPC: desktop <- network (" << peer_pid << ")";
31
32 NOTIMPLEMENTED();
33 }
34
35 void DesktopSessionAgent::OnChannelError() {
36 DCHECK(caller_task_runner()->BelongsToCurrentThread());
37
38 // Make sure the channel is closed.
39 network_channel_.reset();
40
41 // Notify the caller that |this| can be destroyed now.
42 done_task_.Run();
43 }
44
45 bool DesktopSessionAgent::Start(const base::Closure& done_task,
46 IPC::PlatformFileForTransit* desktop_pipe_out) {
47 DCHECK(caller_task_runner()->BelongsToCurrentThread());
48
49 done_task_ = done_task;
50 return DoCreateNetworkChannel(desktop_pipe_out, &network_channel_);
51 }
52
53 DesktopSessionAgent::DesktopSessionAgent(
54 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
55 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
56 : caller_task_runner_(caller_task_runner),
57 io_task_runner_(io_task_runner) {
58 DCHECK(caller_task_runner_->BelongsToCurrentThread());
Sergey Ulanov 2012/10/24 20:12:01 It might be better to use base::ThreadTaskRunnerHa
alexeypa (please no reviews) 2012/10/24 21:41:51 base::ThreadTaskRunnerHandle::Get() will give me a
59 }
60
61 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698