Chromium Code Reviews| 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 |