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

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

Issue 22477006: Added JsonMessage to the control channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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) 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::ProcessClientJson(const protocol::JsonMessage& message) {
191 // No messages are currently supported.
192 LOG(INFO) << "Unexpected message received: "
193 << message.type() << ": " << message.json();
194 }
195
190 void ClientSession::OnConnectionAuthenticated( 196 void ClientSession::OnConnectionAuthenticated(
191 protocol::ConnectionToClient* connection) { 197 protocol::ConnectionToClient* connection) {
192 DCHECK(CalledOnValidThread()); 198 DCHECK(CalledOnValidThread());
193 DCHECK_EQ(connection_.get(), connection); 199 DCHECK_EQ(connection_.get(), connection);
194 DCHECK(!audio_scheduler_.get()); 200 DCHECK(!audio_scheduler_.get());
195 DCHECK(!desktop_environment_); 201 DCHECK(!desktop_environment_);
196 DCHECK(!input_injector_); 202 DCHECK(!input_injector_);
197 DCHECK(!screen_controls_); 203 DCHECK(!screen_controls_);
198 DCHECK(!video_scheduler_.get()); 204 DCHECK(!video_scheduler_.get());
199 205
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); 437 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex());
432 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { 438 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
433 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); 439 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus());
434 } 440 }
435 441
436 NOTIMPLEMENTED(); 442 NOTIMPLEMENTED();
437 return scoped_ptr<AudioEncoder>(); 443 return scoped_ptr<AudioEncoder>();
438 } 444 }
439 445
440 } // namespace remoting 446 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698