diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 01:46:27 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 01:46:27 +0000 |
commit | ea5ac0e47d18753dbe971a35cce7f657ba64bae8 (patch) | |
tree | 54713ad26e136bbb9b0bf0062229092c537df533 /webkit/glue/plugins/plugin_list.h | |
parent | eb4035b0048a7c9e3eeae7e189161f0cfbf3db22 (diff) | |
download | chromium_src-ea5ac0e47d18753dbe971a35cce7f657ba64bae8.zip chromium_src-ea5ac0e47d18753dbe971a35cce7f657ba64bae8.tar.gz chromium_src-ea5ac0e47d18753dbe971a35cce7f657ba64bae8.tar.bz2 |
This is a copy of http://codereview.chromium.org/153002/show
First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. This CL relies on another CL that contains the changes on the Native Client side: http://codereview.chromium.org/1501904. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin.5. NaCl still cannot run in Chrome sandbox, so the "--no-sandbox" flag is also required
TBR=bradnelson
Review URL: http://codereview.chromium.org/207025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_list.h')
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 7fc2b58..3840682 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -29,6 +29,7 @@ namespace NPAPI #define kDefaultPluginLibraryName FILE_PATH_LITERAL("default_plugin") #define kGearsPluginLibraryName FILE_PATH_LITERAL("gears") +#define kNaClPluginLibraryName FILE_PATH_LITERAL("internal_nacl") class PluginInstance; @@ -105,6 +106,13 @@ class PluginList { static bool CreateWebPluginInfo(const PluginVersionInfo& pvi, WebPluginInfo* info); + // Set NativeClient plugin mode (avoid loading both the built-in and + // the external version of the plugin). The arguments provide pointers + // to NaCl plugin entry points - the functions are not referenced directly + // from this class to avoid introducing dependency between Webkit glue + // library and NaCl code. + static void UseInternalNaCl(PluginEntryPoints* entry_points); + // Shutdown all plugins. Should be called at process teardown. void Shutdown(); @@ -148,6 +156,11 @@ class PluginList { bool ShouldLoadPlugin(const WebPluginInfo& info, std::vector<WebPluginInfo>* plugins); + // Returns true if we should load the given plugin, or false otherwise. + // This function is platform-specific and is called from ShouldLoadPlugin. + bool PlatformShouldLoadPlugin(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins); + // Find a plugin by mime type. // The allow_wildcard parameter controls whether this function returns // plugins which support wildcard mime types (* as the mime type) @@ -212,6 +225,9 @@ class PluginList { // Holds information about internal plugins. std::vector<PluginVersionInfo> internal_plugins_; + // true if we should use our internal Native Client plugin + bool use_internal_nacl_; + // Need synchronization for the above members since this object can be // accessed on multiple threads. Lock lock_; |