input_event_timestamps.cc 793 B

12345678910111213141516171819202122232425
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "remoting/protocol/input_event_timestamps.h"
  5. namespace remoting {
  6. namespace protocol {
  7. InputEventTimestampsSourceImpl::InputEventTimestampsSourceImpl() = default;
  8. InputEventTimestampsSourceImpl::~InputEventTimestampsSourceImpl() = default;
  9. void InputEventTimestampsSourceImpl::OnEventReceived(
  10. InputEventTimestamps timestamps) {
  11. last_timestamps_ = timestamps;
  12. }
  13. InputEventTimestamps InputEventTimestampsSourceImpl::TakeLastEventTimestamps() {
  14. InputEventTimestamps result = last_timestamps_;
  15. last_timestamps_ = InputEventTimestamps();
  16. return result;
  17. }
  18. } // namespace protocol
  19. } // namespace remoting