OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/app/mojo/mojo_init.h" | 5 #include "content/app/mojo/mojo_init.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "content/public/common/content_switches.h" | 11 #include "content/public/common/content_switches.h" |
12 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
13 #include "mojo/edk/embedder/embedder.h" | 13 #include "mojo/edk/embedder/embedder.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 class MojoInitializer { | 19 class MojoInitializer { |
20 public: | 20 public: |
21 MojoInitializer() { | 21 MojoInitializer() { |
22 mojo::edk::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize); | 22 mojo::edk::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize); |
| 23 #if defined(OS_CHROMEOS) |
| 24 mojo::edk::SetUseLegacyTransportProtocol(true); |
| 25 #endif |
23 mojo::edk::Init(); | 26 mojo::edk::Init(); |
24 } | 27 } |
25 }; | 28 }; |
26 | 29 |
27 base::LazyInstance<MojoInitializer>::Leaky mojo_initializer; | 30 base::LazyInstance<MojoInitializer>::Leaky mojo_initializer; |
28 | 31 |
29 } // namespace | 32 } // namespace |
30 | 33 |
31 void InitializeMojo() { | 34 void InitializeMojo() { |
32 mojo_initializer.Get(); | 35 mojo_initializer.Get(); |
33 } | 36 } |
34 | 37 |
35 } // namespace content | 38 } // namespace content |
OLD | NEW |