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

Unified Diff: remoting/host/chromoting_host.cc

Issue 6792038: Chromoting to report roundtrip latency (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add scriptable interface Created 9 years, 9 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/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index d604d5224cdcfa3733bd16fbed644b16d2ceaecd..dd69e157a3a3b042f2ef9e4c356bc308dfb0d053 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -243,6 +243,21 @@ void ChromotingHost::OnConnectionFailed(ConnectionToClient* connection) {
make_scoped_refptr(connection)));
}
+void ChromotingHost::OnSequenceNumberUpdated(ConnectionToClient* connection,
+ int64 sequence_number) {
+ // Update the sequence number in ScreenRecorder.
+ if (MessageLoop::current() != context_->main_message_loop()) {
+ context_->main_message_loop()->PostTask(
+ FROM_HERE,
+ NewRunnableMethod(this, &ChromotingHost::OnSequenceNumberUpdated,
+ make_scoped_refptr(connection), sequence_number));
+ return;
+ }
+
+ if (recorder_.get())
+ recorder_->UpdateSequenceNumber(sequence_number);
+}
+
////////////////////////////////////////////////////////////////////////////
// JingleClient::Callback implementations
void ChromotingHost::OnStateChange(JingleClient* jingle_client,

Powered by Google App Engine
This is Rietveld 408576698