| Index: ppapi/nacl_irt/embedder_service.cc
|
| diff --git a/ppapi/nacl_irt/embedder_service.cc b/ppapi/nacl_irt/embedder_service.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..81b2ad17521de5b3a088dc9cdd811d28fe1fdddc
|
| --- /dev/null
|
| +++ b/ppapi/nacl_irt/embedder_service.cc
|
| @@ -0,0 +1,30 @@
|
| +// 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 "ppapi/nacl_irt/embedder_service.h"
|
| +
|
| +#include "base/message_loop/message_loop_proxy.h"
|
| +#include "ipc/ipc_channel_handle.h"
|
| +#include "ipc/ipc_sync_channel.h"
|
| +#include "ipc/ipc_sync_message_filter.h"
|
| +
|
| +namespace ppapi {
|
| +
|
| +EmbedderService::EmbedderService(
|
| + const IPC::ChannelHandle& handle,
|
| + scoped_refptr<base::MessageLoopProxy> io_message_loop,
|
| + base::WaitableEvent* shutdown_event) {
|
| + channel_.reset(new IPC::SyncChannel(NULL, // Listener
|
| + io_message_loop,
|
| + shutdown_event));
|
| + filter_ = new IPC::SyncMessageFilter(shutdown_event);
|
| + channel_->AddFilter(filter_.get());
|
| + const bool kCreatePipeNow = true;
|
| + channel_->Init(handle, IPC::Channel::MODE_SERVER, kCreatePipeNow);
|
| +}
|
| +
|
| +EmbedderService::~EmbedderService() {
|
| +}
|
| +
|
| +} // namespace ppapi
|
|
|