summaryrefslogtreecommitdiffstats
path: root/chrome/common/pepper_plugin_registry.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 17:35:07 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 17:35:07 +0000
commit177730472a38fc47e58053374740324cbb86960c (patch)
tree4d4e341fb9c307ea39bf4bf9b4733001cc36a263 /chrome/common/pepper_plugin_registry.h
parent8eb8a60ba65bfafada0996bd5b844caf59ae9ebe (diff)
downloadchromium_src-177730472a38fc47e58053374740324cbb86960c.zip
chromium_src-177730472a38fc47e58053374740324cbb86960c.tar.gz
chromium_src-177730472a38fc47e58053374740324cbb86960c.tar.bz2
Linux: bit hacky way to ensure Pepper plugins get loaded by zygote.
BUG=49702 TEST=Integrated PDF plugin should work on Linux Chrome, and --register-pepper-plugins works on Linux even with sandbox enabled. Review URL: http://codereview.chromium.org/3031011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/pepper_plugin_registry.h')
-rw-r--r--chrome/common/pepper_plugin_registry.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/common/pepper_plugin_registry.h b/chrome/common/pepper_plugin_registry.h
index 90d0d98..4c212e5 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;