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 #include "content/renderer/usb/type_converters.h" | 5 #include "content/renderer/usb/type_converters.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 | 10 |
9 namespace mojo { | 11 namespace mojo { |
10 | 12 |
11 // static | 13 // static |
12 blink::WebUSBDevice::TransferDirection | 14 blink::WebUSBDevice::TransferDirection |
13 TypeConverter<blink::WebUSBDevice::TransferDirection, | 15 TypeConverter<blink::WebUSBDevice::TransferDirection, |
14 device::usb::TransferDirection>:: | 16 device::usb::TransferDirection>:: |
15 Convert(const device::usb::TransferDirection& direction) { | 17 Convert(const device::usb::TransferDirection& direction) { |
16 switch (direction) { | 18 switch (direction) { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 options->filters = mojo::Array<device::usb::DeviceFilterPtr>::New( | 252 options->filters = mojo::Array<device::usb::DeviceFilterPtr>::New( |
251 web_options.filters.size()); | 253 web_options.filters.size()); |
252 for (size_t i = 0; i < web_options.filters.size(); ++i) { | 254 for (size_t i = 0; i < web_options.filters.size(); ++i) { |
253 options->filters[i] = | 255 options->filters[i] = |
254 device::usb::DeviceFilter::From(web_options.filters[i]); | 256 device::usb::DeviceFilter::From(web_options.filters[i]); |
255 } | 257 } |
256 return options.Pass(); | 258 return options.Pass(); |
257 } | 259 } |
258 | 260 |
259 } // namespace mojo | 261 } // namespace mojo |
OLD | NEW |