| Index: ui/aura/mus/window_tree_client.cc
|
| diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
|
| index da326eaacc31fbbd72b5c6e81e84700cfdfc116c..db0ab724dc6e9db8d60356aa76c3fb7983ae77a2 100644
|
| --- a/ui/aura/mus/window_tree_client.cc
|
| +++ b/ui/aura/mus/window_tree_client.cc
|
| @@ -553,6 +553,8 @@ WindowTreeHostMus* WindowTreeClient::WmNewDisplayAddedImpl(
|
| const cc::FrameSinkId& frame_sink_id) {
|
| DCHECK(window_manager_delegate_);
|
|
|
| + got_initial_displays_ = true;
|
| +
|
| window_manager_delegate_->OnWmWillCreateDisplay(display);
|
|
|
| std::unique_ptr<WindowTreeHostMus> window_tree_host = CreateWindowTreeHost(
|
| @@ -1366,6 +1368,17 @@ void WindowTreeClient::RequestClose(uint32_t window_id) {
|
| GetWindowTreeHostMus(window->GetWindow())->OnCloseRequest();
|
| }
|
|
|
| +bool WindowTreeClient::WaitForInitialDisplays() {
|
| + if (got_initial_displays_)
|
| + return true;
|
| +
|
| + bool valid_wait = true;
|
| + // TODO(sky): having to block here is not ideal. http://crbug.com/594852.
|
| + while (!got_initial_displays_ && valid_wait)
|
| + valid_wait = binding_.WaitForIncomingMethodCall();
|
| + return valid_wait;
|
| +}
|
| +
|
| void WindowTreeClient::OnConnect(ClientSpecificId client_id) {
|
| client_id_ = client_id;
|
| }
|
|
|