diff options
author | reillyg <reillyg@chromium.org> | 2014-12-09 14:03:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-09 22:04:29 +0000 |
commit | 5b2961f7d25bb6c0fdb364b12de0e7ebed4706bb (patch) | |
tree | 2abb1e368534f5a9a922ccb6b054936bd956716e /device/hid/hid_service_mac.cc | |
parent | ec6b033cd9fe790bcebde7b5c1cd3490784b891a (diff) | |
download | chromium_src-5b2961f7d25bb6c0fdb364b12de0e7ebed4706bb.zip chromium_src-5b2961f7d25bb6c0fdb364b12de0e7ebed4706bb.tar.gz chromium_src-5b2961f7d25bb6c0fdb364b12de0e7ebed4706bb.tar.bz2 |
Return result from HidService::GetDevices asynchronously.
On Linux HID enumeration happens asynchronously. This change updates
HidService and HidDeviceManager to track an asynchronous enumeration
and not return any results to API clients until the first enumeration
has been completed.
In preparation for broadcasting device add/remove events to apps this
change also switches HidDeviceManager to maintaining its resource ID
mappings using a HidService::Observer. This also made the switch to an
asynchronous GetApiDevices API easier.
BUG=376719
Review URL: https://codereview.chromium.org/782153003
Cr-Commit-Position: refs/heads/master@{#307564}
Diffstat (limited to 'device/hid/hid_service_mac.cc')
-rw-r--r-- | device/hid/hid_service_mac.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/device/hid/hid_service_mac.cc b/device/hid/hid_service_mac.cc index 7d40cae..875e1b9 100644 --- a/device/hid/hid_service_mac.cc +++ b/device/hid/hid_service_mac.cc @@ -213,6 +213,7 @@ HidServiceMac::HidServiceMac( // Drain devices_added_iterator_ to arm the notification. devices_removed_iterator_.reset(iterator); RemoveDevices(); + FirstEnumerationComplete(); } HidServiceMac::~HidServiceMac() { |