OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 USBEndpoint_h | 5 #ifndef USBEndpoint_h |
6 #define USBEndpoint_h | 6 #define USBEndpoint_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "device/usb/public/interfaces/device.mojom-blink.h" | 9 #include "device/usb/public/interfaces/device.mojom-blink.h" |
10 #include "platform/heap/Heap.h" | 10 #include "platform/heap/Heap.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 static USBEndpoint* Create(const USBAlternateInterface*, | 22 static USBEndpoint* Create(const USBAlternateInterface*, |
23 size_t endpoint_index); | 23 size_t endpoint_index); |
24 static USBEndpoint* Create(const USBAlternateInterface*, | 24 static USBEndpoint* Create(const USBAlternateInterface*, |
25 size_t endpoint_number, | 25 size_t endpoint_number, |
26 const String& direction, | 26 const String& direction, |
27 ExceptionState&); | 27 ExceptionState&); |
28 | 28 |
29 USBEndpoint(const USBAlternateInterface*, size_t endpoint_index); | 29 USBEndpoint(const USBAlternateInterface*, size_t endpoint_index); |
30 | 30 |
31 const device::usb::blink::EndpointInfo& Info() const; | 31 const device::mojom::blink::UsbEndpointInfo& Info() const; |
32 | 32 |
33 uint8_t endpointNumber() const { return Info().endpoint_number; } | 33 uint8_t endpointNumber() const { return Info().endpoint_number; } |
34 String direction() const; | 34 String direction() const; |
35 String type() const; | 35 String type() const; |
36 unsigned packetSize() const { return Info().packet_size; } | 36 unsigned packetSize() const { return Info().packet_size; } |
37 | 37 |
38 DECLARE_TRACE(); | 38 DECLARE_TRACE(); |
39 | 39 |
40 private: | 40 private: |
41 Member<const USBAlternateInterface> alternate_; | 41 Member<const USBAlternateInterface> alternate_; |
42 const size_t endpoint_index_; | 42 const size_t endpoint_index_; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace blink | 45 } // namespace blink |
46 | 46 |
47 #endif // USBEndpoint_h | 47 #endif // USBEndpoint_h |
OLD | NEW |