Disable WebUSB on non-foreground tabs |
|||||
Issue descriptionUntil we have a tab indicator for WebUSB, the API should be disabled on non-foreground tabs. This is in line with what Web Bluetooth is doing: https://bugs.chromium.org/p/chromium/issues/detail?id=469019#c8
,
Mar 17 2016
,
Mar 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642 commit d83aa53f1beb27037f5f77fc06d5b6b0c2e05642 Author: reillyg <reillyg@chromium.org> Date: Tue Mar 22 19:54:05 2016 Close USB device connections when the page is hidden. This is a temporary measure to make up for the lack of a visible indication that a page has an open connection to a USB device. If the page becomes hidden then all open device connections are closed and cannot be reopened until it is visible again. BUG= 595375 Review URL: https://codereview.chromium.org/1820173002 Cr-Commit-Position: refs/heads/master@{#382654} [add] https://crrev.com/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642/third_party/WebKit/LayoutTests/usb/disconnect-when-hidden-or-closed.html [modify] https://crrev.com/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js [modify] https://crrev.com/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642/third_party/WebKit/LayoutTests/usb/usbDevice.html [modify] https://crrev.com/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642/third_party/WebKit/Source/modules/webusb/USBDevice.cpp [modify] https://crrev.com/d83aa53f1beb27037f5f77fc06d5b6b0c2e05642/third_party/WebKit/Source/modules/webusb/USBDevice.h
,
Mar 22 2016
The patch above automatically disconnects pages from devices when the tab moves to the background (equivalent to the page calling USBDevice.close()) and prevents the page from re-opening the device until it is in the foreground again. estark@, please mark this "Fixed" if you believe this is sufficient.
,
Mar 23 2016
Thanks!
,
Apr 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4c3ab3d07108f906137537c771de9b5bda0ef83c commit 4c3ab3d07108f906137537c771de9b5bda0ef83c Author: reillyg <reillyg@chromium.org> Date: Fri Apr 08 22:11:54 2016 Remove page visibility requirement for WebUSB. Now that there is a tab indicator for WebUSB it can be used from a tab that is not in the foreground. BUG= 595375 , 592105 Review URL: https://codereview.chromium.org/1857393002 Cr-Commit-Position: refs/heads/master@{#386221} [delete] https://crrev.com/0992e8345174e4f16c6949a7982125ee82455b61/third_party/WebKit/LayoutTests/usb/disconnect-when-hidden-or-closed.html [modify] https://crrev.com/4c3ab3d07108f906137537c771de9b5bda0ef83c/third_party/WebKit/Source/modules/webusb/USBDevice.cpp [modify] https://crrev.com/4c3ab3d07108f906137537c771de9b5bda0ef83c/third_party/WebKit/Source/modules/webusb/USBDevice.h
,
Dec 9 2016
Security>UX component is deprecated in favor of the Team-Security-UX label |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by reillyg@chromium.org
, Mar 17 2016