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/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 void ChromotingHost::OnSessionSequenceNumber(ClientSession* session, | 221 void ChromotingHost::OnSessionSequenceNumber(ClientSession* session, |
222 int64 sequence_number) { | 222 int64 sequence_number) { |
223 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 223 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
224 if (recorder_.get()) | 224 if (recorder_.get()) |
225 recorder_->UpdateSequenceNumber(sequence_number); | 225 recorder_->UpdateSequenceNumber(sequence_number); |
226 } | 226 } |
227 | 227 |
228 void ChromotingHost::OnSessionIpAddress(ClientSession* session, | 228 void ChromotingHost::OnSessionRouteChange( |
229 const std::string& channel_name, | 229 ClientSession* session, |
230 const net::IPEndPoint& end_point) { | 230 const std::string& channel_name, |
| 231 const net::IPEndPoint& remote_end_point, |
| 232 const net::IPEndPoint& local_end_point) { |
231 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 233 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
232 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | 234 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
233 OnClientIpAddress(session->client_jid(), channel_name, | 235 OnClientRouteChange(session->client_jid(), channel_name, |
234 end_point)); | 236 remote_end_point, local_end_point)); |
235 } | 237 } |
236 | 238 |
237 void ChromotingHost::OnSessionManagerReady() { | 239 void ChromotingHost::OnSessionManagerReady() { |
238 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 240 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
239 // Don't need to do anything here, just wait for incoming | 241 // Don't need to do anything here, just wait for incoming |
240 // connections. | 242 // connections. |
241 } | 243 } |
242 | 244 |
243 void ChromotingHost::OnIncomingSession( | 245 void ChromotingHost::OnIncomingSession( |
244 protocol::Session* session, | 246 protocol::Session* session, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 OnShutdown()); | 371 OnShutdown()); |
370 | 372 |
371 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 373 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
372 it != shutdown_tasks_.end(); ++it) { | 374 it != shutdown_tasks_.end(); ++it) { |
373 it->Run(); | 375 it->Run(); |
374 } | 376 } |
375 shutdown_tasks_.clear(); | 377 shutdown_tasks_.clear(); |
376 } | 378 } |
377 | 379 |
378 } // namespace remoting | 380 } // namespace remoting |
OLD | NEW |