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, |