Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / device / usb / webusb_descriptors.h
blob7f6dc59a23a5c377e0461a808f3435b31645a3ee
1 // Copyright 2015 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_USB_WEBUSB_DESCRIPTORS_H_
6 #define DEVICE_USB_WEBUSB_DESCRIPTORS_H_
8 #include <stdint.h>
9 #include <vector>
11 #include "url/gurl.h"
13 namespace device {
15 struct WebUsbFunctionSubset {
16 WebUsbFunctionSubset();
17 ~WebUsbFunctionSubset();
19 uint8_t first_interface;
20 std::vector<GURL> origins;
23 struct WebUsbConfigurationSubset {
24 WebUsbConfigurationSubset();
25 ~WebUsbConfigurationSubset();
27 uint8_t configuration_value;
28 std::vector<GURL> origins;
29 std::vector<WebUsbFunctionSubset> functions;
32 struct WebUsbDescriptorSet {
33 WebUsbDescriptorSet();
34 ~WebUsbDescriptorSet();
36 bool Parse(const std::vector<uint8_t>& bytes);
38 std::vector<GURL> origins;
39 std::vector<WebUsbConfigurationSubset> configurations;
42 struct WebUsbPlatformCapabilityDescriptor {
43 WebUsbPlatformCapabilityDescriptor();
44 ~WebUsbPlatformCapabilityDescriptor();
46 bool ParseFromBosDescriptor(const std::vector<uint8_t>& bytes);
48 uint16_t version;
49 uint8_t vendor_code;
52 bool ParseWebUsbUrlDescriptor(const std::vector<uint8_t>& bytes, GURL* output);
54 } // device
56 #endif // DEVICE_USB_WEBUSB_DESCRIPTORS_H_