Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: ui/views/mus/screen_mus.cc

Issue 1797153002: Reinstate wait-for-Initialize when Chrome is run in Mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell-client
Patch Set: fix views_mus_unittests too Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/screen_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/screen_mus.cc
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc
index ede6d9570a2346aa5755d7a572453ec293b18cd2..60fe8cf9a417e464dc80b7ac5819298dd7888598 100644
--- a/ui/views/mus/screen_mus.cc
+++ b/ui/views/mus/screen_mus.cc
@@ -83,8 +83,10 @@ void ScreenMus::Init(mojo::Connector* connector) {
display_manager_observer_binding_.CreateInterfacePtrAndBind());
// We need the set of displays before we can continue. Wait for it.
- wait_for_displays_loop_.reset(new base::RunLoop);
- wait_for_displays_loop_->Run();
+ //
+ // TODO(rockot): Do something better here. This should not have to block tasks
+ // from running on the calling thread. http://crbug.com/594852.
+ display_manager_observer_binding_.WaitForIncomingMethodCall();
// The WaitForIncomingMethodCall() should have supplied the set of Displays.
DCHECK(displays_.size());
@@ -204,9 +206,6 @@ void ScreenMus::OnDisplays(mojo::Array<mus::mojom::DisplayPtr> displays) {
WindowManagerFrameValues::SetInstance(frame_values);
}
}
-
- DCHECK(wait_for_displays_loop_);
- wait_for_displays_loop_->Quit();
}
void ScreenMus::OnDisplaysChanged(
« no previous file with comments | « ui/views/mus/screen_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698