| Index: remoting/host/client_session.cc
|
| diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
|
| index dcb87044efc8a0a2aa9c4c7b325e8ddccc85a6ae..d75791718bd3a4a7bc9289296e51245b3142ec0f 100644
|
| --- a/remoting/host/client_session.cc
|
| +++ b/remoting/host/client_session.cc
|
| @@ -293,8 +293,9 @@ void ClientSession::CreateMediaStreams() {
|
| video_stream_->SetLosslessEncode(lossless_video_encode_);
|
| video_stream_->SetLosslessColor(lossless_video_color_);
|
|
|
| - // Pause capturing if necessary.
|
| - video_stream_->Pause(pause_video_);
|
| + // Pause video stream first. It's unpaused OnConnectionChannelsConnected()
|
| + // after all channels are connected.
|
| + video_stream_->Pause(true);
|
| }
|
|
|
| void ClientSession::OnConnectionChannelsConnected() {
|
| @@ -323,6 +324,9 @@ void ClientSession::OnConnectionChannelsConnected() {
|
| pending_video_layout_message_.reset();
|
| }
|
|
|
| + if (video_stream_)
|
| + video_stream_->Pause(pause_video_);
|
| +
|
| // Notify the event handler that all our channels are now connected.
|
| event_handler_->OnSessionChannelsConnected(this);
|
| }
|
| @@ -404,9 +408,15 @@ ClientSessionControl* ClientSession::session_control() {
|
| return this;
|
| }
|
|
|
| -std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
|
| +void ClientSession::SetEventTimestampsSourceForTests(
|
| + scoped_refptr<protocol::InputEventTimestampsSource>
|
| + event_timestamp_source) {
|
| DCHECK(CalledOnValidThread());
|
| + video_stream_->SetEventTimestampsSource(event_timestamp_source);
|
| +}
|
|
|
| +std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
|
| + DCHECK(CalledOnValidThread());
|
| return base::MakeUnique<protocol::ClipboardThreadProxy>(
|
| client_clipboard_factory_.GetWeakPtr(),
|
| base::ThreadTaskRunnerHandle::Get());
|
|
|