Add PlatformScreenDelegate and start implementation.
There is currently a single callback provided to PlatformScreen for when new displays are added. We need to be able to notify not only when new displays are added but also when displays are modified or removed. Instead of having three callbacks, the PlatformScreenDelegate interface is added. The ui::ws::DisplayManager class implements PlatformScreenDelegate. This is ultimately the class that needs to know about changes to displays so it can update root windows accordingly. There are some changes to ownership and constructor parameters to facilitate having DisplayManager implement PlatformScreenDelegate. The WindowServer instance is passed into DisplayManager, as it doesn't make sense that Display objects owned by DisplayManager are allowed to know about WindowServer but DisplayManager is not. The DisplayManagerDelegate interface is simplified and changed to UserDisplayManagerDelegate as it's no longer needed for DisplayManager. The instantiation of SurfaceState is moved from Service to WindowServer. There is no need to have Service know about SurfaceState anymore. Also, SurfaceState will be moving to the GPU processes regardless. BUG=641012 Review-Url: https://codereview.chromium.org/2274353003 Cr-Commit-Position: refs/heads/master@{#414710}
Showing
Please register or sign in to comment