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

Unified Diff: remoting/protocol/host_message_dispatcher.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/protocol/host_message_dispatcher.cc
diff --git a/remoting/protocol/host_message_dispatcher.cc b/remoting/protocol/host_message_dispatcher.cc
index c793ce7c66345ca08f4841121623de2ad2ff713d..ab564c59ef2bf96352d2e8c3b87d2bfe43f6a9a4 100644
--- a/remoting/protocol/host_message_dispatcher.cc
+++ b/remoting/protocol/host_message_dispatcher.cc
@@ -26,24 +26,26 @@ HostMessageDispatcher::~HostMessageDispatcher() {
}
void HostMessageDispatcher::Initialize(
- protocol::Session* session,
+ ConnectionToClient* connection,
HostStub* host_stub, InputStub* input_stub) {
- if (!session || !host_stub || !input_stub ||
- !session->event_channel() || !session->control_channel()) {
+ if (!connection || !host_stub || !input_stub ||
+ !connection->session()->event_channel() ||
+ !connection->session()->control_channel()) {
return;
}
control_message_reader_.reset(new ProtobufMessageReader<ControlMessage>());
event_message_reader_.reset(new ProtobufMessageReader<EventMessage>());
+ connection_ = connection;
host_stub_ = host_stub;
input_stub_ = input_stub;
// Initialize the readers on the sockets provided by channels.
event_message_reader_->Init(
- session->event_channel(),
+ connection->session()->event_channel(),
NewCallback(this, &HostMessageDispatcher::OnEventMessageReceived));
control_message_reader_->Init(
- session->control_channel(),
+ connection->session()->control_channel(),
NewCallback(this, &HostMessageDispatcher::OnControlMessageReceived));
}
@@ -67,6 +69,7 @@ void HostMessageDispatcher::OnControlMessageReceived(
void HostMessageDispatcher::OnEventMessageReceived(
EventMessage* message, Task* done_task) {
// TODO(sergeyu): Add message validation.
+ connection_->UpdateSequenceNumber(message->timestamp());
if (message->has_key_event()) {
input_stub_->InjectKeyEvent(&message->key_event(), done_task);
return;

Powered by Google App Engine
This is Rietveld 408576698