| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/usb/usb_device_impl.h" | 5 #include "device/usb/usb_device_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 platform_alt_setting->extra, | 128 platform_alt_setting->extra, |
| 129 platform_alt_setting->extra + platform_alt_setting->extra_length); | 129 platform_alt_setting->extra + platform_alt_setting->extra_length); |
| 130 | 130 |
| 131 configuration->interfaces.push_back(interface); | 131 configuration->interfaces.push_back(interface); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 configuration->extra_data.assign( | 135 configuration->extra_data.assign( |
| 136 platform_config->extra, | 136 platform_config->extra, |
| 137 platform_config->extra + platform_config->extra_length); | 137 platform_config->extra + platform_config->extra_length); |
| 138 | |
| 139 configuration->AssignFirstInterfaceNumbers(); | |
| 140 } | 138 } |
| 141 | 139 |
| 142 } // namespace | 140 } // namespace |
| 143 | 141 |
| 144 UsbDeviceImpl::UsbDeviceImpl( | 142 UsbDeviceImpl::UsbDeviceImpl( |
| 145 scoped_refptr<UsbContext> context, | 143 scoped_refptr<UsbContext> context, |
| 146 PlatformUsbDevice platform_device, | 144 PlatformUsbDevice platform_device, |
| 147 uint16_t vendor_id, | 145 uint16_t vendor_id, |
| 148 uint16_t product_id, | 146 uint16_t product_id, |
| 149 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) | 147 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle, | 329 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle, |
| 332 const OpenCallback& callback) { | 330 const OpenCallback& callback) { |
| 333 DCHECK(thread_checker_.CalledOnValidThread()); | 331 DCHECK(thread_checker_.CalledOnValidThread()); |
| 334 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl( | 332 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl( |
| 335 context_, this, platform_handle, blocking_task_runner_); | 333 context_, this, platform_handle, blocking_task_runner_); |
| 336 handles_.push_back(device_handle); | 334 handles_.push_back(device_handle); |
| 337 callback.Run(device_handle); | 335 callback.Run(device_handle); |
| 338 } | 336 } |
| 339 | 337 |
| 340 } // namespace device | 338 } // namespace device |
| OLD | NEW |