Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_EVENTS_INPUT_DEVICE_H_ | |
| 6 #define UI_EVENTS_INPUT_DEVICE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ui/events/events_base_export.h" | |
| 11 | |
| 12 namespace ui { | |
| 13 | |
| 14 enum InputDeviceType { | |
| 15 INTERNAL, // Internal device. | |
|
sky
2014/10/20 22:18:44
It's not clear what internal or external mean in t
sky
2014/10/20 22:18:44
Prefix with enum name, eg INPUT_DEVICE_INTERNAL.
| |
| 16 EXTERNAL, // Known external device. | |
| 17 UNKNOWN, // Device that may or may not be an external device. | |
| 18 }; | |
| 19 | |
| 20 // Represents an input device state. | |
| 21 struct EVENTS_BASE_EXPORT InputDevice { | |
| 22 static const int kInvalidId; | |
| 23 | |
| 24 InputDevice(int id, InputDeviceType type, const std::string& name); | |
| 25 | |
|
sky
2014/10/20 22:18:44
Don't you need a virtual destructor?
| |
| 26 // ID of the device. This ID must uniquely identify the input device. | |
| 27 int id; | |
| 28 | |
| 29 // The type of the input device. | |
| 30 InputDeviceType type; | |
| 31 | |
| 32 // Name of the device. | |
| 33 std::string name; | |
| 34 }; | |
| 35 | |
| 36 } // namespace ui | |
| 37 | |
| 38 #endif // UI_EVENTS_INPUT_DEVICE_H_ | |
| OLD | NEW |