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

Unified Diff: remoting/host/client_session.cc

Issue 2420183002: Don't use barcodes in ProtocolPerfTests (Closed)
Patch Set: Update ChromotingHost::OnSessionAuthenticated() to fix test crash 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
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/test/cyclic_frame_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index dcb87044efc8a0a2aa9c4c7b325e8ddccc85a6ae..f3fcbc31758969bb34db427c70c041f2f81e85eb 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -295,6 +295,9 @@ void ClientSession::CreateMediaStreams() {
// Pause capturing if necessary.
video_stream_->Pause(pause_video_);
+
+ if (event_timestamp_source_for_tests_)
+ video_stream_->SetEventTimestampsSource(event_timestamp_source_for_tests_);
}
void ClientSession::OnConnectionChannelsConnected() {
@@ -404,9 +407,17 @@ 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());
+ event_timestamp_source_for_tests_ = event_timestamp_source;
+ if (video_stream_)
+ video_stream_->SetEventTimestampsSource(event_timestamp_source_for_tests_);
+}
+std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
+ DCHECK(CalledOnValidThread());
return base::MakeUnique<protocol::ClipboardThreadProxy>(
client_clipboard_factory_.GetWeakPtr(),
base::ThreadTaskRunnerHandle::Get());
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/test/cyclic_frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698