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 // This callback is not used on the client side yet. |
| 55 NOTREACHED(); |
| 56 } |
| 57 |
52 Session::Error PepperSession::error() { | 58 Session::Error PepperSession::error() { |
53 DCHECK(CalledOnValidThread()); | 59 DCHECK(CalledOnValidThread()); |
54 return error_; | 60 return error_; |
55 } | 61 } |
56 | 62 |
57 void PepperSession::StartConnection( | 63 void PepperSession::StartConnection( |
58 const std::string& peer_jid, | 64 const std::string& peer_jid, |
59 scoped_ptr<Authenticator> authenticator, | 65 scoped_ptr<Authenticator> authenticator, |
60 scoped_ptr<CandidateSessionConfig> config, | 66 scoped_ptr<CandidateSessionConfig> config, |
61 const StateChangeCallback& state_change_callback) { | 67 const StateChangeCallback& state_change_callback) { |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 DCHECK_NE(state_, FAILED); | 430 DCHECK_NE(state_, FAILED); |
425 | 431 |
426 state_ = new_state; | 432 state_ = new_state; |
427 if (!state_change_callback_.is_null()) | 433 if (!state_change_callback_.is_null()) |
428 state_change_callback_.Run(new_state); | 434 state_change_callback_.Run(new_state); |
429 } | 435 } |
430 } | 436 } |
431 | 437 |
432 } // namespace protocol | 438 } // namespace protocol |
433 } // namespace remoting | 439 } // namespace remoting |
OLD | NEW |