Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/protocol/pepper_session.h" | 5 #include "remoting/protocol/pepper_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 STLDeleteContainerPairSecondPointers(channels_.begin(), channels_.end()); | 42 STLDeleteContainerPairSecondPointers(channels_.begin(), channels_.end()); |
| 43 session_manager_->SessionDestroyed(this); | 43 session_manager_->SessionDestroyed(this); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void PepperSession::SetStateChangeCallback( | 46 void PepperSession::SetStateChangeCallback( |
| 47 const StateChangeCallback& callback) { | 47 const StateChangeCallback& callback) { |
| 48 DCHECK(CalledOnValidThread()); | 48 DCHECK(CalledOnValidThread()); |
| 49 state_change_callback_ = callback; | 49 state_change_callback_ = callback; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void PepperSession::SetRouteChangeCallback( | |
| 53 const RouteChangeCallback& callback) { | |
| 54 NOTREACHED(); | |
|
Sergey Ulanov
2012/01/23 20:33:37
add comments saying that this callback is not used
Lambros
2012/01/24 19:50:50
Done.
| |
| 55 } | |
| 56 | |
| 52 Session::Error PepperSession::error() { | 57 Session::Error PepperSession::error() { |
| 53 DCHECK(CalledOnValidThread()); | 58 DCHECK(CalledOnValidThread()); |
| 54 return error_; | 59 return error_; |
| 55 } | 60 } |
| 56 | 61 |
| 57 void PepperSession::StartConnection( | 62 void PepperSession::StartConnection( |
| 58 const std::string& peer_jid, | 63 const std::string& peer_jid, |
| 59 scoped_ptr<Authenticator> authenticator, | 64 scoped_ptr<Authenticator> authenticator, |
| 60 scoped_ptr<CandidateSessionConfig> config, | 65 scoped_ptr<CandidateSessionConfig> config, |
| 61 const StateChangeCallback& state_change_callback) { | 66 const StateChangeCallback& state_change_callback) { |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 DCHECK_NE(state_, FAILED); | 429 DCHECK_NE(state_, FAILED); |
| 425 | 430 |
| 426 state_ = new_state; | 431 state_ = new_state; |
| 427 if (!state_change_callback_.is_null()) | 432 if (!state_change_callback_.is_null()) |
| 428 state_change_callback_.Run(new_state); | 433 state_change_callback_.Run(new_state); |
| 429 } | 434 } |
| 430 } | 435 } |
| 431 | 436 |
| 432 } // namespace protocol | 437 } // namespace protocol |
| 433 } // namespace remoting | 438 } // namespace remoting |
| OLD | NEW |