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

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

Issue 2805793002: ozone: evdev: Add gamepad support (Closed)
Patch Set: Support Gamepad in Ozone. Created 3 years, 8 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 (c) 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_GAMEPAD_GAMEPAD_EVENT_H_
6 #define UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_EVENT_H_
7
8 #include "base/time/time.h"
9 #include "ui/events/ozone/gamepad/webgamepad_constants.h"
10
11 namespace ui {
12
13 class GamepadEvent {
14 public:
15 GamepadEvent(int device_id,
16 GamepadEventType type,
17 uint16_t code,
18 double value,
19 base::TimeTicks timestamp);
20
21 int get_device_id() { return device_id_; }
spang 2017/04/21 05:38:46 This should be called just "device_id()". Remove g
jkwang 2017/04/25 21:16:41 Done.
22
23 GamepadEventType get_type() { return type_; }
24
25 uint16_t get_code() { return code_; }
26
27 double get_value() { return value_; }
28
29 base::TimeTicks get_timestamp() { return timestamp_; }
30
31 private:
32 int device_id_;
33
34 GamepadEventType type_;
35
36 uint16_t code_;
37
38 double value_;
39
40 base::TimeTicks timestamp_;
41 };
42
43 }; // namespace ui
44
45 #endif // UI_EVENTS_OZONE_GAMEPAD_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698