| Index: ipc/ipc_channel_common.cc
|
| diff --git a/ipc/ipc_channel_common.cc b/ipc/ipc_channel_common.cc
|
| index b5dcb1ab4bf93380653e5ddde5b00dd3819142f1..d7bbef6656726a5e6d242d190988bdcfd68ba75a 100644
|
| --- a/ipc/ipc_channel_common.cc
|
| +++ b/ipc/ipc_channel_common.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "build/build_config.h"
|
| #include "ipc/ipc_channel.h"
|
| +#include "ipc/ipc_channel_mojo.h"
|
|
|
| namespace IPC {
|
|
|
| @@ -11,6 +12,11 @@ namespace IPC {
|
| std::unique_ptr<Channel> Channel::CreateClient(
|
| const IPC::ChannelHandle& channel_handle,
|
| Listener* listener) {
|
| + if (channel_handle.mojo_handle.is_valid()) {
|
| + return ChannelMojo::Create(
|
| + mojo::ScopedMessagePipeHandle(channel_handle.mojo_handle),
|
| + Channel::MODE_CLIENT, listener);
|
| + }
|
| return Channel::Create(channel_handle, Channel::MODE_CLIENT, listener);
|
| }
|
|
|
| @@ -42,6 +48,11 @@ std::unique_ptr<Channel> Channel::CreateOpenNamedServer(
|
| std::unique_ptr<Channel> Channel::CreateServer(
|
| const IPC::ChannelHandle& channel_handle,
|
| Listener* listener) {
|
| + if (channel_handle.mojo_handle.is_valid()) {
|
| + return ChannelMojo::Create(
|
| + mojo::ScopedMessagePipeHandle(channel_handle.mojo_handle),
|
| + Channel::MODE_SERVER, listener);
|
| + }
|
| return Channel::Create(channel_handle, Channel::MODE_SERVER, listener);
|
| }
|
|
|
|
|