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 #include "ui/events/devices/input_device.h" | 5 #include "ui/events/devices/input_device.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
11 // static | 11 // static |
12 const int InputDevice::kInvalidId = 0; | 12 const int InputDevice::kInvalidId = 0; |
13 | 13 |
14 InputDevice::InputDevice() | 14 InputDevice::InputDevice() |
15 : id(kInvalidId), type(InputDeviceType::INPUT_DEVICE_UNKNOWN) { | 15 : id(kInvalidId), type(InputDeviceType::INPUT_DEVICE_UNKNOWN) { |
16 } | 16 } |
17 | 17 |
18 InputDevice::InputDevice(int id, InputDeviceType type, const std::string& name) | 18 InputDevice::InputDevice(int id, InputDeviceType type) |
19 : id(id), type(type), name(name), vendor_id(0), product_id(0) { | 19 : id(id), type(type) { |
20 } | |
21 | |
22 InputDevice::InputDevice(int id, | |
23 InputDeviceType type, | |
24 const std::string& name, | |
25 uint16_t vendor, | |
26 uint16_t product) | |
27 : id(id), type(type), name(name), vendor_id(vendor), product_id(product) { | |
28 } | 20 } |
29 | 21 |
30 InputDevice::~InputDevice() { | 22 InputDevice::~InputDevice() { |
31 } | 23 } |
32 | 24 |
33 } // namespace ui | 25 } // namespace ui |
OLD | NEW |