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

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

Issue 463493006: Add chrome.usbPrivate API for use by USB device WEBUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change "Google Inc." to "Test Manufacturer". Created 6 years, 4 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 | « extensions/common/api/api.gyp ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Use the <code>chrome.usbPrivate</code> API to interact with connected USB
6 // devices. This API provides private extensions to the <code>chrome.usb</code>
7 // API which should only be available to trusted pages.
8 namespace usbPrivate {
9
10 // Properties for matching devices. A device matches of any of its interfaces
11 // match the given properties. An empty dictionary matches any device.
12 dictionary DeviceFilter {
13 // Device-level matching criteria:
14 long? vendorId;
15 // Checked only if the vendorId matches.
16 long? productId;
17
18 // Per-interface matching criteria:
19 long? interfaceClass;
20 // Checked only if the interfaceClass matches.
21 long? interfaceSubclass;
22 // Checked only if the interfaceSubclass matches.
23 long? interfaceProtocol;
24 };
25
26 dictionary DeviceInfo {
27 long vendorId; // idVendor from the device
28 long productId; // idProduct from the device
29
30 // Vendor and product names from an internal database.
31 DOMString? vendorName;
32 DOMString? productName;
33
34 // iManufacturer, iProduct and iSerial strings from the device.
35 DOMString? manufacturerString;
36 DOMString? productString;
37 DOMString? serialString;
38 };
39
40 callback GetDevicesCallback = void (long[] deviceIds);
41 callback GetDeviceInfoCallback = void (DeviceInfo deviceInfo);
42
43 interface Functions {
44 // Lists USB devices matching any of the given filters.
45 // |filters|: The properties to search for on target devices.
46 // |callback|: Invoked with a list of device IDs on complete.
47 static void getDevices(DeviceFilter[] filters,
48 GetDevicesCallback callback);
49
50 // Gets basic display information about a device.
51 // |deviceId|: The device ID (from |getDevices|).
52 // |callback|: Invoked with |DeviceInfo| from the device.
53 static void getDeviceInfo(long deviceId, GetDeviceInfoCallback callback);
54 };
55 };
OLDNEW
« no previous file with comments | « extensions/common/api/api.gyp ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698