1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/app/mojo/mojo_init.h"
7 #include "base/lazy_instance.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "ipc/ipc_channel.h"
10 #include "third_party/mojo/src/mojo/edk/embedder/configuration.h"
11 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
12 #include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
18 class MojoInitializer
{
21 mojo::embedder::GetConfiguration()->max_message_num_bytes
=
22 IPC::Channel::kMaximumMessageSize
;
23 mojo::embedder::Init(scoped_ptr
<mojo::embedder::PlatformSupport
>(
24 new mojo::embedder::SimplePlatformSupport()));
28 base::LazyInstance
<MojoInitializer
>::Leaky mojo_initializer
;
32 void InitializeMojo() {
33 mojo_initializer
.Get();
36 } // namespace content