Introduce new SPDY Version UMA histogram.
[chromium-blink-merge.git] / device / hid / hid_service_win.h
blob51ea8fb530e2cfa57d8b8f8f48ec12a21dc4b73c
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_SERVICE_WIN_H_
6 #define DEVICE_HID_HID_SERVICE_WIN_H_
8 #include <map>
10 #include "device/hid/hid_device_info.h"
11 #include "device/hid/hid_service.h"
13 #if defined(OS_WIN)
15 #include <windows.h>
16 #include <hidclass.h>
18 extern "C" {
19 #include <hidsdi.h>
20 #include <hidpi.h>
23 #endif // defined(OS_WIN)
25 namespace device {
27 class HidConnection;
29 class HidServiceWin : public HidService {
30 public:
31 HidServiceWin();
33 virtual void GetDevices(std::vector<HidDeviceInfo>* devices) OVERRIDE;
35 virtual scoped_refptr<HidConnection> Connect(const HidDeviceId& device_id)
36 OVERRIDE;
38 private:
39 virtual ~HidServiceWin();
41 void Enumerate();
42 static void CollectInfoFromButtonCaps(PHIDP_PREPARSED_DATA preparsed_data,
43 HIDP_REPORT_TYPE report_type,
44 USHORT button_caps_length,
45 HidCollectionInfo* collection_info);
46 static void CollectInfoFromValueCaps(PHIDP_PREPARSED_DATA preparsed_data,
47 HIDP_REPORT_TYPE report_type,
48 USHORT value_caps_length,
49 HidCollectionInfo* collection_info);
50 void PlatformAddDevice(const std::string& device_path);
51 void PlatformRemoveDevice(const std::string& device_path);
53 DISALLOW_COPY_AND_ASSIGN(HidServiceWin);
56 } // namespace device
58 #endif // DEVICE_HID_HID_SERVICE_WIN_H_