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

Unified Diff: chrome/browser/plugin_service.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/plugin_data_remover.cc ('k') | chrome/browser/plugin_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_service.h
===================================================================
--- chrome/browser/plugin_service.h (revision 74733)
+++ chrome/browser/plugin_service.h (working copy)
@@ -20,6 +20,7 @@
#include "base/synchronization/waitable_event_watcher.h"
#include "build/build_config.h"
#include "chrome/browser/plugin_process_host.h"
+#include "chrome/browser/ppapi_plugin_process_host.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -46,8 +47,9 @@
}
class MessageLoop;
+struct PepperPluginInfo;
+class PluginDirWatcherDelegate;
class Profile;
-class PluginDirWatcherDelegate;
class ResourceDispatcherHost;
namespace net {
@@ -89,22 +91,28 @@
// Returns the plugin process host corresponding to the plugin process that
// has been started by this service. Returns NULL if no process has been
// started.
- PluginProcessHost* FindPluginProcess(const FilePath& plugin_path);
+ PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path);
+ PpapiPluginProcessHost* FindPpapiPluginProcess(const FilePath& plugin_path);
// Returns the plugin process host corresponding to the plugin process that
// has been started by this service. This will start a process to host the
// 'plugin_path' if needed. If the process fails to start, the return value
// is NULL. Must be called on the IO thread.
- PluginProcessHost* FindOrStartPluginProcess(const FilePath& plugin_path);
+ PluginProcessHost* FindOrStartNpapiPluginProcess(
+ const FilePath& plugin_path);
+ PpapiPluginProcessHost* FindOrStartPpapiPluginProcess(
+ const FilePath& plugin_path);
// Opens a channel to a plugin process for the given mime type, starting
// a new plugin process if necessary. This must be called on the IO thread
// or else a deadlock can occur.
- void OpenChannelToPlugin(int render_process_id,
- int render_view_id,
- const GURL& url,
- const std::string& mime_type,
- PluginProcessHost::Client* client);
+ void OpenChannelToNpapiPlugin(int render_process_id,
+ int render_view_id,
+ const GURL& url,
+ const std::string& mime_type,
+ PluginProcessHost::Client* client);
+ void OpenChannelToPpapiPlugin(const FilePath& path,
+ PpapiPluginProcessHost::Client* client);
// Gets the first allowed plugin in the list of plugins that matches
// the given url and mime type. Must be called on the FILE thread.
@@ -170,10 +178,6 @@
FilePathWatcher::Delegate* delegate);
#endif
- // mapping between plugin path and PluginProcessHost
- typedef base::hash_map<FilePath, PluginProcessHost*> PluginMap;
- PluginMap plugin_hosts_;
-
// The main thread's message loop.
MessageLoop* main_message_loop_;
@@ -212,6 +216,8 @@
scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_;
#endif
+ std::vector<PepperPluginInfo> ppapi_plugins_;
+
// Set to true if chrome plugins are enabled. Defaults to true.
static bool enable_chrome_plugins_;
« no previous file with comments | « chrome/browser/plugin_data_remover.cc ('k') | chrome/browser/plugin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698