Add chrome.hid.getUserSelectedDevices API.
commit7c2dc58d437b8dfa269227981b0221c196888d41
authorreillyg <reillyg@chromium.org>
Fri, 19 Jun 2015 19:22:55 +0000 (19 12:22 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 19:23:38 +0000 (19 19:23 +0000)
treeba82f7b85a8f5907396689e41008254671058ffb
parent8eff3b58154685c9a3236b7efc376d4b1b26718a
Add chrome.hid.getUserSelectedDevices API.

This change wires up the HID API to the DevicePermissionsManager so
that devices the user has granted permission are enumerated and can be
connected to. It then adds a chrome.hid.getUserSelectedDevices function
which displays a dialog box (using the new AskForHidDevices method
added to DevicePermissionsPrompt) asking the user to select one or more
HID devices. The application can filter which devices are available for
the user to select.

BUG=457899

Review URL: https://codereview.chromium.org/1115213004

Cr-Commit-Position: refs/heads/master@{#335316}
13 files changed:
chrome/browser/ui/cocoa/extensions/device_permissions_dialog_controller.mm
chrome/browser/ui/views/extensions/device_permissions_dialog_view.cc
extensions/browser/api/hid/hid_api.cc
extensions/browser/api/hid/hid_api.h
extensions/browser/api/hid/hid_apitest.cc
extensions/browser/api/hid/hid_device_manager.cc
extensions/browser/api/hid/hid_device_manager.h
extensions/browser/extension_function_histogram_value.h
extensions/common/api/_api_features.json
extensions/common/api/hid.idl
extensions/test/data/api_test/hid/get_user_selected_devices/background.js [new file with mode: 0644]
extensions/test/data/api_test/hid/get_user_selected_devices/manifest.json [new file with mode: 0644]
tools/metrics/histograms/histograms.xml