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

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

Issue 463493006: Add chrome.usbPrivate API for use by USB device WEBUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change "Google Inc." to "Test Manufacturer". Created 6 years, 4 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 COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ 5 #ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_
6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ 6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // The platform device handle will be closed when UsbDeviceHandle destructs. 51 // The platform device handle will be closed when UsbDeviceHandle destructs.
52 virtual void Close() = 0; 52 virtual void Close() = 0;
53 53
54 // Device manipulation operations. These methods are blocking and must be 54 // Device manipulation operations. These methods are blocking and must be
55 // called on FILE thread. 55 // called on FILE thread.
56 virtual bool ClaimInterface(const int interface_number) = 0; 56 virtual bool ClaimInterface(const int interface_number) = 0;
57 virtual bool ReleaseInterface(const int interface_number) = 0; 57 virtual bool ReleaseInterface(const int interface_number) = 0;
58 virtual bool SetInterfaceAlternateSetting(const int interface_number, 58 virtual bool SetInterfaceAlternateSetting(const int interface_number,
59 const int alternate_setting) = 0; 59 const int alternate_setting) = 0;
60 virtual bool ResetDevice() = 0; 60 virtual bool ResetDevice() = 0;
61 virtual bool GetManufacturer(base::string16* manufacturer) = 0;
62 virtual bool GetProduct(base::string16* product) = 0;
61 virtual bool GetSerial(base::string16* serial) = 0; 63 virtual bool GetSerial(base::string16* serial) = 0;
62 64
63 // Async IO. Can be called on any thread. 65 // Async IO. Can be called on any thread.
64 virtual void ControlTransfer(const UsbEndpointDirection direction, 66 virtual void ControlTransfer(const UsbEndpointDirection direction,
65 const TransferRequestType request_type, 67 const TransferRequestType request_type,
66 const TransferRecipient recipient, 68 const TransferRecipient recipient,
67 const uint8 request, 69 const uint8 request,
68 const uint16 value, 70 const uint16 value,
69 const uint16 index, 71 const uint16 index,
70 net::IOBuffer* buffer, 72 net::IOBuffer* buffer,
(...skipping 30 matching lines...) Expand all
101 UsbDeviceHandle() {}; 103 UsbDeviceHandle() {};
102 104
103 virtual ~UsbDeviceHandle() {}; 105 virtual ~UsbDeviceHandle() {};
104 106
105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); 107 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
106 }; 108 };
107 109
108 } // namespace usb_service 110 } // namespace usb_service
109 111
110 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_ 112 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_HANDLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_browsertest.cc ('k') | components/usb_service/usb_device_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698