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

Side by Side Diff: device/devices_app/usb/public/interfaces/device.mojom

Issue 1358763004: Implement getConfiguration in WebUSBDeviceImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/devices_app/usb/device_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 module device.usb; 5 module device.usb;
6 6
7 enum OpenDeviceError { 7 enum OpenDeviceError {
8 // Opening the device succeeded. 8 // Opening the device succeeded.
9 OK, 9 OK,
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // The transfer succeeded, but the device sent less data than was requested. 134 // The transfer succeeded, but the device sent less data than was requested.
135 // This applies only to inbound transfers. 135 // This applies only to inbound transfers.
136 SHORT_PACKET, 136 SHORT_PACKET,
137 }; 137 };
138 138
139 interface Device { 139 interface Device {
140 // Retrieve a DeviceInfo struct containing metadata about the device, 140 // Retrieve a DeviceInfo struct containing metadata about the device,
141 // including the set of all available device configurations. 141 // including the set of all available device configurations.
142 GetDeviceInfo() => (DeviceInfo? info); 142 GetDeviceInfo() => (DeviceInfo? info);
143 143
144 // Retrieves the device's currently active configuration. May return null if 144 // Retrieves the |configuration_value| of the device's currently active
145 // the device is unconfigured. 145 // configuration. Will return 0 if the device is unconfigured.
146 GetConfiguration() => (ConfigurationInfo? info); 146 GetConfiguration() => (uint8 value);
147 147
148 // Opens the device. Methods below require the device be opened first. 148 // Opens the device. Methods below require the device be opened first.
149 Open() => (OpenDeviceError error); 149 Open() => (OpenDeviceError error);
150 150
151 // Closes the device. 151 // Closes the device.
152 Close() => (); 152 Close() => ();
153 153
154 // Initiates a device control transfer to set the device's configuration to 154 // Initiates a device control transfer to set the device's configuration to
155 // one with the configuration value |value|. 155 // one with the configuration value |value|.
156 SetConfiguration(uint8 value) => (bool success); 156 SetConfiguration(uint8 value) => (bool success);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // this transfer. 262 // this transfer.
263 // 263 //
264 // |timeout| specifies the request timeout in milliseconds. A timeout of 0 264 // |timeout| specifies the request timeout in milliseconds. A timeout of 0
265 // indicates no timeout: the request will remain pending indefinitely until 265 // indicates no timeout: the request will remain pending indefinitely until
266 // completed or otherwise terminated. 266 // completed or otherwise terminated.
267 IsochronousTransferOut(uint8 endpoint_number, 267 IsochronousTransferOut(uint8 endpoint_number,
268 array<array<uint8>> packets, 268 array<array<uint8>> packets,
269 uint32 timeout) 269 uint32 timeout)
270 => (TransferStatus status); 270 => (TransferStatus status);
271 }; 271 };
OLDNEW
« no previous file with comments | « device/devices_app/usb/device_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698