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

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

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
« no previous file with comments | « device/devices_app/usb/type_converters.h ('k') | device/usb/mock_usb_device_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "device/devices_app/usb/type_converters.h" 5 #include "device/devices_app/usb/type_converters.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 info->serial_number = base::UTF16ToUTF8(device.serial_number()); 260 info->serial_number = base::UTF16ToUTF8(device.serial_number());
261 info->configurations = mojo::Array<device::usb::ConfigurationInfoPtr>::From( 261 info->configurations = mojo::Array<device::usb::ConfigurationInfoPtr>::From(
262 device.configurations()); 262 device.configurations());
263 if (device.webusb_allowed_origins()) { 263 if (device.webusb_allowed_origins()) {
264 info->webusb_allowed_origins = device::usb::WebUsbDescriptorSet::From( 264 info->webusb_allowed_origins = device::usb::WebUsbDescriptorSet::From(
265 *device.webusb_allowed_origins()); 265 *device.webusb_allowed_origins());
266 } 266 }
267 return info; 267 return info;
268 } 268 }
269 269
270 // static
271 device::usb::IsochronousPacketPtr
272 TypeConverter<device::usb::IsochronousPacketPtr,
273 device::UsbDeviceHandle::IsochronousPacket>::
274 Convert(const device::UsbDeviceHandle::IsochronousPacket& packet) {
275 device::usb::IsochronousPacketPtr info =
276 device::usb::IsochronousPacket::New();
277 info->length = packet.length;
278 info->transferred_length = packet.transferred_length;
279 info->status = mojo::ConvertTo<device::usb::TransferStatus>(packet.status);
280 return info;
281 }
282
270 } // namespace mojo 283 } // namespace mojo
OLDNEW
« no previous file with comments | « device/devices_app/usb/type_converters.h ('k') | device/usb/mock_usb_device_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698