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

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

Issue 364213005: Revert 281282 "Revert 281133 "chrome.hid: enrich model with repo..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/device/hid/hid_device_info.cc ('k') | trunk/src/device/hid/hid_report_descriptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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_REPORT_DESCRIPTOR_H_ 5 #ifndef DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
6 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_H_ 6 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
11 #include "device/hid/hid_collection_info.h"
11 #include "device/hid/hid_report_descriptor_item.h" 12 #include "device/hid/hid_report_descriptor_item.h"
12 #include "device/hid/hid_usage_and_page.h"
13 13
14 namespace device { 14 namespace device {
15 15
16 // HID report descriptor. 16 // HID report descriptor.
17 // See section 6.2.2 of HID specifications (v1.11). 17 // See section 6.2.2 of HID specifications (v1.11).
18 class HidReportDescriptor { 18 class HidReportDescriptor {
19 19
20 public: 20 public:
21 HidReportDescriptor(const uint8_t* bytes, size_t size); 21 HidReportDescriptor(const uint8_t* bytes, size_t size);
22 ~HidReportDescriptor(); 22 ~HidReportDescriptor();
23 23
24 const std::vector<linked_ptr<HidReportDescriptorItem> >& items() const { 24 const std::vector<linked_ptr<HidReportDescriptorItem> >& items() const {
25 return items_; 25 return items_;
26 } 26 }
27 27
28 // Returns HID usages of top-level collections present in the descriptor. 28 // Returns top-level collections present in the descriptor,
29 void GetTopLevelCollections( 29 // together with max report sizes
30 std::vector<HidUsageAndPage>* topLevelCollections); 30 void GetDetails(std::vector<HidCollectionInfo>* top_level_collections,
31 int* max_input_report_size,
32 int* max_output_report_size,
33 int* max_feature_report_size);
31 34
32 private: 35 private:
33 std::vector<linked_ptr<HidReportDescriptorItem> > items_; 36 std::vector<linked_ptr<HidReportDescriptorItem> > items_;
34 }; 37 };
35 38
36 } // namespace device 39 } // namespace device
37 40
38 #endif // DEVICE_HID_HID_REPORT_DESCRIPTOR_H_ 41 #endif // DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « trunk/src/device/hid/hid_device_info.cc ('k') | trunk/src/device/hid/hid_report_descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698