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

Unified Diff: remoting/host/client_session.cc

Issue 2420183002: Don't use barcodes in ProtocolPerfTests (Closed)
Patch Set: . Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698