| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 video_capture_task_runner_, | 457 video_capture_task_runner_, |
| 458 video_encode_task_runner_, | 458 video_encode_task_runner_, |
| 459 network_task_runner_, | 459 network_task_runner_, |
| 460 video_capturer.Pass(), | 460 video_capturer.Pass(), |
| 461 desktop_environment_->CreateMouseCursorMonitor(), | 461 desktop_environment_->CreateMouseCursorMonitor(), |
| 462 video_encoder.Pass(), | 462 video_encoder.Pass(), |
| 463 connection_->client_stub(), | 463 connection_->client_stub(), |
| 464 &mouse_clamping_filter_); | 464 &mouse_clamping_filter_); |
| 465 | 465 |
| 466 // Apply video-control parameters to the new scheduler. | 466 // Apply video-control parameters to the new scheduler. |
| 467 video_scheduler_->Pause(pause_video_); | |
| 468 video_scheduler_->SetLosslessEncode(lossless_video_encode_); | 467 video_scheduler_->SetLosslessEncode(lossless_video_encode_); |
| 469 video_scheduler_->SetLosslessColor(lossless_video_color_); | 468 video_scheduler_->SetLosslessColor(lossless_video_color_); |
| 470 | 469 |
| 471 // Start capturing the screen. | 470 // Start capturing the screen. |
| 472 video_scheduler_->Start(); | 471 video_scheduler_->Start(); |
| 472 |
| 473 // Pause capturing if necessary. |
| 474 video_scheduler_->Pause(pause_video_); |
| 473 } | 475 } |
| 474 | 476 |
| 475 void ClientSession::SetGnubbyAuthHandlerForTesting( | 477 void ClientSession::SetGnubbyAuthHandlerForTesting( |
| 476 GnubbyAuthHandler* gnubby_auth_handler) { | 478 GnubbyAuthHandler* gnubby_auth_handler) { |
| 477 DCHECK(CalledOnValidThread()); | 479 DCHECK(CalledOnValidThread()); |
| 478 gnubby_auth_handler_.reset(gnubby_auth_handler); | 480 gnubby_auth_handler_.reset(gnubby_auth_handler); |
| 479 } | 481 } |
| 480 | 482 |
| 481 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { | 483 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { |
| 482 DCHECK(CalledOnValidThread()); | 484 DCHECK(CalledOnValidThread()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 513 return make_scoped_ptr(new AudioEncoderVerbatim()); | 515 return make_scoped_ptr(new AudioEncoderVerbatim()); |
| 514 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { | 516 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { |
| 515 return make_scoped_ptr(new AudioEncoderOpus()); | 517 return make_scoped_ptr(new AudioEncoderOpus()); |
| 516 } | 518 } |
| 517 | 519 |
| 518 NOTREACHED(); | 520 NOTREACHED(); |
| 519 return nullptr; | 521 return nullptr; |
| 520 } | 522 } |
| 521 | 523 |
| 522 } // namespace remoting | 524 } // namespace remoting |
| OLD | NEW |