[Mac] Fix long haptic effects on Xbox One gamepads

On Mac, Chrome includes an internal driver for Xbox 360 and Xbox One
gamepads connected over USB. Vibration effects are issued to these
devices over USB HID using a vendor-specific protocol.

The Xbox One rumble packet specifies a duration for the effect. Chrome
always sets this to the maximum value and instead issues a new rumble
packet to end the effect. However, the duration of an Xbox One effect
with the maximum duration is approximately 3 seconds, causing longer
effects to end earlier than intended.

To support longer effects, the internal driver will now issue a second
rumble packet when needed.

BUG=749295

Change-Id: I25313715912f1a77b6fabc9071d2e77b804e3d8f
Reviewed-on: https://chromium-review.googlesource.com/964991
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545281}
1 file changed