[usb] Fix tab indicator behavior on device disconnection
In r604873 support for revoking USB permission in real time was added but broke this tab indicator behavior by closing the mojo::Receiver for the UsbDeviceClient interface on device disconnection without updating the tab indicator state. This change fixes that behavior by having WebUsbServiceImpl track the open state of each UsbDevice pipe it creates and updating the tab indicator state if one of them is forcibly closed while the device is open. This change allows connection state tracking in UsbTabHelper to be simplified. Additional unit tests for this behavior have been added. Bug: 1064467 Change-Id: I9747d48428fc3daaf921b6763060ba16007004ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122461Reviewed-by:Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#754751}
Showing
Please register or sign in to comment