OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_EVENTS_DEVICES_INPUT_DEVICE_H_ | 5 #ifndef UI_EVENTS_DEVICES_INPUT_DEVICE_H_ |
6 #define UI_EVENTS_DEVICES_INPUT_DEVICE_H_ | 6 #define UI_EVENTS_DEVICES_INPUT_DEVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 InputDevice(int id, InputDeviceType type, const std::string& name); | 29 InputDevice(int id, InputDeviceType type, const std::string& name); |
30 InputDevice(int id, | 30 InputDevice(int id, |
31 InputDeviceType type, | 31 InputDeviceType type, |
32 const std::string& name, | 32 const std::string& name, |
33 const base::FilePath& sys_path, | 33 const base::FilePath& sys_path, |
34 uint16_t vendor, | 34 uint16_t vendor, |
35 uint16_t product); | 35 uint16_t product); |
36 InputDevice(const InputDevice& other); | 36 InputDevice(const InputDevice& other); |
37 virtual ~InputDevice(); | 37 virtual ~InputDevice(); |
38 | 38 |
| 39 std::string ToString() const; |
| 40 |
39 // ID of the device. This ID is unique between all input devices. | 41 // ID of the device. This ID is unique between all input devices. |
40 int id; | 42 int id; |
41 | 43 |
42 // The type of the input device. | 44 // The type of the input device. |
43 InputDeviceType type; | 45 InputDeviceType type; |
44 | 46 |
45 // Name of the device. | 47 // Name of the device. |
46 std::string name; | 48 std::string name; |
47 | 49 |
48 // The path to the input device in the sysfs filesystem. | 50 // The path to the input device in the sysfs filesystem. |
49 base::FilePath sys_path; | 51 base::FilePath sys_path; |
50 | 52 |
51 // USB-style device identifiers, where available, or 0 if unavailable. | 53 // USB-style device identifiers, where available, or 0 if unavailable. |
52 uint16_t vendor_id; | 54 uint16_t vendor_id; |
53 uint16_t product_id; | 55 uint16_t product_id; |
54 }; | 56 }; |
55 | 57 |
56 } // namespace ui | 58 } // namespace ui |
57 | 59 |
58 #endif // UI_EVENTS_DEVICES_INPUT_DEVICE_H_ | 60 #endif // UI_EVENTS_DEVICES_INPUT_DEVICE_H_ |
OLD | NEW |