| 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/jingle_session_manager.h" | 5 #include "remoting/protocol/jingle_session_manager.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 cricket_session->set_remote_name(host_jid); | 134 cricket_session->set_remote_name(host_jid); |
| 135 | 135 |
| 136 scoped_ptr<JingleSession> jingle_session( | 136 scoped_ptr<JingleSession> jingle_session( |
| 137 new JingleSession(this, cricket_session, authenticator.Pass())); | 137 new JingleSession(this, cricket_session, authenticator.Pass())); |
| 138 jingle_session->set_candidate_config(config.Pass()); | 138 jingle_session->set_candidate_config(config.Pass()); |
| 139 jingle_session->SetStateChangeCallback(state_change_callback); | 139 jingle_session->SetStateChangeCallback(state_change_callback); |
| 140 sessions_.push_back(jingle_session.get()); | 140 sessions_.push_back(jingle_session.get()); |
| 141 | 141 |
| 142 jingle_session->SendSessionInitiate(); | 142 jingle_session->SendSessionInitiate(); |
| 143 | 143 |
| 144 return scoped_ptr<Session>(jingle_session.Pass()); | 144 return jingle_session.PassAs<Session>(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void JingleSessionManager::OnSessionCreate( | 147 void JingleSessionManager::OnSessionCreate( |
| 148 cricket::Session* cricket_session, bool incoming) { | 148 cricket::Session* cricket_session, bool incoming) { |
| 149 DCHECK(CalledOnValidThread()); | 149 DCHECK(CalledOnValidThread()); |
| 150 | 150 |
| 151 // Allow local connections. | 151 // Allow local connections. |
| 152 cricket_session->set_allow_local_ips(true); | 152 cricket_session->set_allow_local_ips(true); |
| 153 | 153 |
| 154 if (incoming) { | 154 if (incoming) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 cricket::WriteError* error) { | 261 cricket::WriteError* error) { |
| 262 const ContentDescription* desc = | 262 const ContentDescription* desc = |
| 263 static_cast<const ContentDescription*>(content); | 263 static_cast<const ContentDescription*>(content); |
| 264 | 264 |
| 265 *elem = desc->ToXml(); | 265 *elem = desc->ToXml(); |
| 266 return true; | 266 return true; |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace protocol | 269 } // namespace protocol |
| 270 } // namespace remoting | 270 } // namespace remoting |
| OLD | NEW |