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

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

Issue 1693433003: webusb: Reject the promise if the device is already open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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
11 // The operating system denied access to the device. 11 // The operating system denied access to the device.
12 ACCESS_DENIED, 12 ACCESS_DENIED,
13
14 // The device is already open.
15 ALREADY_OPEN,
13 }; 16 };
14 17
15 enum TransferDirection { 18 enum TransferDirection {
16 INBOUND, 19 INBOUND,
17 OUTBOUND, 20 OUTBOUND,
18 }; 21 };
19 22
20 enum ControlTransferType { 23 enum ControlTransferType {
21 STANDARD, 24 STANDARD,
22 CLASS, 25 CLASS,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // indicates no timeout: the request will remain pending indefinitely until 279 // indicates no timeout: the request will remain pending indefinitely until
277 // completed or otherwise terminated. 280 // completed or otherwise terminated.
278 281
279 // |packets| contains the status of each packet sent to the device, in order. 282 // |packets| contains the status of each packet sent to the device, in order.
280 IsochronousTransferOut(uint8 endpoint_number, 283 IsochronousTransferOut(uint8 endpoint_number,
281 array<uint8> data, 284 array<uint8> data,
282 array<uint32> packet_lengths, 285 array<uint32> packet_lengths,
283 uint32 timeout) 286 uint32 timeout)
284 => (array<IsochronousPacket> packets); 287 => (array<IsochronousPacket> packets);
285 }; 288 };
OLDNEW
« no previous file with comments | « device/usb/mojo/device_impl_unittest.cc ('k') | third_party/WebKit/Source/modules/webusb/USBError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698