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 |
233 // Notify observers. | |
Sergey Ulanov
2012/01/26 00:48:56
this comment is redundant
Lambros
2012/01/26 19:40:14
Done (it was a copy-paste).
| |
234 FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, | |
235 OnClientIpAddress(session->client_jid(), channel_name, | |
236 end_point)); | |
233 } | 237 } |
234 | 238 |
235 void ChromotingHost::OnSessionManagerReady() { | 239 void ChromotingHost::OnSessionManagerReady() { |
236 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); | 240 DCHECK(context_->network_message_loop()->BelongsToCurrentThread()); |
237 // Don't need to do anything here, just wait for incoming | 241 // Don't need to do anything here, just wait for incoming |
238 // connections. | 242 // connections. |
239 } | 243 } |
240 | 244 |
241 void ChromotingHost::OnIncomingSession( | 245 void ChromotingHost::OnIncomingSession( |
242 protocol::Session* session, | 246 protocol::Session* session, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 OnShutdown()); | 371 OnShutdown()); |
368 | 372 |
369 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 373 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
370 it != shutdown_tasks_.end(); ++it) { | 374 it != shutdown_tasks_.end(); ++it) { |
371 it->Run(); | 375 it->Run(); |
372 } | 376 } |
373 shutdown_tasks_.clear(); | 377 shutdown_tasks_.clear(); |
374 } | 378 } |
375 | 379 |
376 } // namespace remoting | 380 } // namespace remoting |
OLD | NEW |