hid: Remove size from receive APIs and return report ID separately.
commit054293034c1e79f6ee7ff5b11e6a35673d7f38a3
authorreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 28 Jul 2014 22:01:26 +0000 (28 22:01 +0000)
committerreillyg@chromium.org <reillyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 28 Jul 2014 22:01:26 +0000 (28 22:01 +0000)
tree8f1a63690fbcdb0396c25c57d9de79d04a3853f8
parent3e65977489925662657d91d334d6e9d1b520c60a
hid: Remove size from receive APIs and return report ID separately.

The size parameter is unnecessary when calling chrome.hid.receive and
chrome.hid.receiveFeatureReport because, since the caller does not know
which report ID will be returned, it should always be set to the maximum
input or feature report size provided by the device. The size of the
report ID is now not included in the maximum report sizes for the device
since it no longer effects buffer size.

In addition increase consistency by always providing the report ID to
the chrome.hid.receive callback instead of including it as the first
byte of the data buffer only if it is non-zero.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285989 0039d316-1c4b-4281-b951-d872f2087c98
15 files changed:
device/hid/hid_connection.cc
device/hid/hid_connection.h
device/hid/hid_connection_mac.cc
device/hid/hid_connection_win.cc
device/hid/hid_device_info.cc
device/hid/hid_device_info.h
device/hid/hid_report_descriptor.cc
device/hid/hid_report_descriptor.h
device/hid/hid_report_descriptor_unittest.cc
device/hid/hid_service_linux.cc
device/hid/hid_service_mac.cc
device/hid/hid_service_win.cc
extensions/browser/api/hid/hid_api.cc
extensions/browser/api/hid/hid_api.h
extensions/common/api/hid.idl