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

Unified Diff: chrome/common/pepper_plugin_registry.h

Issue 3031011: Linux: bit hacky way to ensure Pepper plugins get loaded by zygote. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebased ToT. Created 10 years, 5 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/zygote_main_linux.cc ('k') | chrome/common/pepper_plugin_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/pepper_plugin_registry.h
diff --git a/chrome/common/pepper_plugin_registry.h b/chrome/common/pepper_plugin_registry.h
index 90d0d98b28295e14cf11f7a765f83d48b909d1d1..4c212e56ea54ed21aa9be386f0e89956ef6f3790 100644
--- a/chrome/common/pepper_plugin_registry.h
+++ b/chrome/common/pepper_plugin_registry.h
@@ -13,7 +13,10 @@
#include "webkit/glue/plugins/pepper_plugin_module.h"
struct PepperPluginInfo {
- FilePath path; // Internal plugins are of the form "internal-[name]".
+ PepperPluginInfo(); // Needed to initialize |is_internal|.
+
+ bool is_internal; // Defaults to false (see constructor).
+ FilePath path; // Internal plugins have "internal-[name]" as path.
std::vector<std::string> mime_types;
std::string name;
std::string description;
@@ -31,6 +34,11 @@ class PepperPluginRegistry {
// pepper plugin modules.
static void GetList(std::vector<PepperPluginInfo>* plugins);
+ // Loads the (native) libraries but does not initialize them (i.e., does not
+ // call PPP_InitializeModule). This is needed by the zygote on Linux to get
+ // access to the plugins before entering the sandbox.
+ static void PreloadModules();
+
pepper::PluginModule* GetModule(const FilePath& path) const;
private:
@@ -38,6 +46,7 @@ class PepperPluginRegistry {
static void GetExtraPlugins(std::vector<PepperPluginInfo>* plugins);
struct InternalPluginInfo : public PepperPluginInfo {
+ InternalPluginInfo(); // Sets |is_internal|.
pepper::PluginModule::EntryPoints entry_points;
};
typedef std::vector<InternalPluginInfo> InternalPluginInfoList;
« no previous file with comments | « chrome/browser/zygote_main_linux.cc ('k') | chrome/common/pepper_plugin_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698