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

Side by Side Diff: extensions/common/api/usb.idl

Issue 1857033002: Include USB device version in chrome.usb.Device fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 8 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 // Use the <code>chrome.usb</code> API to interact with connected USB 5 // Use the <code>chrome.usb</code> API to interact with connected USB
6 // devices. This API provides access to USB operations from within the context 6 // devices. This API provides access to USB operations from within the context
7 // of an app. Using this API, apps can function as drivers for hardware devices. 7 // of an app. Using this API, apps can function as drivers for hardware devices.
8 // 8 //
9 // Errors generated by this API are reported by setting 9 // Errors generated by this API are reported by setting
10 // $(ref:runtime.lastError) and executing the function's regular callback. The 10 // $(ref:runtime.lastError) and executing the function's regular callback. The
(...skipping 13 matching lines...) Expand all
24 enum UsageType {data, feedback, explicitFeedback}; 24 enum UsageType {data, feedback, explicitFeedback};
25 25
26 dictionary Device { 26 dictionary Device {
27 // An opaque ID for the USB device. It remains unchanged until the device is 27 // An opaque ID for the USB device. It remains unchanged until the device is
28 // unplugged. 28 // unplugged.
29 long device; 29 long device;
30 // The device vendor ID. 30 // The device vendor ID.
31 long vendorId; 31 long vendorId;
32 // The product ID. 32 // The product ID.
33 long productId; 33 long productId;
34 // The device version (bcdDevice field).
35 long version;
34 // The iProduct string read from the device, if available. 36 // The iProduct string read from the device, if available.
35 DOMString productName; 37 DOMString productName;
36 // The iManufacturer string read from the device, if available. 38 // The iManufacturer string read from the device, if available.
37 DOMString manufacturerName; 39 DOMString manufacturerName;
38 // The iSerialNumber string read from the device, if available. 40 // The iSerialNumber string read from the device, if available.
39 DOMString serialNumber; 41 DOMString serialNumber;
40 }; 42 };
41 43
42 dictionary ConnectionHandle { 44 dictionary ConnectionHandle {
43 // An opaque handle representing this connection to the USB device and all 45 // An opaque handle representing this connection to the USB device and all
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // device. Permission may have been granted at install time, when the user 394 // device. Permission may have been granted at install time, when the user
393 // accepted an optional permission (see $(ref:permissions.request)), or 395 // accepted an optional permission (see $(ref:permissions.request)), or
394 // through $(ref:getUserSelectedDevices). 396 // through $(ref:getUserSelectedDevices).
395 static void onDeviceAdded(Device device); 397 static void onDeviceAdded(Device device);
396 398
397 // Event generated when a device is removed from the system. See 399 // Event generated when a device is removed from the system. See
398 // $(ref:onDeviceAdded) for which events are delivered. 400 // $(ref:onDeviceAdded) for which events are delivered.
399 static void onDeviceRemoved(Device device); 401 static void onDeviceRemoved(Device device);
400 }; 402 };
401 }; 403 };
OLDNEW
« no previous file with comments | « extensions/browser/api/usb/usb_guid_map.cc ('k') | extensions/test/data/api_test/usb/device_handling/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698