| Index: chrome/common/extensions/docs/templates/articles/app_usb.html
|
| diff --git a/chrome/common/extensions/docs/templates/articles/app_usb.html b/chrome/common/extensions/docs/templates/articles/app_usb.html
|
| index 3a1e9d35b15b0783d3381abb7e3a82849067eb2b..9c8bb8fec5e50e227b12b956ef912da1397e21a0 100644
|
| --- a/chrome/common/extensions/docs/templates/articles/app_usb.html
|
| +++ b/chrome/common/extensions/docs/templates/articles/app_usb.html
|
| @@ -42,8 +42,8 @@ Chrome Apps can also connect to <a href="serial">serial</a> and
|
| </p>
|
| <p>
|
| You must declare the VID/PID pairs for each type of device you want to use
|
| - under the "usbDevices" permission in your app's manifest file, as shown in the
|
| - example below:</p>
|
| + under the <code>usbDevices</code> permission in your app's manifest file, as
|
| + shown in the example below:</p>
|
|
|
| <pre data-filename="manifest.json">
|
| "permissions": [
|
| @@ -61,6 +61,56 @@ Chrome Apps can also connect to <a href="serial">serial</a> and
|
| <p class="note">Note that only decimal numbers are allowed in JSON format.
|
| You cannot use hexadecimal numbers in these fields.</p>
|
|
|
| +<p>Since <b>Chrome 57</b>, the requirement for declaring all the device types
|
| + in the app manifest is relaxed for apps running as Chrome OS
|
| + <a href="apps/manifest/kiosk_enabled">kiosk apps</a>.
|
| + For kiosk apps, you can use the <code>interfaceClass</code> permission
|
| + property to request permission to access USB devices that:
|
| + <ul>
|
| + <li>implement a USB interface of a specific interface class</li>
|
| + <li>have a specific USB device class</li>
|
| + </ul>
|
| + For example, the following <code>usbDevices</code> permission would grant an
|
| + app access to all USB devices that implement a printer interface (interface
|
| + class code 7), and to USB hub devices (device class code 9):</p>
|
| +
|
| +<pre data-filename="manifest.json">
|
| +"permissions": [
|
| + {
|
| + "usbDevices": [
|
| + {"interfaceClass": 7},
|
| + {"interfaceClass": 9}
|
| + ]
|
| + }
|
| +]
|
| +</pre>
|
| +
|
| +<p>For the list of acceptable <code>interfaceClass</code> values, see
|
| + <a href="http://www.usb.org/developers/defined_class">USB Class Codes</a>.
|
| + </p>
|
| +
|
| +<p>The <code>interfaceClass</code> property can be combined with the
|
| + <code>vendorId</code> property to get access only to USB devices from a
|
| + specific vendor, as demonstrated by the following example:</p>
|
| +
|
| +<pre data-filename="manifest.json">
|
| +"permissions": [
|
| + {
|
| + "usbDevices": [
|
| + {
|
| + "vendorId": 123,
|
| + "interfaceClass": 7
|
| + }
|
| + ]
|
| + }
|
| +]
|
| +</pre>
|
| +
|
| +<p class="note">Note that <code>usbDevices</code> permissions with
|
| + <code>interfaceClass</code> property have effect only when the app is running
|
| + in kiosk session - outside a kiosk session these permissions will be ignored.
|
| + </p>
|
| +
|
| <h2 id="finding_device">Finding a device</h2>
|
|
|
| <p>
|
|
|