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: chrome/common/extensions/docs/templates/articles/app_usb.html

Issue 886353008: Fix an error in docs for manifest requirements for usbDevices permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 <h1>USB Devices</h1> 1 <h1>USB Devices</h1>
2 2
3 <p> 3 <p>
4 This document describes how to use the <a href="usb">USB API</a> to communicate 4 This document describes how to use the <a href="usb">USB API</a> to communicate
5 with USB devices. Some devices are not accessible through the USB API 5 with USB devices. Some devices are not accessible through the USB API
6 (see the <a href="#caveats">Caveats</a> section below for details). 6 (see the <a href="#caveats">Caveats</a> section below for details).
7 Chrome Apps can also connect to <a href="serial">serial</a> and 7 Chrome Apps can also connect to <a href="serial">serial</a> and
8 <a href="bluetooth">Bluetooth</a> devices. 8 <a href="bluetooth">Bluetooth</a> devices.
9 </p> 9 </p>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 You can use $(ref:usb.getDevices) to enumerate devices by their VID/PID 42 You can use $(ref:usb.getDevices) to enumerate devices by their VID/PID
43 pair. 43 pair.
44 </p> 44 </p>
45 <p> 45 <p>
46 You must declare the VID/PID pairs for each type of device you want to use 46 You must declare the VID/PID pairs for each type of device you want to use
47 under the "usbDevices" permission in your app's manifest file, as shown in the 47 under the "usbDevices" permission in your app's manifest file, as shown in the
48 example below:</p> 48 example below:</p>
49 49
50 <pre data-filename="manifest.json"> 50 <pre data-filename="manifest.json">
51 "permissions": [ 51 "permissions": [
52 "usbDevices": [ 52 {
53 { 53 "usbDevices": [
54 "vendorId": 123, 54 {
55 "productId": 456 55 "vendorId": 123,
56 } 56 "productId": 456
57 ] 57 }
58 ]
59 }
58 ] 60 ]
59 </pre> 61 </pre>
60 62
61 <p class="note">Note that only decimal numbers are allowed in JSON format. 63 <p class="note">Note that only decimal numbers are allowed in JSON format.
62 You cannot use hexadecimal numbers in these fields.</p> 64 You cannot use hexadecimal numbers in these fields.</p>
63 65
64 <h2 id="finding_device">Finding a device</h2> 66 <h2 id="finding_device">Finding a device</h2>
65 67
66 <p> 68 <p>
67 To determine whether one or more specific devices are connected to a user's 69 To determine whether one or more specific devices are connected to a user's
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 owned by group "plugdev" and have group write permissions. 667 owned by group "plugdev" and have group write permissions.
666 </li> 668 </li>
667 </ul> 669 </ul>
668 670
669 <p>Your app cannot do this automatically since this this procedure requires root 671 <p>Your app cannot do this automatically since this this procedure requires root
670 access. We recommend that you provide instructions to end-users and link to the 672 access. We recommend that you provide instructions to end-users and link to the
671 <a href="#caveats">Caveats</a> section on this page for an explanation.</p> 673 <a href="#caveats">Caveats</a> section on this page for an explanation.</p>
672 674
673 <p>On Chrome OS, simply call $(ref:usb.requestAccess). The permission 675 <p>On Chrome OS, simply call $(ref:usb.requestAccess). The permission
674 broker does this for you.</p> 676 broker does this for you.</p>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698