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 "device/devices_app/usb/device_impl.h" | 5 #include "device/usb/mojo/device_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <numeric> | 10 #include <numeric> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "device/devices_app/usb/type_converters.h" | 17 #include "device/usb/mojo/type_converters.h" |
18 #include "device/usb/usb_descriptors.h" | 18 #include "device/usb/usb_descriptors.h" |
19 #include "device/usb/usb_device.h" | 19 #include "device/usb/usb_device.h" |
20 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
21 | 21 |
22 namespace device { | 22 namespace device { |
23 namespace usb { | 23 namespace usb { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 using MojoTransferInCallback = | 27 using MojoTransferInCallback = |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 const std::vector<uint8_t>& storage = data.storage(); | 455 const std::vector<uint8_t>& storage = data.storage(); |
456 std::copy(storage.begin(), storage.end(), buffer->data()); | 456 std::copy(storage.begin(), storage.end(), buffer->data()); |
457 } | 457 } |
458 device_handle_->IsochronousTransferOut( | 458 device_handle_->IsochronousTransferOut( |
459 endpoint_address, buffer, packet_lengths.storage(), timeout, | 459 endpoint_address, buffer, packet_lengths.storage(), timeout, |
460 base::Bind(&OnIsochronousTransferOut, base::Passed(&callback_ptr))); | 460 base::Bind(&OnIsochronousTransferOut, base::Passed(&callback_ptr))); |
461 } | 461 } |
462 | 462 |
463 } // namespace usb | 463 } // namespace usb |
464 } // namespace device | 464 } // namespace device |
OLD | NEW |