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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void ChromotingHost::OnSessionSequenceNumber(ClientSession* session, | 215 void ChromotingHost::OnSessionSequenceNumber(ClientSession* session, |
216 int64 sequence_number) { | 216 int64 sequence_number) { |
217 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 217 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
218 if (recorder_.get()) | 218 if (recorder_.get()) |
219 recorder_->UpdateSequenceNumber(sequence_number); | 219 recorder_->UpdateSequenceNumber(sequence_number); |
220 } | 220 } |
221 | 221 |
222 void ChromotingHost::OnSessionRouteChange( | 222 void ChromotingHost::OnSessionRouteChange( |
223 ClientSession* session, | 223 ClientSession* session, |
224 const std::string& channel_name, | 224 const std::string& channel_name, |
225 const net::IPEndPoint& remote_end_point, | 225 const protocol::TransportRoute& route) { |
226 const net::IPEndPoint& local_end_point) { | |
227 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 226 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
228 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | 227 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
229 OnClientRouteChange(session->client_jid(), channel_name, | 228 OnClientRouteChange(session->client_jid(), channel_name, |
230 remote_end_point, local_end_point)); | 229 route)); |
231 } | 230 } |
232 | 231 |
233 void ChromotingHost::OnSessionManagerReady() { | 232 void ChromotingHost::OnSessionManagerReady() { |
234 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 233 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
235 // Don't need to do anything here, just wait for incoming | 234 // Don't need to do anything here, just wait for incoming |
236 // connections. | 235 // connections. |
237 } | 236 } |
238 | 237 |
239 void ChromotingHost::OnIncomingSession( | 238 void ChromotingHost::OnIncomingSession( |
240 protocol::Session* session, | 239 protocol::Session* session, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 OnShutdown()); | 364 OnShutdown()); |
366 | 365 |
367 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 366 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
368 it != shutdown_tasks_.end(); ++it) { | 367 it != shutdown_tasks_.end(); ++it) { |
369 it->Run(); | 368 it->Run(); |
370 } | 369 } |
371 shutdown_tasks_.clear(); | 370 shutdown_tasks_.clear(); |
372 } | 371 } |
373 | 372 |
374 } // namespace remoting | 373 } // namespace remoting |
OLD | NEW |