| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index e96d2f9261c2a58bb5d08794476dff03f9825fd4..930b922007bc7b9e177e9d8d976d4f978fb1c071 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -6,7 +6,9 @@
|
|
|
| #include <stddef.h>
|
|
|
| +#include <string>
|
| #include <utility>
|
| +#include <vector>
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| @@ -908,20 +910,6 @@ int BrowserMainLoop::CreateThreads() {
|
| }
|
|
|
| int BrowserMainLoop::PreMainMessageLoopRun() {
|
| - if (IsRunningInMojoShell()) {
|
| - if (!MojoShellConnectionImpl::CreateUsingFactory()) {
|
| - mojo::edk::SetParentPipeHandleFromCommandLine();
|
| - MojoShellConnectionImpl::Create();
|
| - MojoShellConnectionImpl::Get()->BindToRequestFromCommandLine();
|
| - }
|
| -#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
|
| - if (MojoShellConnection::Get()) {
|
| - views::WindowManagerConnection::Create(
|
| - MojoShellConnection::Get()->GetConnector());
|
| - }
|
| -#endif
|
| - }
|
| -
|
| if (parts_) {
|
| TRACE_EVENT0("startup",
|
| "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
|
| @@ -1172,6 +1160,21 @@ int BrowserMainLoop::BrowserThreadsStarted() {
|
| mojo_ipc_support_.reset(new IPC::ScopedIPCSupport(
|
| BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
|
| ->task_runner()));
|
| +
|
| + if (IsRunningInMojoShell()) {
|
| + if (!MojoShellConnectionImpl::CreateUsingFactory()) {
|
| + mojo::edk::SetParentPipeHandleFromCommandLine();
|
| + MojoShellConnectionImpl::Create();
|
| + MojoShellConnectionImpl::Get()->BindToRequestFromCommandLine();
|
| + }
|
| +#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
|
| + if (MojoShellConnection::Get()) {
|
| + views::WindowManagerConnection::Create(
|
| + MojoShellConnection::Get()->GetConnector());
|
| + }
|
| +#endif
|
| + }
|
| +
|
| mojo_shell_context_.reset(new MojoShellContext);
|
| #if defined(OS_MACOSX)
|
| mojo::edk::SetMachPortProvider(MachBroker::GetInstance());
|
|
|