OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ipc_host_event_logger.h" | 5 #include "remoting/host/ipc_host_event_logger.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ipc/ipc_sender.h" | 8 #include "ipc/ipc_sender.h" |
9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
10 #include "remoting/host/chromoting_messages.h" | 10 #include "remoting/host/chromoting_messages.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void IpcHostEventLogger::OnClientRouteChange( | 55 void IpcHostEventLogger::OnClientRouteChange( |
56 const std::string& jid, | 56 const std::string& jid, |
57 const std::string& channel_name, | 57 const std::string& channel_name, |
58 const protocol::TransportRoute& route) { | 58 const protocol::TransportRoute& route) { |
59 DCHECK(CalledOnValidThread()); | 59 DCHECK(CalledOnValidThread()); |
60 | 60 |
61 SerializedTransportRoute serialized_route; | 61 SerializedTransportRoute serialized_route; |
62 serialized_route.type = route.type; | 62 serialized_route.type = route.type; |
63 serialized_route.remote_address = route.remote_address.address(); | 63 serialized_route.remote_address = route.remote_address.address().bytes(); |
64 serialized_route.remote_port = route.remote_address.port(); | 64 serialized_route.remote_port = route.remote_address.port(); |
65 serialized_route.local_address = route.local_address.address(); | 65 serialized_route.local_address = route.local_address.address().bytes(); |
66 serialized_route.local_port = route.local_address.port(); | 66 serialized_route.local_port = route.local_address.port(); |
67 | 67 |
68 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_ClientRouteChange( | 68 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_ClientRouteChange( |
69 jid, channel_name, serialized_route)); | 69 jid, channel_name, serialized_route)); |
70 } | 70 } |
71 | 71 |
72 void IpcHostEventLogger::OnShutdown() { | 72 void IpcHostEventLogger::OnShutdown() { |
73 DCHECK(CalledOnValidThread()); | 73 DCHECK(CalledOnValidThread()); |
74 | 74 |
75 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostShutdown()); | 75 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostShutdown()); |
76 } | 76 } |
77 | 77 |
78 void IpcHostEventLogger::OnStart(const std::string& xmpp_login) { | 78 void IpcHostEventLogger::OnStart(const std::string& xmpp_login) { |
79 DCHECK(CalledOnValidThread()); | 79 DCHECK(CalledOnValidThread()); |
80 | 80 |
81 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostStarted(xmpp_login)); | 81 daemon_channel_->Send(new ChromotingNetworkDaemonMsg_HostStarted(xmpp_login)); |
82 } | 82 } |
83 | 83 |
84 } // namespace remoting | 84 } // namespace remoting |
OLD | NEW |