Shows how to use the optional permissions API
Optional permissions API
This app shows to use the permissions API to request optional permissions. It can list the attached serial ports, but only if the "serial" permission is granted. The app shows how to check if the permission is granted and how to request it if it is not.
See the source code at https://github.com/GoogleChrome/chrome-app-samples/tree/master/optional-permissions