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

Unified Diff: remoting/protocol/input_event_timestamps.cc

Issue 2413553003: Add InputEventTimestampSource interface. (Closed)
Patch Set: Created 4 years, 2 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/input_event_timestamps.cc
diff --git a/remoting/protocol/input_event_timestamps.cc b/remoting/protocol/input_event_timestamps.cc
new file mode 100644
index 0000000000000000000000000000000000000000..977ba380ff9e600c754bee86d1a44ca13bb99cf2
--- /dev/null
+++ b/remoting/protocol/input_event_timestamps.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/protocol/input_event_timestamps.h"
+
+namespace remoting {
+namespace protocol {
+
+InputEventTimestampSourceImpl::InputEventTimestampSourceImpl() {}
+InputEventTimestampSourceImpl::~InputEventTimestampSourceImpl() {}
+
+void InputEventTimestampSourceImpl::OnEventReceived(
+ InputEventTimestamps timestamps) {
+ last_timestamps_ = timestamps;
+}
+
+InputEventTimestamps InputEventTimestampSourceImpl::GetLastEventTimestamps() {
+ InputEventTimestamps result = last_timestamps_;
+ last_timestamps_ = InputEventTimestamps();
Jamie 2016/10/12 21:41:23 Why reset this here? It makes GetLastEventTimestam
Sergey Ulanov 2016/10/14 19:34:26 Renamed the function to TakeLastEventTimestamps()
+ return result;
+}
+
+} // namespace protocol
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698