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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::OnSessionIpAddress(ClientSession* session, |
229 const std::string& channel_name, | 229 const std::string& channel_name, |
230 const net::IPEndPoint& end_point) { | 230 const net::IPEndPoint& end_point) { |
231 // TODO(lambroslambrou): Notify the HostStatusObservers via a new interface | 231 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
232 // method. | 232 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, |
| 233 OnClientIpAddress(session->client_jid(), channel_name, |
| 234 end_point)); |
233 } | 235 } |
234 | 236 |
235 void ChromotingHost::OnSessionManagerReady() { | 237 void ChromotingHost::OnSessionManagerReady() { |
236 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 238 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
237 // Don't need to do anything here, just wait for incoming | 239 // Don't need to do anything here, just wait for incoming |
238 // connections. | 240 // connections. |
239 } | 241 } |
240 | 242 |
241 void ChromotingHost::OnIncomingSession( | 243 void ChromotingHost::OnIncomingSession( |
242 protocol::Session* session, | 244 protocol::Session* session, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 OnShutdown()); | 369 OnShutdown()); |
368 | 370 |
369 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 371 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
370 it != shutdown_tasks_.end(); ++it) { | 372 it != shutdown_tasks_.end(); ++it) { |
371 it->Run(); | 373 it->Run(); |
372 } | 374 } |
373 shutdown_tasks_.clear(); | 375 shutdown_tasks_.clear(); |
374 } | 376 } |
375 | 377 |
376 } // namespace remoting | 378 } // namespace remoting |
OLD | NEW |