summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r--remoting/host/chromoting_host.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 6ca4b70..28e28d9 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -197,6 +197,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,