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

Side by Side Diff: components/usb_service/usb_device_impl.h

Issue 270323003: Extracted UsbConfigDescriptor, UsbInterfaceDescriptor and helper classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 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
« no previous file with comments | « components/usb_service.gypi ('k') | components/usb_service/usb_device_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_ 5 #ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_ 6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "components/usb_service/usb_device.h" 13 #include "components/usb_service/usb_device.h"
14 14
15 struct libusb_device; 15 struct libusb_device;
16 struct libusb_config_descriptor;
16 17
17 namespace usb_service { 18 namespace usb_service {
18 19
19 class UsbDeviceHandle; 20 class UsbDeviceHandle;
20 class UsbContext; 21 class UsbContext;
21 22
22 typedef libusb_device* PlatformUsbDevice; 23 typedef libusb_device* PlatformUsbDevice;
24 typedef libusb_config_descriptor* PlatformUsbConfigDescriptor;
23 25
24 class UsbDeviceImpl : public UsbDevice { 26 class UsbDeviceImpl : public UsbDevice {
25 public: 27 public:
26 // UsbDevice implementation: 28 // UsbDevice implementation:
27 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
28 virtual void RequestUsbAcess( 30 virtual void RequestUsbAcess(
29 int interface_id, 31 int interface_id,
30 const base::Callback<void(bool success)>& callback) OVERRIDE; 32 const base::Callback<void(bool success)>& callback) OVERRIDE;
31 #endif // OS_CHROMEOS 33 #endif // OS_CHROMEOS
32 virtual scoped_refptr<UsbDeviceHandle> Open() OVERRIDE; 34 virtual scoped_refptr<UsbDeviceHandle> Open() OVERRIDE;
(...skipping 25 matching lines...) Expand all
58 // Opened handles. 60 // Opened handles.
59 typedef std::vector<scoped_refptr<UsbDeviceHandle> > HandlesVector; 61 typedef std::vector<scoped_refptr<UsbDeviceHandle> > HandlesVector;
60 HandlesVector handles_; 62 HandlesVector handles_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); 64 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl);
63 }; 65 };
64 66
65 } // namespace usb_service 67 } // namespace usb_service
66 68
67 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_ 69 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « components/usb_service.gypi ('k') | components/usb_service/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698