| 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/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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 void JingleSessionManager::set_allow_local_ips(bool allow_local_ips) { | 126 void JingleSessionManager::set_allow_local_ips(bool allow_local_ips) { |
| 127 allow_local_ips_ = allow_local_ips; | 127 allow_local_ips_ = allow_local_ips; |
| 128 } | 128 } |
| 129 | 129 |
| 130 Session* JingleSessionManager::Connect( | 130 Session* JingleSessionManager::Connect( |
| 131 const std::string& host_jid, | 131 const std::string& host_jid, |
| 132 const std::string& host_public_key, | 132 const std::string& host_public_key, |
| 133 const std::string& receiver_token, | 133 const std::string& receiver_token, |
| 134 CandidateSessionConfig* candidate_config, | 134 CandidateSessionConfig* candidate_config, |
| 135 Session::StateChangeCallback* state_change_callback) { | 135 const Session::StateChangeCallback& state_change_callback) { |
| 136 DCHECK(CalledOnValidThread()); | 136 DCHECK(CalledOnValidThread()); |
| 137 | 137 |
| 138 // Can be called from any thread. | 138 // Can be called from any thread. |
| 139 JingleSession* jingle_session = | 139 JingleSession* jingle_session = |
| 140 JingleSession::CreateClientSession(this, host_public_key); | 140 JingleSession::CreateClientSession(this, host_public_key); |
| 141 jingle_session->set_candidate_config(candidate_config); | 141 jingle_session->set_candidate_config(candidate_config); |
| 142 jingle_session->set_receiver_token(receiver_token); | 142 jingle_session->set_receiver_token(receiver_token); |
| 143 | 143 |
| 144 cricket::Session* cricket_session = cricket_session_manager_->CreateSession( | 144 cricket::Session* cricket_session = cricket_session_manager_->CreateSession( |
| 145 local_jid_, kChromotingXmlNamespace); | 145 local_jid_, kChromotingXmlNamespace); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 const std::string& certificate) { | 319 const std::string& certificate) { |
| 320 cricket::SessionDescription* desc = new cricket::SessionDescription(); | 320 cricket::SessionDescription* desc = new cricket::SessionDescription(); |
| 321 desc->AddContent( | 321 desc->AddContent( |
| 322 ContentDescription::kChromotingContentName, kChromotingXmlNamespace, | 322 ContentDescription::kChromotingContentName, kChromotingXmlNamespace, |
| 323 new ContentDescription(config, "", certificate)); | 323 new ContentDescription(config, "", certificate)); |
| 324 return desc; | 324 return desc; |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace protocol | 327 } // namespace protocol |
| 328 } // namespace remoting | 328 } // namespace remoting |
| OLD | NEW |