Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: remoting/protocol/jingle_session_manager.cc

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_manager.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698