summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorReilly Grant <reillyg@chromium.org>2014-10-20 10:10:00 -0700
committerReilly Grant <reillyg@chromium.org>2014-10-20 17:10:52 +0000
commiteab0388f8dc375b88827814915abfd008481bc83 (patch)
tree5caff957c47a8157fc3c40af35021bcc4eea5fd2 /content/renderer
parent2eb1c0c21f6f4f7c23e36d103f7bbee6d161e2aa (diff)
downloadchromium_src-eab0388f8dc375b88827814915abfd008481bc83.zip
chromium_src-eab0388f8dc375b88827814915abfd008481bc83.tar.gz
chromium_src-eab0388f8dc375b88827814915abfd008481bc83.tar.bz2
Merge b321e4f568 and e8fa00efd0 into M-39 branch (issue 418207).
Use IOService enumeration instead of IOHIDManager in HidServiceMac. Using the IOServiceAddMatchingNotification API to monitor devices connected to the system is preferable to IOHIDManager because it is lighter weight. IOHIDManager forces its own lifetime expectations on the IOHIDDevice objects that it creates and opens all devices it sees for I/O whether or not there is a Chrome app that is using them. As a necessary step to simplify this transition the device/hid API now lives on the browser UI thread when running on OS X. This change will soon be made for Linux and Windows as well. This change should also reduce the risk of race conditions as observed in bug 418207 which is why it is being made independently of the other platforms. BUG=418207,413978 R=rockot@chromium.org, rpaquay@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/637863003 Cr-Commit-Position: refs/heads/master@{#298793} Conflicts: extensions/browser/api/hid/hid_api.cc Add HidConnection::Close and register OS X callbacks on the UI thread. The platform implementation of a HID connection may need to cancel I/O operations when the connection is closed. If this is done during the object destructor then any pointers held by those pending operations are immediately invalid. A separate Close method allows the cleanup to happen while the object is still available to handle asynchronous cancellation events. The OS X implementation will take advantage of this immediately to register and unregister its input report callback from the UI thread to avoid a race between event delivery and object cleanup. I've added comments explaining why not all operations on the IOHIDDevice object could be moved to the UI thread. BUG=418207 Review URL: https://codereview.chromium.org/615633008 Cr-Commit-Position: refs/heads/master@{#298384} Conflicts: device/hid/hid_connection_linux.h device/hid/hid_connection_mac.h device/hid/hid_connection_win.h Review URL: https://codereview.chromium.org/648613002 Cr-Commit-Position: refs/branch-heads/2171@{#188} Cr-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060}
Diffstat (limited to 'content/renderer')
0 files changed, 0 insertions, 0 deletions