| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |