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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 input_tracker_.ReleaseAll(); | 440 input_tracker_.ReleaseAll(); |
441 | 441 |
442 disable_input_filter_.set_enabled(!disable_inputs); | 442 disable_input_filter_.set_enabled(!disable_inputs); |
443 disable_clipboard_filter_.set_enabled(!disable_inputs); | 443 disable_clipboard_filter_.set_enabled(!disable_inputs); |
444 } | 444 } |
445 | 445 |
446 void ClientSession::ResetVideoPipeline() { | 446 void ClientSession::ResetVideoPipeline() { |
447 DCHECK(CalledOnValidThread()); | 447 DCHECK(CalledOnValidThread()); |
448 | 448 |
449 mouse_shape_pump_.reset(); | 449 mouse_shape_pump_.reset(); |
| 450 connection_->set_video_feedback_stub(nullptr); |
450 video_frame_pump_.reset(); | 451 video_frame_pump_.reset(); |
451 | 452 |
452 // Create VideoEncoder and DesktopCapturer to match the session's video | 453 // Create VideoEncoder and DesktopCapturer to match the session's video |
453 // channel configuration. | 454 // channel configuration. |
454 scoped_ptr<webrtc::DesktopCapturer> video_capturer = | 455 scoped_ptr<webrtc::DesktopCapturer> video_capturer = |
455 desktop_environment_->CreateVideoCapturer(); | 456 desktop_environment_->CreateVideoCapturer(); |
456 extension_manager_->OnCreateVideoCapturer(&video_capturer); | 457 extension_manager_->OnCreateVideoCapturer(&video_capturer); |
457 scoped_ptr<VideoEncoder> video_encoder = | 458 scoped_ptr<VideoEncoder> video_encoder = |
458 CreateVideoEncoder(connection_->session()->config()); | 459 CreateVideoEncoder(connection_->session()->config()); |
459 extension_manager_->OnCreateVideoEncoder(&video_encoder); | 460 extension_manager_->OnCreateVideoEncoder(&video_encoder); |
(...skipping 17 matching lines...) Expand all Loading... |
477 video_frame_pump_.reset( | 478 video_frame_pump_.reset( |
478 new VideoFramePump(video_encode_task_runner_, capturer_proxy.Pass(), | 479 new VideoFramePump(video_encode_task_runner_, capturer_proxy.Pass(), |
479 video_encoder.Pass(), &mouse_clamping_filter_)); | 480 video_encoder.Pass(), &mouse_clamping_filter_)); |
480 | 481 |
481 // Apply video-control parameters to the new scheduler. | 482 // Apply video-control parameters to the new scheduler. |
482 video_frame_pump_->SetLosslessEncode(lossless_video_encode_); | 483 video_frame_pump_->SetLosslessEncode(lossless_video_encode_); |
483 video_frame_pump_->SetLosslessColor(lossless_video_color_); | 484 video_frame_pump_->SetLosslessColor(lossless_video_color_); |
484 | 485 |
485 // Pause capturing if necessary. | 486 // Pause capturing if necessary. |
486 video_frame_pump_->Pause(pause_video_); | 487 video_frame_pump_->Pause(pause_video_); |
| 488 |
| 489 connection_->set_video_feedback_stub( |
| 490 video_frame_pump_->video_feedback_stub()); |
487 } | 491 } |
488 | 492 |
489 void ClientSession::SetGnubbyAuthHandlerForTesting( | 493 void ClientSession::SetGnubbyAuthHandlerForTesting( |
490 GnubbyAuthHandler* gnubby_auth_handler) { | 494 GnubbyAuthHandler* gnubby_auth_handler) { |
491 DCHECK(CalledOnValidThread()); | 495 DCHECK(CalledOnValidThread()); |
492 gnubby_auth_handler_.reset(gnubby_auth_handler); | 496 gnubby_auth_handler_.reset(gnubby_auth_handler); |
493 } | 497 } |
494 | 498 |
495 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { | 499 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { |
496 DCHECK(CalledOnValidThread()); | 500 DCHECK(CalledOnValidThread()); |
497 | 501 |
498 return make_scoped_ptr( | 502 return make_scoped_ptr( |
499 new protocol::ClipboardThreadProxy(client_clipboard_factory_.GetWeakPtr(), | 503 new protocol::ClipboardThreadProxy(client_clipboard_factory_.GetWeakPtr(), |
500 base::MessageLoopProxy::current())); | 504 base::MessageLoopProxy::current())); |
501 } | 505 } |
502 | 506 |
503 } // namespace remoting | 507 } // namespace remoting |
OLD | NEW |