Don't pass a null ServiceWorker registration with OK status code.
[chromium-blink-merge.git] / device / hid / hid_device_info.h
blob7531042156b8aef676ddfa90d1d01d85c8de99d0
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.
5 #ifndef DEVICE_HID_HID_DEVICE_INFO_H_
6 #define DEVICE_HID_HID_DEVICE_INFO_H_
8 #include <stdint.h>
10 #include <string>
12 #include "build/build_config.h"
14 #if defined(OS_MACOSX)
15 #include <IOKit/hid/IOHIDDevice.h>
16 #endif
18 namespace device {
20 enum HidBusType {
21 kHIDBusTypeUSB = 0,
22 kHIDBusTypeBluetooth = 1,
25 #if defined(OS_MACOSX)
26 typedef IOHIDDeviceRef HidDeviceId;
27 const HidDeviceId kInvalidHidDeviceId = NULL;
28 #else
29 typedef std::string HidDeviceId;
30 extern const char kInvalidHidDeviceId[];
31 #endif
33 struct HidDeviceInfo {
34 HidDeviceInfo();
35 ~HidDeviceInfo();
37 HidDeviceId device_id;
39 HidBusType bus_type;
40 uint16_t vendor_id;
41 uint16_t product_id;
43 int input_report_size;
44 int output_report_size;
45 int feature_report_size;
47 uint16_t usage_page;
48 uint16_t usage;
49 bool has_report_id;
51 std::string product_name;
52 std::string serial_number;
55 } // namespace device
57 #endif // DEVICE_HID_HID_DEVICE_INFO_H_