| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_USB_USB_DEVICE_H_ | 5 #ifndef CHROME_BROWSER_USB_USB_DEVICE_H_ |
| 6 #define CHROME_BROWSER_USB_USB_DEVICE_H_ | 6 #define CHROME_BROWSER_USB_USB_DEVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 12 #include "net/base/completion_callback.h" | 12 #include "net/base/completion_callback.h" |
| 13 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
| 14 #include "third_party/libusb/libusb.h" | 14 |
| 15 struct libusb_device; |
| 16 struct libusb_device_handle; |
| 17 struct libusb_transfer; |
| 15 | 18 |
| 16 typedef libusb_device* PlatformUsbDevice; | 19 typedef libusb_device* PlatformUsbDevice; |
| 17 typedef libusb_device_handle* PlatformUsbDeviceHandle; | 20 typedef libusb_device_handle* PlatformUsbDeviceHandle; |
| 18 typedef libusb_transfer* PlatformUsbTransferHandle; | 21 typedef libusb_transfer* PlatformUsbTransferHandle; |
| 19 | 22 |
| 20 class UsbService; | 23 class UsbService; |
| 21 | 24 |
| 22 namespace net { | 25 namespace net { |
| 23 class IOBuffer; | 26 class IOBuffer; |
| 24 } // namespace net | 27 } // namespace net |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // transfers_ tracks all in-flight transfers associated with this device, | 128 // transfers_ tracks all in-flight transfers associated with this device, |
| 126 // allowing the device to retain the buffer and callback associated with a | 129 // allowing the device to retain the buffer and callback associated with a |
| 127 // transfer until such time that it completes. It is protected by lock_. | 130 // transfer until such time that it completes. It is protected by lock_. |
| 128 base::Lock lock_; | 131 base::Lock lock_; |
| 129 std::map<PlatformUsbTransferHandle, Transfer> transfers_; | 132 std::map<PlatformUsbTransferHandle, Transfer> transfers_; |
| 130 | 133 |
| 131 DISALLOW_EVIL_CONSTRUCTORS(UsbDevice); | 134 DISALLOW_EVIL_CONSTRUCTORS(UsbDevice); |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 #endif // CHROME_BROWSER_USB_USB_DEVICE_H_ | 137 #endif // CHROME_BROWSER_USB_USB_DEVICE_H_ |
| OLD | NEW |