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

Side by Side Diff: remoting/protocol/pepper_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
« no previous file with comments | « remoting/protocol/pepper_session_manager.h ('k') | remoting/protocol/protobuf_video_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/pepper_session_manager.h" 5 #include "remoting/protocol/pepper_session_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/jingle_glue/jingle_info_request.h" 8 #include "remoting/jingle_glue/jingle_info_request.h"
9 #include "remoting/jingle_glue/signal_strategy.h" 9 #include "remoting/jingle_glue/signal_strategy.h"
10 #include "remoting/protocol/jingle_messages.h" 10 #include "remoting/protocol/jingle_messages.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 << " Relay token: " << transport_config_.relay_token; 71 << " Relay token: " << transport_config_.relay_token;
72 72
73 listener_->OnSessionManagerInitialized(); 73 listener_->OnSessionManagerInitialized();
74 } 74 }
75 75
76 Session* PepperSessionManager::Connect( 76 Session* PepperSessionManager::Connect(
77 const std::string& host_jid, 77 const std::string& host_jid,
78 const std::string& host_public_key, 78 const std::string& host_public_key,
79 const std::string& client_token, 79 const std::string& client_token,
80 CandidateSessionConfig* config, 80 CandidateSessionConfig* config,
81 Session::StateChangeCallback* state_change_callback) { 81 const Session::StateChangeCallback& state_change_callback) {
82 PepperSession* session = new PepperSession(this); 82 PepperSession* session = new PepperSession(this);
83 session->StartConnection(host_jid, host_public_key, client_token, 83 session->StartConnection(host_jid, host_public_key, client_token,
84 config, state_change_callback); 84 config, state_change_callback);
85 sessions_[session->session_id_] = session; 85 sessions_[session->session_id_] = session;
86 return session; 86 return session;
87 } 87 }
88 88
89 void PepperSessionManager::Close() { 89 void PepperSessionManager::Close() {
90 DCHECK(CalledOnValidThread()); 90 DCHECK(CalledOnValidThread());
91 91
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 buzz::XmlElement* stanza = reply.ToXml(original_stanza); 137 buzz::XmlElement* stanza = reply.ToXml(original_stanza);
138 signal_strategy_->SendStanza(stanza); 138 signal_strategy_->SendStanza(stanza);
139 } 139 }
140 140
141 void PepperSessionManager::SessionDestroyed(PepperSession* session) { 141 void PepperSessionManager::SessionDestroyed(PepperSession* session) {
142 sessions_.erase(session->session_id_); 142 sessions_.erase(session->session_id_);
143 } 143 }
144 144
145 } // namespace protocol 145 } // namespace protocol
146 } // namespace remoting 146 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/pepper_session_manager.h ('k') | remoting/protocol/protobuf_video_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698