Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: ppapi/nacl_irt/embedder_service.cc

Issue 231793003: Add IPC Channel for new ManifestService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,
dmichael (off chromium) 2014/04/10 18:06:23 It looks like you're creating the SyncChannel on t
hidehiko 2014/04/10 19:02:08 My understanding is the IPC thread and listenter t
dmichael (off chromium) 2014/04/10 23:14:38 I don't think we ever do that today, so it depends
hidehiko 2014/04/11 16:28:30 Thank you for pointing this out. So, I've looked
dmichael (off chromium) 2014/04/11 17:09:17 Yes, that's right. I still think the two shouldn't
+ 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

Powered by Google App Engine
This is Rietveld 408576698