// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/app/mojo/mojo_init.h" #include "base/lazy_instance.h" #include "base/memory/scoped_ptr.h" #include "ipc/ipc_channel.h" #include "third_party/mojo/src/mojo/edk/embedder/configuration.h" #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" #include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h" namespace content { namespace { class MojoInitializer { public: MojoInitializer() { mojo::embedder::GetConfiguration()->max_message_num_bytes = IPC::Channel::kMaximumMessageSize; mojo::embedder::Init(scoped_ptr( new mojo::embedder::SimplePlatformSupport())); } }; base::LazyInstance::Leaky mojo_initializer; } // namespace void InitializeMojo() { mojo_initializer.Get(); } } // namespace content