ozone: evdev: Add gamepad support

Desktop / Chromium - jkwang [google.com] - 6 May 2017 15:19 UTC

This patch add gamepad event and gamepad support to Ozone. gamepad_event_converter_evdev will map evdev gamepad events to w3c standard gamepad events. Then the events will be dispatched.

BUG=717246 TEST=Add/Fix and run unittest. Build local cl and inspect event dispatch logs.

Review-Url: https://codereview.chromium.org/2805793002 Cr-Commit-Position: refs/heads/master@{#469880}

29de591 ozone: evdev: Add gamepad support
ui/events/BUILD.gn | 1 +
ui/events/ozone/BUILD.gn | 10 +
.../ozone/evdev/device_event_dispatcher_evdev.h | 4 +
ui/events/ozone/evdev/event_converter_evdev.cc | 4 +
ui/events/ozone/evdev/event_converter_evdev.h | 3 +
ui/events/ozone/evdev/event_converter_test_util.cc | 10 +
ui/events/ozone/evdev/event_device_info.cc | 22 +
ui/events/ozone/evdev/event_device_info.h | 4 +
.../ozone/evdev/event_device_info_unittest.cc | 24 ++
ui/events/ozone/evdev/event_device_test_util.cc | 71 ++++
ui/events/ozone/evdev/event_device_test_util.h | 2 +
ui/events/ozone/evdev/event_factory_evdev.cc | 25 ++
ui/events/ozone/evdev/event_factory_evdev.h | 10 +
.../ozone/evdev/gamepad_event_converter_evdev.cc | 317 +++++++++++++++
.../ozone/evdev/gamepad_event_converter_evdev.h | 123 ++++++
.../gamepad_event_converter_evdev_unittest.cc | 260 ++++++++++++
.../ozone/evdev/input_device_factory_evdev.cc | 24 ++
ui/events/ozone/evdev/input_device_factory_evdev.h | 2 +
.../evdev/touch_event_converter_evdev_unittest.cc | 6 +
ui/events/ozone/gamepad/gamepad_event.cc | 20 +
ui/events/ozone/gamepad/gamepad_event.h | 45 +++
ui/events/ozone/gamepad/gamepad_mapping.cc | 448 +++++++++++++++++++++
ui/events/ozone/gamepad/gamepad_mapping.h | 28 ++
ui/events/ozone/gamepad/gamepad_observer.h | 27 ++
ui/events/ozone/gamepad/gamepad_provider_ozone.cc | 49 +++
ui/events/ozone/gamepad/gamepad_provider_ozone.h | 71 ++++
ui/events/ozone/gamepad/webgamepad_constants.h | 56 +++
27 files changed, 1666 insertions(+)

Upstream: git.chromium.org


  • Share