Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: ui/events/ozone/gamepad/generic_gamepad_mapping.h

Issue 2899893003: Add generic mapping for gamepad (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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
5 #ifndef UI_EVENTS_OZONE_GENERIC_GAMEPAD_GAMEPAD_MAPPING_H_
6 #define UI_EVENTS_OZONE_GENERIC_GAMEPAD_GAMEPAD_MAPPING_H_
7
8 #include <vector>
9 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
10 #include "ui/events/ozone/gamepad/gamepad_mapping.h"
11 #include "ui/events/ozone/gamepad/webgamepad_constants.h"
12
13 namespace ui {
14
15 class EventDeviceInfo;
16
17 class EVENTS_OZONE_EVDEV_EXPORT GenericGamepadMapping : public GamepadMapper {
18 public:
19 GenericGamepadMapping(const EventDeviceInfo& device_info);
20
21 bool operator()(uint16_t type,
22 uint16_t code,
23 GamepadEventType* mapped_type,
24 uint16_t* mapped_code) override;
spang 2017/06/01 05:08:13 const
jkwang 2017/06/02 22:03:52 Done.
25
26 ~GenericGamepadMapping() override;
27
28 private:
29 std::vector<AbsMapEntry> abs_map_;
30 std::vector<KeyMapEntry> key_map_;
31 };
32
33 } // namespace ui
34
35 #endif // UI_EVENTS_OZONE_GENERIC_GAMEPAD_GAMEPAD_MAPPING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698