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

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

Issue 92473002: Use webrtc::MouseCursorMonitor for cursor shapes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a comment. Created 7 years 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (message.type() == "test-echo") { 192 if (message.type() == "test-echo") {
193 protocol::ExtensionMessage reply; 193 protocol::ExtensionMessage reply;
194 reply.set_type("test-echo-reply"); 194 reply.set_type("test-echo-reply");
195 if (message.has_data()) 195 if (message.has_data())
196 reply.set_data(message.data().substr(0, 16)); 196 reply.set_data(message.data().substr(0, 16));
197 connection_->client_stub()->DeliverHostMessage(reply); 197 connection_->client_stub()->DeliverHostMessage(reply);
198 return; 198 return;
199 } 199 }
200 } 200 }
201 // No messages are currently supported. 201 // No messages are currently supported.
202 LOG(INFO) << "Unexpected message received: " 202 LOG(WARNING) << "Unexpected message received: "
203 << message.type() << ": " << message.data(); 203 << message.type() << ": " << message.data();
204 } 204 }
205 205
206 void ClientSession::OnConnectionAuthenticated( 206 void ClientSession::OnConnectionAuthenticated(
207 protocol::ConnectionToClient* connection) { 207 protocol::ConnectionToClient* connection) {
208 DCHECK(CalledOnValidThread()); 208 DCHECK(CalledOnValidThread());
209 DCHECK_EQ(connection_.get(), connection); 209 DCHECK_EQ(connection_.get(), connection);
210 DCHECK(!audio_scheduler_.get()); 210 DCHECK(!audio_scheduler_.get());
211 DCHECK(!desktop_environment_); 211 DCHECK(!desktop_environment_);
212 DCHECK(!input_injector_); 212 DCHECK(!input_injector_);
213 DCHECK(!screen_controls_); 213 DCHECK(!screen_controls_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // Create a VideoEncoder based on the session's video channel configuration. 265 // Create a VideoEncoder based on the session's video channel configuration.
266 scoped_ptr<VideoEncoder> video_encoder = 266 scoped_ptr<VideoEncoder> video_encoder =
267 CreateVideoEncoder(connection_->session()->config()); 267 CreateVideoEncoder(connection_->session()->config());
268 268
269 // Create a VideoScheduler to pump frames from the capturer to the client. 269 // Create a VideoScheduler to pump frames from the capturer to the client.
270 video_scheduler_ = new VideoScheduler( 270 video_scheduler_ = new VideoScheduler(
271 video_capture_task_runner_, 271 video_capture_task_runner_,
272 video_encode_task_runner_, 272 video_encode_task_runner_,
273 network_task_runner_, 273 network_task_runner_,
274 desktop_environment_->CreateVideoCapturer(), 274 desktop_environment_->CreateVideoCapturer(),
275 desktop_environment_->CreateMouseCursorMonitor(),
275 video_encoder.Pass(), 276 video_encoder.Pass(),
276 connection_->client_stub(), 277 connection_->client_stub(),
277 &mouse_clamping_filter_); 278 &mouse_clamping_filter_);
278 279
279 // Create an AudioScheduler if audio is enabled, to pump audio samples. 280 // Create an AudioScheduler if audio is enabled, to pump audio samples.
280 if (connection_->session()->config().is_audio_enabled()) { 281 if (connection_->session()->config().is_audio_enabled()) {
281 scoped_ptr<AudioEncoder> audio_encoder = 282 scoped_ptr<AudioEncoder> audio_encoder =
282 CreateAudioEncoder(connection_->session()->config()); 283 CreateAudioEncoder(connection_->session()->config());
283 audio_scheduler_ = new AudioScheduler( 284 audio_scheduler_ = new AudioScheduler(
284 audio_task_runner_, 285 audio_task_runner_,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); 444 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim());
444 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { 445 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
445 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); 446 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus());
446 } 447 }
447 448
448 NOTREACHED(); 449 NOTREACHED();
449 return scoped_ptr<AudioEncoder>(); 450 return scoped_ptr<AudioEncoder>();
450 } 451 }
451 452
452 } // namespace remoting 453 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698