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

Unified Diff: chrome/ppapi_plugin/ppapi_thread.h

Issue 6486034: Share PPAPI out-of-process plugins between renderer processes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/browser/renderer_host/render_message_filter.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 74733)
+++ chrome/ppapi_plugin/ppapi_thread.h (working copy)
@@ -12,6 +12,8 @@
#include "base/scoped_ptr.h"
#include "build/build_config.h"
#include "chrome/common/child_thread.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/proxy/dispatcher.h"
class FilePath;
@@ -35,35 +37,27 @@
virtual bool OnMessageReceived(const IPC::Message& msg);
// Message handlers.
- void OnMsgLoadPlugin(base::ProcessHandle renderer_handle,
- const FilePath& path,
- int renderer_id);
+ void OnMsgLoadPlugin(const FilePath& path);
+ void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
+ int renderer_id);
- bool LoadPluginLib(base::ProcessHandle host_process_handle,
- 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,
+ bool SetupRendererChannel(base::ProcessHandle host_process_handle,
+ 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_;
+ pp::proxy::Dispatcher::GetInterfaceFunc get_plugin_interface_;
-#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
+ // Local concept of the module ID. Some functions take this. It's necessary
+ // for the in-process PPAPI to handle this properly, but for proxied it's
+ // unnecessary. The proxy talking to multiple renderers means that each
+ // renderer has a different idea of what the module ID is for this plugin.
+ // To force people to "do the right thing" we generate a random module ID
+ // and pass it around as necessary.
+ PP_Module local_pp_module_;
DISALLOW_COPY_AND_ASSIGN(PpapiThread);
};
« no previous file with comments | « chrome/browser/renderer_host/render_message_filter.cc ('k') | chrome/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698