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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1915053004: mus/chrome: Always wait for the mojo shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « chrome/test/base/mojo_test_connector.cc ('k') | content/common/mojo/mojo_shell_connection_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index d55a7f7d8e466f7f02ab0833ea59011203971a11..6fd6290b56de0f0be2fe81f87a7c28f201608fca 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -298,7 +298,17 @@ static void SetUpGLibLogHandler() {
NULL);
}
}
-#endif
+#endif // defined(USE_GLIB)
+
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
+void WaitForMojoShellInitialize() {
+ // TODO(rockot): Remove this. http://crbug.com/594852.
+ base::RunLoop wait_loop;
+ MojoShellConnectionImpl::Get()->shell_connection()->set_initialize_handler(
+ wait_loop.QuitClosure());
+ wait_loop.Run();
+}
+#endif // defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
void OnStoppedStartupTracing(const base::FilePath& trace_file) {
VLOG(0) << "Completed startup tracing to " << trace_file.value();
@@ -1190,6 +1200,9 @@ int BrowserMainLoop::BrowserThreadsStarted() {
#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
MojoShellConnection* mojo_shell_connection = MojoShellConnection::Get();
if (mojo_shell_connection) {
+ // TODO(rockot): Remove the blocking wait for init.
+ // http://crbug.com/594852.
+ WaitForMojoShellInitialize();
views::WindowManagerConnection::Create(
mojo_shell_connection->GetConnector(),
mojo_shell_connection->GetIdentity());
« no previous file with comments | « chrome/test/base/mojo_test_connector.cc ('k') | content/common/mojo/mojo_shell_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698