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

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

Issue 1784733002: Track USB device configuration state in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink_open_state
Patch Set: Rebased. Created 4 years, 9 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/public/interfaces/device.mojom ('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> 10 #include <string>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // On ChromeOS the permission_broker service is used to change the ownership 68 // On ChromeOS the permission_broker service is used to change the ownership
69 // of USB device nodes so that Chrome can open them. On other platforms these 69 // of USB device nodes so that Chrome can open them. On other platforms these
70 // functions are no-ops and always return true. 70 // functions are no-ops and always return true.
71 virtual void CheckUsbAccess(const ResultCallback& callback); 71 virtual void CheckUsbAccess(const ResultCallback& callback);
72 72
73 // Creates a UsbDeviceHandle for further manipulation. 73 // Creates a UsbDeviceHandle for further manipulation.
74 virtual void Open(const OpenCallback& callback) = 0; 74 virtual void Open(const OpenCallback& callback) = 0;
75 75
76 // Gets the UsbConfigDescriptor for the active device configuration or nullptr 76 // Gets the UsbConfigDescriptor for the active device configuration or nullptr
77 // if the device is unconfigured. 77 // if the device is unconfigured.
78 virtual const UsbConfigDescriptor* GetActiveConfiguration() = 0; 78 virtual const UsbConfigDescriptor* GetActiveConfiguration() const = 0;
79 79
80 void AddObserver(Observer* observer); 80 void AddObserver(Observer* observer);
81 void RemoveObserver(Observer* observer); 81 void RemoveObserver(Observer* observer);
82 82
83 protected: 83 protected:
84 friend class UsbService; 84 friend class UsbService;
85 85
86 UsbDevice(uint16_t vendor_id, 86 UsbDevice(uint16_t vendor_id,
87 uint16_t product_id, 87 uint16_t product_id,
88 const base::string16& manufacturer_string, 88 const base::string16& manufacturer_string,
(...skipping 23 matching lines...) Expand all
112 const uint16_t product_id_; 112 const uint16_t product_id_;
113 113
114 base::ObserverList<Observer, true> observer_list_; 114 base::ObserverList<Observer, true> observer_list_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(UsbDevice); 116 DISALLOW_COPY_AND_ASSIGN(UsbDevice);
117 }; 117 };
118 118
119 } // namespace device 119 } // namespace device
120 120
121 #endif // DEVICE_USB_USB_DEVICE_H_ 121 #endif // DEVICE_USB_USB_DEVICE_H_
OLDNEW
« no previous file with comments | « device/usb/public/interfaces/device.mojom ('k') | device/usb/usb_device_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698