chromeos: gets reusing of WindowTreeHosts working for mus

Desktop / Chromium - Scott Violet [chromium.org] - 14 July 2017 15:30 EDT

WindowTreeHostManager may reuse a WindowTreeHost for a different display. This happens if all displays are removed, and then a new display is added. Ash now handles this by way of calling through to SetDisplayRoot() and SetDisplayRoot() on mus has been updated to allow this to happen.

In addition this changes ash's DisplaySynchronizer to only notify mus of the current display layout after all changes have been processed. This is necessary as DisplayManager notifies observers while internally the list of displays contains both added and removed entries. This means when FocusSynchronizer could notify of state display state, which mus didn't like and caused ash to crash (hit a CHECK).

BUG=740589 TEST=covered by tests

Change-Id: Ie0a2a05a1b592645669355f39997f9e3a5e77c3f Reviewed-on: https://chromium-review.googlesource.com/571399

49b77ab chromeos: gets reusing of WindowTreeHosts working for mus
ash/display/display_manager_unittest.cc | 69 +++++++++++---------
ash/display/window_tree_host_manager.cc | 11 ++--
ash/display/window_tree_host_manager.h | 7 ++
ash/mus/DEPS | 4 ++
ash/mus/display_synchronizer.cc | 38 +++++++++++
ash/mus/display_synchronizer.h | 15 +++++
services/ui/public/interfaces/window_manager.mojom | 2 +
services/ui/ws/window_tree.cc | 18 ++++--
services/ui/ws/window_tree_unittest.cc | 75 ++++++++++++++++++++++
ui/aura/mus/window_manager_delegate.h | 8 +++
ui/aura/mus/window_tree_client.cc | 19 ++++++
ui/aura/mus/window_tree_client.h | 4 ++
ui/display/display_observer.cc | 4 ++
ui/display/display_observer.h | 8 +++
ui/display/manager/display_manager.cc | 25 +++++++-
ui/display/manager/display_manager.h | 17 +++++
16 files changed, 279 insertions(+), 45 deletions(-)

Upstream: git.chromium.org


  • Share