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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_USB_USB_SERVICE_H_ |
6 #define CHROME_BROWSER_USB_USB_SERVICE_H_ | 6 #define CHROME_BROWSER_USB_USB_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/move.h" | |
14 #include "base/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
15 #include "chrome/browser/profiles/profile_keyed_service.h" | 14 #include "chrome/browser/profiles/profile_keyed_service.h" |
16 #include "chrome/browser/usb/usb_device.h" | 15 #include "chrome/browser/usb/usb_device.h" |
17 #include "third_party/libusb/libusb.h" | 16 #include "third_party/libusb/libusb.h" |
18 | 17 |
19 class UsbEventHandler; | 18 class UsbEventHandler; |
20 typedef libusb_context* PlatformUsbContext; | 19 typedef libusb_context* PlatformUsbContext; |
21 | 20 |
22 // The USB service handles creating and managing an event handler thread that is | 21 // The USB service handles creating and managing an event handler thread that is |
23 // used to manage and dispatch USB events. It is also responsbile for device | 22 // used to manage and dispatch USB events. It is also responsbile for device |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // The devices_ map contains scoped_refptrs to all open devices, indicated by | 85 // The devices_ map contains scoped_refptrs to all open devices, indicated by |
87 // their vendor and product id. This allows for reusing an open device without | 86 // their vendor and product id. This allows for reusing an open device without |
88 // creating another platform handle for it. | 87 // creating another platform handle for it. |
89 typedef std::map<PlatformUsbDevice, scoped_refptr<UsbDevice> > DeviceMap; | 88 typedef std::map<PlatformUsbDevice, scoped_refptr<UsbDevice> > DeviceMap; |
90 DeviceMap devices_; | 89 DeviceMap devices_; |
91 | 90 |
92 DISALLOW_COPY_AND_ASSIGN(UsbService); | 91 DISALLOW_COPY_AND_ASSIGN(UsbService); |
93 }; | 92 }; |
94 | 93 |
95 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_ | 94 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_ |
OLD | NEW |