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

Unified Diff: components/nacl/renderer/trusted_plugin_channel.h

Issue 131413009: Prototype: Use Chromium IPC for plugin LOAD_MODULE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, some FIXMEs cleaned up Created 6 years, 10 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: 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_

Powered by Google App Engine
This is Rietveld 408576698