diff options
author | reillyg <reillyg@chromium.org> | 2015-01-08 19:03:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-09 03:04:57 +0000 |
commit | fbff124cc092ce78fe6b9dea129e9c1b8a2736dd (patch) | |
tree | d6f8db22097e352d1a9079aada72238dcc24ef68 /device/hid/hid_connection_mac.h | |
parent | 3538e8bc5f7d75b15fe6288d17998b5d0d495080 (diff) | |
download | chromium_src-fbff124cc092ce78fe6b9dea129e9c1b8a2736dd.zip chromium_src-fbff124cc092ce78fe6b9dea129e9c1b8a2736dd.tar.gz chromium_src-fbff124cc092ce78fe6b9dea129e9c1b8a2736dd.tar.bz2 |
Convert HidDeviceInfo from a struct to a refcounted class.
The HidDeviceInfo object for a device is passed around a lot, including
being copied every time enumeration of a device is requested. Since this
data is constant once a device is enumerated it is better to keep one
copy around for the device for as long as it is connected. This will
make it similar to the device::UsbDevice class.
I consider this a pre-requisite for storing more information in
HidDeviceInfo such as the raw report descriptor. Later patches will
revisit how this object is constructed and possibly reduce the number of
friend classes.
BUG=442818
Review URL: https://codereview.chromium.org/825523003
Cr-Commit-Position: refs/heads/master@{#310692}
Diffstat (limited to 'device/hid/hid_connection_mac.h')
-rw-r--r-- | device/hid/hid_connection_mac.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/device/hid/hid_connection_mac.h b/device/hid/hid_connection_mac.h index daac83b..7e6df025 100644 --- a/device/hid/hid_connection_mac.h +++ b/device/hid/hid_connection_mac.h @@ -26,9 +26,9 @@ namespace device { class HidConnectionMac : public HidConnection { public: - explicit HidConnectionMac( + HidConnectionMac( IOHIDDeviceRef device, - HidDeviceInfo device_info, + scoped_refptr<HidDeviceInfo> device_info, scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); private: |