OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "ppapi/nacl_irt/embedder_service.h" |
| 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "ipc/ipc_channel_handle.h" |
| 9 #include "ipc/ipc_sync_channel.h" |
| 10 #include "ipc/ipc_sync_message_filter.h" |
| 11 |
| 12 namespace ppapi { |
| 13 |
| 14 EmbedderService::EmbedderService( |
| 15 const IPC::ChannelHandle& handle, |
| 16 scoped_refptr<base::MessageLoopProxy> io_message_loop, |
| 17 base::WaitableEvent* shutdown_event) { |
| 18 channel_.reset(new IPC::SyncChannel(NULL, // Listener |
| 19 io_message_loop, |
| 20 shutdown_event)); |
| 21 filter_ = new IPC::SyncMessageFilter(shutdown_event); |
| 22 channel_->AddFilter(filter_.get()); |
| 23 const bool kCreatePipeNow = true; |
| 24 channel_->Init(handle, IPC::Channel::MODE_SERVER, kCreatePipeNow); |
| 25 } |
| 26 |
| 27 EmbedderService::~EmbedderService() { |
| 28 } |
| 29 |
| 30 } // namespace ppapi |
OLD | NEW |