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

Unified Diff: remoting/protocol/input_event_timestamps.cc

Issue 2413553003: Add InputEventTimestampSource interface. (Closed)
Patch Set: msvc compilation 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
« no previous file with comments | « remoting/protocol/input_event_timestamps.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b75e69f698ee36279d990caff8797b1edd8ebb21
--- /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 {
+
+InputEventTimestampsSourceImpl::InputEventTimestampsSourceImpl() {}
+InputEventTimestampsSourceImpl::~InputEventTimestampsSourceImpl() {}
+
+void InputEventTimestampsSourceImpl::OnEventReceived(
+ InputEventTimestamps timestamps) {
+ last_timestamps_ = timestamps;
+}
+
+InputEventTimestamps InputEventTimestampsSourceImpl::TakeLastEventTimestamps() {
+ InputEventTimestamps result = last_timestamps_;
+ last_timestamps_ = InputEventTimestamps();
+ return result;
+}
+
+} // namespace protocol
+} // namespace remoting
« no previous file with comments | « remoting/protocol/input_event_timestamps.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698