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

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

Issue 225513005: chrome.hid : enrich device info with Top-Level collections usages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HidUsageAndPage construction Created 6 years, 8 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
OLDNEW
(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 DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
6 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
7
8 #include <vector>
9
10 #include "base/memory/linked_ptr.h"
11 #include "device/hid/hid_report_descriptor_item.h"
12 #include "device/hid/hid_usage_and_page.h"
13
14 namespace device {
15
16 // HID report descriptor.
17 // See section 6.2.2 of HID specifications (v1.11).
18 class HidReportDescriptor {
19
20 public:
21 HidReportDescriptor(const uint8_t* bytes, size_t size);
22 ~HidReportDescriptor();
23
24 const std::vector<linked_ptr<HidReportDescriptorItem> >& items() const {
25 return items_;
26 }
27
28 // Returns HID usages of top-level collections present in the descriptor.
29 void GetTopLevelCollections(
30 std::vector<HidUsageAndPage>* topLevelCollections);
31
32 private:
33 std::vector<linked_ptr<HidReportDescriptorItem> > items_;
34 };
35
36 } // namespace device
37
38 #endif // DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698