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

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

Issue 1561283003: Revert of Implement basic USB device enumeration on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « device/usb/usb_descriptors.h ('k') | device/usb/usb_device_android.h » ('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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string>
11 #include <vector> 10 #include <vector>
12 11
13 #include "base/callback.h" 12 #include "base/callback.h"
14 #include "base/macros.h" 13 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
16 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
17 #include "device/usb/usb_descriptors.h" 16 #include "device/usb/usb_descriptors.h"
18 #include "url/gurl.h" 17 #include "url/gurl.h"
19 18
20 namespace device { 19 namespace device {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 52 }
54 53
55 // On ChromeOS the permission_broker service is used to change the ownership 54 // On ChromeOS the permission_broker service is used to change the ownership
56 // of USB device nodes so that Chrome can open them. On other platforms these 55 // of USB device nodes so that Chrome can open them. On other platforms these
57 // functions are no-ops and always return true. 56 // functions are no-ops and always return true.
58 virtual void CheckUsbAccess(const ResultCallback& callback); 57 virtual void CheckUsbAccess(const ResultCallback& callback);
59 58
60 // Creates a UsbDeviceHandle for further manipulation. 59 // Creates a UsbDeviceHandle for further manipulation.
61 virtual void Open(const OpenCallback& callback) = 0; 60 virtual void Open(const OpenCallback& callback) = 0;
62 61
62 // Explicitly closes a device handle. This method will be automatically called
63 // by the destructor of a UsbDeviceHandle as well.
64 virtual bool Close(scoped_refptr<UsbDeviceHandle> handle) = 0;
65
63 // Gets the UsbConfigDescriptor for the active device configuration or nullptr 66 // Gets the UsbConfigDescriptor for the active device configuration or nullptr
64 // if the device is unconfigured. 67 // if the device is unconfigured.
65 virtual const UsbConfigDescriptor* GetActiveConfiguration() = 0; 68 virtual const UsbConfigDescriptor* GetActiveConfiguration() = 0;
66 69
67 protected: 70 protected:
68 UsbDevice(uint16_t vendor_id, 71 UsbDevice(uint16_t vendor_id,
69 uint16_t product_id, 72 uint16_t product_id,
70 const base::string16& manufacturer_string, 73 const base::string16& manufacturer_string,
71 const base::string16& product_string, 74 const base::string16& product_string,
72 const base::string16& serial_number); 75 const base::string16& serial_number);
(...skipping 17 matching lines...) Expand all
90 const std::string guid_; 93 const std::string guid_;
91 const uint16_t vendor_id_; 94 const uint16_t vendor_id_;
92 const uint16_t product_id_; 95 const uint16_t product_id_;
93 96
94 DISALLOW_COPY_AND_ASSIGN(UsbDevice); 97 DISALLOW_COPY_AND_ASSIGN(UsbDevice);
95 }; 98 };
96 99
97 } // namespace device 100 } // namespace device
98 101
99 #endif // DEVICE_USB_USB_DEVICE_H_ 102 #endif // DEVICE_USB_USB_DEVICE_H_
OLDNEW
« no previous file with comments | « device/usb/usb_descriptors.h ('k') | device/usb/usb_device_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698