| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
| 15 #include "third_party/libusb/libusb/libusb.h" | 15 #include "third_party/libusb/libusb.h" |
| 16 | 16 |
| 17 typedef libusb_device* PlatformUsbDevice; | 17 typedef libusb_device* PlatformUsbDevice; |
| 18 typedef libusb_device_handle* PlatformUsbDeviceHandle; | 18 typedef libusb_device_handle* PlatformUsbDeviceHandle; |
| 19 typedef libusb_transfer* PlatformUsbTransferHandle; | 19 typedef libusb_transfer* PlatformUsbTransferHandle; |
| 20 | 20 |
| 21 class UsbService; | 21 class UsbService; |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 class IOBuffer; | 24 class IOBuffer; |
| 25 } // namespace net | 25 } // namespace net |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // transfers_ tracks all in-flight transfers associated with this device, | 106 // transfers_ tracks all in-flight transfers associated with this device, |
| 107 // allowing the device to retain the buffer and callback associated with a | 107 // allowing the device to retain the buffer and callback associated with a |
| 108 // transfer until such time that it completes. It is protected by lock_. | 108 // transfer until such time that it completes. It is protected by lock_. |
| 109 base::Lock lock_; | 109 base::Lock lock_; |
| 110 std::map<PlatformUsbTransferHandle, Transfer> transfers_; | 110 std::map<PlatformUsbTransferHandle, Transfer> transfers_; |
| 111 | 111 |
| 112 DISALLOW_EVIL_CONSTRUCTORS(UsbDevice); | 112 DISALLOW_EVIL_CONSTRUCTORS(UsbDevice); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 #endif // CHROME_BROWSER_USB_USB_DEVICE_H_ | 115 #endif // CHROME_BROWSER_USB_USB_DEVICE_H_ |
| OLD | NEW |