[display] Propagate change state on display config update
This CL updates OnDidProcessDisplayChanges() to propagate a struct
of changes to the display configuration. This API is currently only
implemented by ChromeOS Ash.
There are several DisplayManager methods that modify the existing
display configuration and these methods can call each other in a
nested fashion. BeginEndNotifier exists to allow a single call to
OnWillProcessDisplayChanges() and OnDidProcessDisplayChanges() on
either side of an atomic change in display configuration state.
This CL introduces DisplayManager::PendingDisplayChanges which is
intended to track all display config changes that occur before
the last BeginEndNotifier falls out of scope. At this time
this is translated to a DisplayConfigurationChange struct more
appropriate for observers and propagated in the call to
OnDidProcessDisplayChanges().
This CL also adds a test to ensure what is propagated by
the DisplayManagerObserver is consistent with what is propagated by
the DisplayObserver.
Follow up CLs will also
- update exo to leverage this as a means to consume an atomic
update to the display configuration state.
- consolidate the other existing mechanisms that communicate
display configuration changes. For e.g. see
DisplayManager::Delegate::Pre[Post]DisplayConfigurationChange()
and downstream methods.
- update clients that rely on other means to infer display
configuration changes (using OnDisplayAdded[Removed]() for e.g.)
Bug: 1427019, 1408304, 1498683
Change-Id: I87bdf62b5fe90b7160c03e1f4597059288173959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4973206
Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1224481}
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.