Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |