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

Unified Diff: chrome/ppapi_plugin/ppapi_thread.h

Issue 3915002: Out of process Pepper (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « chrome/ppapi_plugin/ppapi_process.cc ('k') | chrome/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ppapi_plugin/ppapi_thread.h
===================================================================
--- chrome/ppapi_plugin/ppapi_thread.h (revision 0)
+++ chrome/ppapi_plugin/ppapi_thread.h (revision 0)
@@ -0,0 +1,67 @@
+// Copyright (c) 2010 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 CHROME_PPAPI_PLUGIN_PPAPI_THREAD_H_
+#define CHROME_PPAPI_PLUGIN_PPAPI_THREAD_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/scoped_native_library.h"
+#include "base/scoped_ptr.h"
+#include "build/build_config.h"
+#include "chrome/common/child_thread.h"
+
+class FilePath;
+
+namespace IPC {
+class ChannelHandle;
+}
+
+namespace pp {
+namespace proxy {
+class PluginDispatcher;
+}
+}
+
+class PpapiThread : public ChildThread {
+ public:
+ PpapiThread();
+ ~PpapiThread();
+
+ private:
+ // ChildThread overrides.
+ virtual void OnMessageReceived(const IPC::Message& msg);
+
+ // Message handlers.
+ void OnLoadPlugin(const FilePath& path, int renderer_id);
+
+ bool LoadPluginLib(const FilePath& path);
+
+ // Sets up the channel to the given renderer. On success, returns true and
+ // fills the given ChannelHandle with the information from the new channel.
+ bool SetupRendererChannel(int renderer_id,
+ IPC::ChannelHandle* handle);
+
+#if defined(OS_POSIX)
+ // Close the plugin process' copy of the renderer's side of the plugin
+ // channel. This can be called after the renderer is known to have its own
+ // copy of renderer_fd_.
+ void CloseRendererFD();
+#endif
+
+ base::ScopedNativeLibrary library_;
+
+ scoped_ptr<pp::proxy::PluginDispatcher> dispatcher_;
+
+#if defined(OS_POSIX)
+ // FD for the renderer end of the socket. It is closed when the IPC layer
+ // indicates that the channel is connected, proving that the renderer has
+ // access to its side of the socket.
+ int renderer_fd_;
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(PpapiThread);
+};
+
+#endif // CHROME_PPAPI_PLUGIN_PPAPI_THREAD_H_
Property changes on: chrome/ppapi_plugin/ppapi_thread.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/ppapi_plugin/ppapi_process.cc ('k') | chrome/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698