Should BlueTooth/USB requestDevice consume user gestures? |
||
Issue description
Given that the user activation ("user gesture") state maintained in Blink expires after a few seconds, it seems unnecessary to /consume/ the state in BlueTooth::requestDevice and USB::requestDevice (vs just /checking/ the state).
None of the specs require the consumption behavior:
https://webbluetoothcg.github.io/web-bluetooth/#device-discovery
https://wicg.github.io/webusb/#device-requests
Does it sound reasonable then to switch requestDevice to "check" instead of to "consume" user activation?
,
Apr 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a commit c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a Author: Mustaq Ahmed <mustaq@google.com> Date: Fri Apr 06 14:01:02 2018 Make BlueTooth/USB requestDevice non-consuming. The specs for both WebBlueTooth & WebUSB only require a user activation during a requestDevice call. So consuming the activation (vs just checking) is not a strong requirement. There was a concern that "not consuming" could possibly mean multiple choosers for a single user activation but our browser code already handles the situation gracefully. Multiple requests to browser is possible from different tabs anyway, even with (isolated) consumptions in individual tabs. Therefore it makes sense to remove the consumption behavior here, which is not spec-ed anyway. This would fit our goal of a simple user activation model ("UserActivationV2" project) which should be simple enough for cross-browser implementation and for a complete spec. Bug: 786407 Change-Id: I3c9dbf43df34d4cb4a2a33214a6c44847fa7435b Reviewed-on: https://chromium-review.googlesource.com/775866 Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org> Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/heads/master@{#548768} [modify] https://crrev.com/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a/content/browser/bluetooth/web_bluetooth_service_impl.cc [rename] https://crrev.com/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a/third_party/WebKit/LayoutTests/external/wpt/bluetooth/requestDevice/doesnt-consume-user-gesture.https.html [modify] https://crrev.com/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a/third_party/WebKit/LayoutTests/external/wpt/webusb/usb.https.html [modify] https://crrev.com/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp [modify] https://crrev.com/c4dfbae6d308b4f0a7140e71db3c7f6db01bdc3a/third_party/WebKit/Source/modules/webusb/USB.cpp
,
Apr 6 2018
,
Apr 6 2018
,
Apr 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d80085143667bef3ac458a5350f6fb22debe03c3 commit d80085143667bef3ac458a5350f6fb22debe03c3 Author: Reilly Grant <reillyg@chromium.org> Date: Sat Apr 07 01:11:52 2018 Track only a single WebUSB chooser bubble on desktop A similar change was made for Android in r548482. Since only one bubble can be visible at a time there is no reason to track multiple references. If a request to open another chooser is received the previous bubble should be closed first. Bug: 786407 Change-Id: I5f7b2f56ff1c394aaedd23e5360977bde2076fbd Reviewed-on: https://chromium-review.googlesource.com/1000396 Reviewed-by: Jun Cai <juncai@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#549001} [modify] https://crrev.com/d80085143667bef3ac458a5350f6fb22debe03c3/chrome/browser/usb/web_usb_chooser_service_desktop.cc [modify] https://crrev.com/d80085143667bef3ac458a5350f6fb22debe03c3/chrome/browser/usb/web_usb_chooser_service_desktop.h |
||
►
Sign in to add a comment |
||
Comment 1 by scheib@chromium.org
, Jan 9 2018