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

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

Issue 10332075: Adding use_system_libusb option for third_party/libusb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing license check. Created 8 years, 7 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
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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/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/libusb.h" 16 #include "third_party/libusb/libusb.h"
17 17
18 typedef libusb_context* PlatformUsbContext; 18 typedef libusb_context* PlatformUsbContext;
19 19
20 // The USB service handles creating and managing an event handler thread that is 20 // The USB service handles creating and managing an event handler thread that is
21 // used to manage and dispatch USB events. It is also responsbile for device 21 // used to manage and dispatch USB events. It is also responsbile for device
22 // discovery on the system, which allows it to re-use device handles to prevent 22 // discovery on the system, which allows it to re-use device handles to prevent
23 // competition for the same USB device. 23 // competition for the same USB device.
24 class UsbService : public ProfileKeyedService { 24 class UsbService : public ProfileKeyedService {
25 public: 25 public:
26 UsbService(); 26 UsbService();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // their vendor and product id. This allows for reusing an open device without 59 // their vendor and product id. This allows for reusing an open device without
60 // creating another platform handle for it. 60 // creating another platform handle for it.
61 typedef std::map<std::pair<uint16, uint16>, scoped_refptr<UsbDevice> > 61 typedef std::map<std::pair<uint16, uint16>, scoped_refptr<UsbDevice> >
62 DeviceMap; 62 DeviceMap;
63 DeviceMap devices_; 63 DeviceMap devices_;
64 64
65 DISALLOW_EVIL_CONSTRUCTORS(UsbService); 65 DISALLOW_EVIL_CONSTRUCTORS(UsbService);
66 }; 66 };
67 67
68 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_ 68 #endif // CHROME_BROWSER_USB_USB_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698