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

Side by Side Diff: device/usb/usb_device.h

Issue 826283002: Add support for sending a USB SET_CONFIGURATION request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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
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 DEVICE_USB_USB_DEVICE_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_H_
6 #define DEVICE_USB_USB_DEVICE_H_ 6 #define DEVICE_USB_USB_DEVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 27 matching lines...) Expand all
38 // Creates a UsbDeviceHandle for further manipulation. 38 // Creates a UsbDeviceHandle for further manipulation.
39 // Blocking method. Must be called on FILE thread. 39 // Blocking method. Must be called on FILE thread.
40 virtual scoped_refptr<UsbDeviceHandle> Open() = 0; 40 virtual scoped_refptr<UsbDeviceHandle> Open() = 0;
41 41
42 // Explicitly closes a device handle. This method will be automatically called 42 // Explicitly closes a device handle. This method will be automatically called
43 // by the destructor of a UsbDeviceHandle as well. 43 // by the destructor of a UsbDeviceHandle as well.
44 // Closing a closed handle is a safe 44 // Closing a closed handle is a safe
45 // Blocking method. Must be called on FILE thread. 45 // Blocking method. Must be called on FILE thread.
46 virtual bool Close(scoped_refptr<UsbDeviceHandle> handle) = 0; 46 virtual bool Close(scoped_refptr<UsbDeviceHandle> handle) = 0;
47 47
48 // Gets the UsbConfigDescriptor for the active device configuration. 48 // Gets the UsbConfigDescriptor for the active device configuration or nullptr
49 // if the device is unconfigured.
49 // Blocking method. Must be called on FILE thread. 50 // Blocking method. Must be called on FILE thread.
50 virtual const UsbConfigDescriptor& GetConfiguration() = 0; 51 virtual const UsbConfigDescriptor* GetConfiguration() = 0;
51 52
52 // Gets the manufacturer string of the device, or false and an empty 53 // Gets the manufacturer string of the device, or false and an empty
53 // string. This is a blocking method and must be called on FILE thread. 54 // string. This is a blocking method and must be called on FILE thread.
54 // TODO(reillyg): Make this available from the UI thread. crbug.com/427985 55 // TODO(reillyg): Make this available from the UI thread. crbug.com/427985
55 virtual bool GetManufacturer(base::string16* manufacturer) = 0; 56 virtual bool GetManufacturer(base::string16* manufacturer) = 0;
56 57
57 // Gets the product string of the device, or returns false and an empty 58 // Gets the product string of the device, or returns false and an empty
58 // string. This is a blocking method and must be called on FILE thread. 59 // string. This is a blocking method and must be called on FILE thread.
59 // TODO(reillyg): Make this available from the UI thread. crbug.com/427985 60 // TODO(reillyg): Make this available from the UI thread. crbug.com/427985
60 virtual bool GetProduct(base::string16* product) = 0; 61 virtual bool GetProduct(base::string16* product) = 0;
(...skipping 14 matching lines...) Expand all
75 const uint16 vendor_id_; 76 const uint16 vendor_id_;
76 const uint16 product_id_; 77 const uint16 product_id_;
77 const uint32 unique_id_; 78 const uint32 unique_id_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(UsbDevice); 80 DISALLOW_COPY_AND_ASSIGN(UsbDevice);
80 }; 81 };
81 82
82 } // namespace device 83 } // namespace device
83 84
84 #endif // DEVICE_USB_USB_DEVICE_H_ 85 #endif // DEVICE_USB_USB_DEVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/device_permissions_manager_unittest.cc ('k') | device/usb/usb_device_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698