Add Screen::GetDisplayForNewWindows to support remote mojo apps
Chrome OS supports the concept of a "root window for new windows", which allows new windows to be automatically placed on the correct display. This knowledge lives in ash, currently inside the browser process. Remote processes that use views::Widget (e.g. the shortcut viewer app) sometimes need to know what window they are going to open on, for example to do initial bounds computations. Change Screen to provide set and get for the display for new windows. Use mojo to send the information to other processes via ScreenProvider (on the ash side) and ScreenMus (on the remote side). Send the display id as part of display updates so that ScreenMus gets it on startup, and also so updates are atomic with other display changes. Once this lands we'll be able to port browser windows to use this mechanism and delete the ash::ShellState / chrome ShellStateClient code I built as a one-off for browser windows under mash. Bug: 867559, 764009, 826569 Test: added unit tests Change-Id: I6b5beb2610243f30072c3d73180b3ce21a310ca6 Reviewed-on: https://chromium-review.googlesource.com/1162980Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Tom Sepez <tsepez@chromium.org> Reviewed-by:
Michael Wasserman <msw@chromium.org> Commit-Queue: James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#581055}
Showing
Please register or sign in to comment