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 DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ | 5 #ifndef DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ |
6 #define DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ | 6 #define DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "device/devices_app/usb/public/interfaces/device.mojom.h" | 10 #include "device/devices_app/usb/public/interfaces/device.mojom.h" |
11 #include "device/devices_app/usb/public/interfaces/device_manager.mojom.h" | 11 #include "device/devices_app/usb/public/interfaces/device_manager.mojom.h" |
12 #include "device/usb/usb_descriptors.h" | 12 #include "device/usb/usb_descriptors.h" |
13 #include "device/usb/usb_device_filter.h" | 13 #include "device/usb/usb_device_filter.h" |
14 #include "device/usb/usb_device_handle.h" | 14 #include "device/usb/usb_device_handle.h" |
15 #include "device/usb/webusb_descriptors.h" | 15 #include "device/usb/webusb_descriptors.h" |
16 #include "mojo/public/cpp/bindings/array.h" | 16 #include "mojo/public/cpp/bindings/array.h" |
17 #include "mojo/public/cpp/bindings/type_converter.h" | 17 #include "mojo/public/cpp/bindings/type_converter.h" |
18 | 18 |
19 // Type converters to convert objects between internal device/usb data types and | 19 // Type converters to convert objects between internal device/usb data types and |
scheib
2016/01/28 03:55:54
Help the Mojo pattern by mentioning here that Type
Reilly Grant (use Gerrit)
2016/01/29 23:25:36
Done.
| |
20 // public Mojo interface data types. | 20 // public Mojo interface data types. |
21 | 21 |
22 namespace device { | 22 namespace device { |
23 class UsbDevice; | 23 class UsbDevice; |
24 } | 24 } |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 | 27 |
28 template <> | 28 template <> |
29 struct TypeConverter<device::UsbDeviceFilter, device::usb::DeviceFilterPtr> { | 29 struct TypeConverter<device::UsbDeviceFilter, device::usb::DeviceFilterPtr> { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 device::WebUsbDescriptorSet> { | 114 device::WebUsbDescriptorSet> { |
115 static device::usb::WebUsbDescriptorSetPtr Convert( | 115 static device::usb::WebUsbDescriptorSetPtr Convert( |
116 const device::WebUsbDescriptorSet& set); | 116 const device::WebUsbDescriptorSet& set); |
117 }; | 117 }; |
118 | 118 |
119 template <> | 119 template <> |
120 struct TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice> { | 120 struct TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice> { |
121 static device::usb::DeviceInfoPtr Convert(const device::UsbDevice& device); | 121 static device::usb::DeviceInfoPtr Convert(const device::UsbDevice& device); |
122 }; | 122 }; |
123 | 123 |
124 template <> | |
125 struct TypeConverter<device::usb::IsochronousPacketPtr, | |
126 device::UsbDeviceHandle::IsochronousPacket> { | |
127 static device::usb::IsochronousPacketPtr Convert( | |
128 const device::UsbDeviceHandle::IsochronousPacket& packet); | |
129 }; | |
130 | |
124 } // namespace mojo | 131 } // namespace mojo |
125 | 132 |
126 #endif // DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ | 133 #endif // DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ |
OLD | NEW |