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

Side by Side Diff: device/devices_app/usb/type_converters.h

Issue 1618393004: Update device/usb and its Mojo interface for variable size ISO packets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document use of ErrorWithArguments. Created 4 years, 10 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
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 translate between internal device/usb data types and
20 // public Mojo interface data types. 20 // public Mojo interface data types. This must be included by any source file
21 // that uses these conversions explicitly or implicitly.
21 22
22 namespace device { 23 namespace device {
23 class UsbDevice; 24 class UsbDevice;
24 } 25 }
25 26
26 namespace mojo { 27 namespace mojo {
27 28
28 template <> 29 template <>
29 struct TypeConverter<device::UsbDeviceFilter, device::usb::DeviceFilterPtr> { 30 struct TypeConverter<device::UsbDeviceFilter, device::usb::DeviceFilterPtr> {
30 static device::UsbDeviceFilter Convert( 31 static device::UsbDeviceFilter Convert(
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 device::WebUsbAllowedOrigins> { 115 device::WebUsbAllowedOrigins> {
115 static device::usb::WebUsbDescriptorSetPtr Convert( 116 static device::usb::WebUsbDescriptorSetPtr Convert(
116 const device::WebUsbAllowedOrigins& allowed_origins); 117 const device::WebUsbAllowedOrigins& allowed_origins);
117 }; 118 };
118 119
119 template <> 120 template <>
120 struct TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice> { 121 struct TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice> {
121 static device::usb::DeviceInfoPtr Convert(const device::UsbDevice& device); 122 static device::usb::DeviceInfoPtr Convert(const device::UsbDevice& device);
122 }; 123 };
123 124
125 template <>
126 struct TypeConverter<device::usb::IsochronousPacketPtr,
127 device::UsbDeviceHandle::IsochronousPacket> {
128 static device::usb::IsochronousPacketPtr Convert(
129 const device::UsbDeviceHandle::IsochronousPacket& packet);
130 };
131
124 } // namespace mojo 132 } // namespace mojo
125 133
126 #endif // DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_ 134 #endif // DEVICE_DEVICES_APP_USB_TYPE_CONVERTERS_H_
OLDNEW
« no previous file with comments | « device/devices_app/usb/public/interfaces/device.mojom ('k') | device/devices_app/usb/type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698