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

Side by Side Diff: device/usb/public/interfaces/device_manager_struct_traits.cc

Issue 2615353002: Typemap device.usb.DeviceFilter to device::UsbDeviceFilter. (Closed)
Patch Set: Addressed juncai@'s feedback. Created 3 years, 11 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
(Empty)
1 // Copyright 2017 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.
4
5 #include "device/usb/public/interfaces/device_manager_struct_traits.h"
6
7 namespace mojo {
8
9 // static
10 bool StructTraits<device::usb::DeviceFilterDataView, device::UsbDeviceFilter>::
11 Read(device::usb::DeviceFilterDataView input,
12 device::UsbDeviceFilter* output) {
13 if (input.has_vendor_id())
14 output->vendor_id = input.vendor_id();
15 if (input.has_product_id())
16 output->product_id = input.product_id();
17 if (input.has_class_code())
18 output->interface_class = input.class_code();
19 if (input.has_subclass_code())
20 output->interface_subclass = input.subclass_code();
21 if (input.has_protocol_code())
22 output->interface_protocol = input.protocol_code();
23 return true;
24 }
25
26 } // namespace mojo
OLDNEW
« no previous file with comments | « device/usb/public/interfaces/device_manager_struct_traits.h ('k') | device/usb/public/interfaces/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698