Add a UsbService::Observer function for cleanup actions.
This patch adds an additional function to the UsbService::Observer interface that should be used to perform cleanup operations when a USB device is disconnected. This is separate from the OnDeviceRemoved function so that implementations of that function, which may depend on other subsystems' knowledge of a connected device, can run before any cleanup actions have taken place. A browsertest for the chrome.usb.getUserSelectedDevices is included which demonstrates the need for this 2-phase event handling. BUG=452298 Review URL: https://codereview.chromium.org/891853002 Cr-Commit-Position: refs/heads/master@{#314973}
Showing
Please register or sign in to comment