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

Side by Side Diff: remoting/host/client_session.cc

Issue 17063003: Changes to PairingRegistry to facilitate per-platform implementions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 7 years, 6 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 | « no previous file | remoting/protocol/negotiating_authenticator_unittest.cc » ('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) 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/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "remoting/base/capabilities.h" 10 #include "remoting/base/capabilities.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 desktop_environment_->SetCapabilities( 174 desktop_environment_->SetCapabilities(
175 IntersectCapabilities(*client_capabilities_, host_capabilities_)); 175 IntersectCapabilities(*client_capabilities_, host_capabilities_));
176 } 176 }
177 177
178 void ClientSession::RequestPairing( 178 void ClientSession::RequestPairing(
179 const protocol::PairingRequest& pairing_request) { 179 const protocol::PairingRequest& pairing_request) {
180 if (pairing_request.has_client_name()) { 180 if (pairing_request.has_client_name()) {
181 protocol::PairingRegistry::Pairing pairing = 181 protocol::PairingRegistry::Pairing pairing =
182 pairing_registry_->CreatePairing(pairing_request.client_name()); 182 pairing_registry_->CreatePairing(pairing_request.client_name());
183 protocol::PairingResponse pairing_response; 183 protocol::PairingResponse pairing_response;
184 pairing_response.set_client_id(pairing.client_id); 184 pairing_response.set_client_id(pairing.client_id());
185 pairing_response.set_shared_secret(pairing.shared_secret); 185 pairing_response.set_shared_secret(pairing.shared_secret());
186 connection_->client_stub()->SetPairingResponse(pairing_response); 186 connection_->client_stub()->SetPairingResponse(pairing_response);
187 } 187 }
188 } 188 }
189 189
190 void ClientSession::OnConnectionAuthenticated( 190 void ClientSession::OnConnectionAuthenticated(
191 protocol::ConnectionToClient* connection) { 191 protocol::ConnectionToClient* connection) {
192 DCHECK(CalledOnValidThread()); 192 DCHECK(CalledOnValidThread());
193 DCHECK_EQ(connection_.get(), connection); 193 DCHECK_EQ(connection_.get(), connection);
194 DCHECK(!audio_scheduler_.get()); 194 DCHECK(!audio_scheduler_.get());
195 DCHECK(!desktop_environment_); 195 DCHECK(!desktop_environment_);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); 431 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex());
432 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { 432 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
433 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); 433 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus());
434 } 434 }
435 435
436 NOTIMPLEMENTED(); 436 NOTIMPLEMENTED();
437 return scoped_ptr<AudioEncoder>(); 437 return scoped_ptr<AudioEncoder>();
438 } 438 }
439 439
440 } // namespace remoting 440 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/negotiating_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698