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/protocol/connection_to_host.h" | 5 #include "remoting/protocol/connection_to_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/location.h" | 9 #include "base/location.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 DCHECK(event_callback_); | 121 DCHECK(event_callback_); |
122 | 122 |
123 if (state == SignalStrategy::CONNECTED) { | 123 if (state == SignalStrategy::CONNECTED) { |
124 VLOG(1) << "Connected as: " << signal_strategy_->GetLocalJid(); | 124 VLOG(1) << "Connected as: " << signal_strategy_->GetLocalJid(); |
125 } else if (state == SignalStrategy::DISCONNECTED) { | 125 } else if (state == SignalStrategy::DISCONNECTED) { |
126 VLOG(1) << "Connection closed."; | 126 VLOG(1) << "Connection closed."; |
127 CloseOnError(SIGNALING_ERROR); | 127 CloseOnError(SIGNALING_ERROR); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
| 131 bool ConnectionToHost::OnSignalStrategyIncomingStanza( |
| 132 const buzz::XmlElement* stanza) { |
| 133 return false; |
| 134 } |
| 135 |
131 void ConnectionToHost::OnSessionManagerReady() { | 136 void ConnectionToHost::OnSessionManagerReady() { |
132 DCHECK(CalledOnValidThread()); | 137 DCHECK(CalledOnValidThread()); |
133 | 138 |
134 // After SessionManager is initialized we can try to connect to the host. | 139 // After SessionManager is initialized we can try to connect to the host. |
135 scoped_ptr<CandidateSessionConfig> candidate_config = | 140 scoped_ptr<CandidateSessionConfig> candidate_config = |
136 CandidateSessionConfig::CreateDefault(); | 141 CandidateSessionConfig::CreateDefault(); |
137 session_ = session_manager_->Connect( | 142 session_ = session_manager_->Connect( |
138 host_jid_, authenticator_.Pass(), candidate_config.Pass()); | 143 host_jid_, authenticator_.Pass(), candidate_config.Pass()); |
139 session_->SetEventHandler(this); | 144 session_->SetEventHandler(this); |
140 } | 145 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 280 |
276 if (state != state_) { | 281 if (state != state_) { |
277 state_ = state; | 282 state_ = state; |
278 error_ = error; | 283 error_ = error; |
279 event_callback_->OnConnectionState(state_, error_); | 284 event_callback_->OnConnectionState(state_, error_); |
280 } | 285 } |
281 } | 286 } |
282 | 287 |
283 } // namespace protocol | 288 } // namespace protocol |
284 } // namespace remoting | 289 } // namespace remoting |
OLD | NEW |