Index: components/nacl/renderer/trusted_plugin_channel.h |
diff --git a/components/nacl/renderer/trusted_plugin_channel.h b/components/nacl/renderer/trusted_plugin_channel.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bb9f41b4530a2fb628840a9cfc3e058164308b55 |
--- /dev/null |
+++ b/components/nacl/renderer/trusted_plugin_channel.h |
@@ -0,0 +1,37 @@ |
+// Copyright (c) 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. |
+ |
+#ifndef COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_ |
+#define COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "base/synchronization/waitable_event.h" |
+#include "ipc/ipc_channel_handle.h" |
+#include "ipc/ipc_listener.h" |
+#include "ipc/ipc_sync_channel.h" |
+#include "ppapi/c/pp_completion_callback.h" |
+ |
+namespace nacl { |
+ |
+class TrustedPluginChannel : public IPC::Listener { |
+ public: |
+ TrustedPluginChannel(const IPC::ChannelHandle& handle, |
+ PP_CompletionCallback connected_callback); |
+ |
+ bool Send(IPC::Message* message); |
+ |
+ // Listener implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
+ virtual void OnChannelError() OVERRIDE; |
+ |
+ private: |
+ scoped_ptr<IPC::SyncChannel> channel_; |
+ PP_CompletionCallback connected_callback_; |
+ base::WaitableEvent shutdown_event_; |
+}; |
+ |
+} // namespace nacl |
+ |
+#endif // COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_ |