Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: device/hid/hid_service_win.h

Issue 502573002: Find HID report IDs in output and feature reports on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use unsigned types and move INITGUID to back to .cc. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | device/hid/hid_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 DEVICE_HID_HID_SERVICE_WIN_H_ 5 #ifndef DEVICE_HID_HID_SERVICE_WIN_H_
6 #define DEVICE_HID_HID_SERVICE_WIN_H_ 6 #define DEVICE_HID_HID_SERVICE_WIN_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "device/hid/hid_device_info.h" 10 #include "device/hid/hid_device_info.h"
11 #include "device/hid/hid_service.h" 11 #include "device/hid/hid_service.h"
12 12
13 #if defined(OS_WIN)
14
15 #include <windows.h>
16 #include <hidclass.h>
17
18 extern "C" {
19 #include <hidsdi.h>
20 #include <hidpi.h>
21 }
22
23 #endif // defined(OS_WIN)
24
13 namespace device { 25 namespace device {
14 26
15 class HidConnection; 27 class HidConnection;
16 28
17 class HidServiceWin : public HidService { 29 class HidServiceWin : public HidService {
18 public: 30 public:
19 HidServiceWin(); 31 HidServiceWin();
20 32
21 virtual void GetDevices(std::vector<HidDeviceInfo>* devices) OVERRIDE; 33 virtual void GetDevices(std::vector<HidDeviceInfo>* devices) OVERRIDE;
22 34
23 virtual scoped_refptr<HidConnection> Connect(const HidDeviceId& device_id) 35 virtual scoped_refptr<HidConnection> Connect(const HidDeviceId& device_id)
24 OVERRIDE; 36 OVERRIDE;
25 37
26 private: 38 private:
27 virtual ~HidServiceWin(); 39 virtual ~HidServiceWin();
28 40
29 void Enumerate(); 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);
30 void PlatformAddDevice(const std::string& device_path); 50 void PlatformAddDevice(const std::string& device_path);
31 void PlatformRemoveDevice(const std::string& device_path); 51 void PlatformRemoveDevice(const std::string& device_path);
32 52
33 DISALLOW_COPY_AND_ASSIGN(HidServiceWin); 53 DISALLOW_COPY_AND_ASSIGN(HidServiceWin);
34 }; 54 };
35 55
36 } // namespace device 56 } // namespace device
37 57
38 #endif // DEVICE_HID_HID_SERVICE_WIN_H_ 58 #endif // DEVICE_HID_HID_SERVICE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | device/hid/hid_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698