test_event_rewriter.cc 640 B

12345678910111213141516171819202122232425
  1. // Copyright 2018 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 "ui/events/test/test_event_rewriter.h"
  5. #include "ui/events/event.h"
  6. namespace ui {
  7. namespace test {
  8. TestEventRewriter::TestEventRewriter() = default;
  9. TestEventRewriter::~TestEventRewriter() = default;
  10. ui::EventDispatchDetails TestEventRewriter::RewriteEvent(
  11. const ui::Event& event,
  12. const Continuation continuation) {
  13. ++events_seen_;
  14. last_event_ = event.Clone();
  15. return SendEvent(continuation, &event);
  16. }
  17. } // namespace test
  18. } // namespace ui