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

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: done Created 9 years, 8 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/protocol/host_message_dispatcher.h ('k') | remoting/protocol/input_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..009dcb335818c182c81e2c12a281aa2308935493 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->sequence_number());
if (message->has_key_event()) {
input_stub_->InjectKeyEvent(&message->key_event(), done_task);
return;
« no previous file with comments | « remoting/protocol/host_message_dispatcher.h ('k') | remoting/protocol/input_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698