New issue
Advanced search Search tips

Issue 595375 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 492204



Sign in to add a comment

Disable WebUSB on non-foreground tabs

Project Member Reported by est...@chromium.org, Mar 16 2016

Issue description

Until 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
 
Status: Assigned (was: Available)
Blocking: 492204
Labels: M-51
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Labels: Needs-Feedback
Status: Started (was: Assigned)
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.

Comment 5 by est...@chromium.org, Mar 23 2016

Status: Fixed (was: Started)
Thanks!
Components: -Security>UX
Labels: Team-Security-UX
Security>UX component is deprecated in favor of the Team-Security-UX label

Sign in to add a comment