[freezing] Track Hid and Serial port connections in Performance Manager. This is needed to implement a freezing opt-out as described at go/tab-freezing-on-energy-saver-prd. Implementation details: - WebContentsObserver::OnIsConnectedToUsbDeviceChanged() and WebContentsObserver::OnIsConnectedToBluetoothDeviceChanged() are replaced with WebContentsObserver::OnDeviceConnectionTypesChanged(), which is invoked when the connection types used by a WebContents change (USB, Bluetooth, HID and serial). This avoids an explosion of the number of observer methods as more device connection types need to be tracked by performance policies. - Hid Device and Serial Port usage are tracked in PageLiveStateDecorator, alongside USB Device and Bluetooth device usage. - In a separate CL, we'll use the new properties as Page Freezing opt-outs. Bug: 325954772 Change-Id: I5d9df041f7cb45309f3eb69cb9b6ad59f35d64b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5847688 Reviewed-by: Matt Reynolds <mattreynolds@chromium.org> Reviewed-by: Patrick Monette <pmonette@chromium.org> Commit-Queue: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1356468}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.