test_event_source.cc 651 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2019 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_source.h"
  5. #include "ui/events/event.h"
  6. namespace ui {
  7. namespace test {
  8. EventDispatchDetails TestEventSource::Send(Event* event) {
  9. CHECK(event);
  10. ++events_sent_;
  11. return SendEventToSink(event);
  12. }
  13. EventSink* TestEventSource::GetEventSink() {
  14. return sink_;
  15. }
  16. EventDispatchDetails TestEventSource::OnEventFromSource(Event* event) {
  17. CHECK(event);
  18. ++events_sunk_;
  19. return EventDispatchDetails();
  20. }
  21. } // namespace test
  22. } // namespace ui