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