[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / app / mojo / mojo_init.cc
blobbf92f64886f4d65ca69bf30a0982ec4282d6e36f
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"
14 namespace content {
16 namespace {
18 class MojoInitializer {
19 public:
20 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;
30 } // namespace
32 void InitializeMojo() {
33 mojo_initializer.Get();
36 } // namespace content