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

Unified Diff: remoting/protocol/message_reader.h

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/message_reader.h
diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h
index 65d52d0a8bbe5cfb34965be2ef64eb982e8220e9..720f99bf6903040279265fd8bce3c257a4b975d2 100644
--- a/remoting/protocol/message_reader.h
+++ b/remoting/protocol/message_reader.h
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
+#include "base/time/time.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/protocol/message_decoder.h"
@@ -45,12 +46,17 @@ class MessageReader : public base::NonThreadSafe {
// Starts reading from |socket|.
void StartReading(net::Socket* socket);
+ base::TimeDelta last_message_read_delay() {
Wez 2015/01/21 01:35:40 nit: Add a brief comment to explain what this mean
Sergey Ulanov 2015/01/29 01:33:29 Done.
+ return last_message_read_delay_;
+ }
+
private:
void DoRead();
void OnRead(int result);
void HandleReadResult(int result);
void OnDataReceived(net::IOBuffer* data, int data_size);
- void RunCallback(scoped_ptr<CompoundBuffer> message);
+ void RunCallback(scoped_ptr<CompoundBuffer> message,
+ base::TimeDelta read_delay);
void OnMessageDone();
net::Socket* socket_;
@@ -72,6 +78,9 @@ class MessageReader : public base::NonThreadSafe {
// Callback is called when a message is received.
MessageReceivedCallback message_received_callback_;
+ base::TimeTicks last_message_started_time_;
+ base::TimeDelta last_message_read_delay_;
Wez 2015/01/21 01:35:40 nit: Suggest adding a block comment e.g. "Used to
Sergey Ulanov 2015/01/29 01:33:29 Done.
+
base::WeakPtrFactory<MessageReader> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MessageReader);

Powered by Google App Engine
This is Rietveld 408576698