Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: chrome/browser/usb/usb_service.h

Issue 11747019: Use generated shim headers for libusb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include path Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/usb/usb_device.cc ('k') | chrome/browser/usb/usb_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
14 #include "chrome/browser/profiles/profile_keyed_service.h" 14 #include "chrome/browser/profiles/profile_keyed_service.h"
15 #include "chrome/browser/usb/usb_device.h" 15 #include "chrome/browser/usb/usb_device.h"
16 #include "third_party/libusb/libusb.h" 16 #include "third_party/libusb/src/libusb/libusb.h"
17 17
18 class UsbEventHandler; 18 class UsbEventHandler;
19 typedef libusb_context* PlatformUsbContext; 19 typedef libusb_context* PlatformUsbContext;
20 20
21 // 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
22 // 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
23 // discovery on the system, which allows it to re-use device handles to prevent 23 // discovery on the system, which allows it to re-use device handles to prevent
24 // competition for the same USB device. 24 // competition for the same USB device.
25 class UsbService : public ProfileKeyedService { 25 class UsbService : public ProfileKeyedService {
26 public: 26 public:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // The devices_ map contains scoped_refptrs to all open devices, indicated by 89 // The devices_ map contains scoped_refptrs to all open devices, indicated by
90 // their vendor and product id. This allows for reusing an open device without 90 // their vendor and product id. This allows for reusing an open device without
91 // creating another platform handle for it. 91 // creating another platform handle for it.
92 typedef std::map<PlatformUsbDevice, scoped_refptr<UsbDevice> > DeviceMap; 92 typedef std::map<PlatformUsbDevice, scoped_refptr<UsbDevice> > DeviceMap;
93 DeviceMap devices_; 93 DeviceMap devices_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(UsbService); 95 DISALLOW_COPY_AND_ASSIGN(UsbService);
96 }; 96 };
97 97
98 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_ 98 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/usb/usb_device.cc ('k') | chrome/browser/usb/usb_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698