| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index 8566b99432e0192e6b8ffe63d551019c19d95cab..9c94024ed6a4388db81af57a6ac49a3244cf81cb 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -170,6 +170,12 @@
|
| #include "crypto/nss_util.h"
|
| #endif
|
|
|
| +#if defined(MOJO_SHELL_CLIENT)
|
| +#include "components/mus/public/interfaces/window_manager.mojom.h"
|
| +#include "content/common/mojo/mojo_shell_connection_impl.h"
|
| +#include "ui/views/mus/window_manager_connection.h"
|
| +#endif
|
| +
|
| // One of the linux specific headers defines this as a macro.
|
| #ifdef DestroyAll
|
| #undef DestroyAll
|
| @@ -903,6 +909,17 @@ int BrowserMainLoop::CreateThreads() {
|
| }
|
|
|
| int BrowserMainLoop::PreMainMessageLoopRun() {
|
| +#if defined(MOJO_SHELL_CLIENT)
|
| + if (IsRunningInMojoShell()) {
|
| + MojoShellConnectionImpl::Create();
|
| + mus::mojom::WindowManagerPtr window_manager;
|
| + application->ConnectToService(
|
| + mojo::URLRequest::From(std::string("mojo:example_wm")),
|
| + &window_manager);
|
| + views::WindowManagerConnection::Create(window_manager.Pass(), application);
|
| + }
|
| +#endif
|
| +
|
| if (parts_) {
|
| TRACE_EVENT0("startup",
|
| "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
|
| @@ -949,6 +966,9 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
| base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed),
|
| true));
|
|
|
| +#if defined(MOJO_SHELL_CLIENT)
|
| + MojoShellConnection::Destroy();
|
| +#endif
|
| mojo_ipc_support_.reset();
|
| mojo_shell_context_.reset();
|
|
|
|
|