| OLD | NEW |
| (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_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 device_id() { return device_id_; } |
| 22 |
| 23 GamepadEventType type() { return type_; } |
| 24 |
| 25 uint16_t code() { return code_; } |
| 26 |
| 27 double value() { return value_; } |
| 28 |
| 29 base::TimeTicks 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_GAMEPAD_EVENT_H_ |
| OLD | NEW |