summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_lib.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 22:47:34 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 22:47:34 +0000
commit51048c068d9c273b9976c057832025347f5de4e9 (patch)
tree147d37c49af4ea3124113f4712221ed5dd8dabf6 /webkit/glue/plugins/plugin_lib.h
parentd16d8e951b82049c22d8604851c91a59194545f8 (diff)
downloadchromium_src-51048c068d9c273b9976c057832025347f5de4e9.zip
chromium_src-51048c068d9c273b9976c057832025347f5de4e9.tar.gz
chromium_src-51048c068d9c273b9976c057832025347f5de4e9.tar.bz2
Mac default plugin.
Review URL: http://codereview.chromium.org/18394 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_lib.h')
-rw-r--r--webkit/glue/plugins/plugin_lib.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h
index c7817cc..3febcf5 100644
--- a/webkit/glue/plugins/plugin_lib.h
+++ b/webkit/glue/plugins/plugin_lib.h
@@ -25,6 +25,26 @@ namespace NPAPI
class PluginInstance;
+// This struct fully describes a plugin. For external plugins, it's read in from
+// the version info of the dll; For internal plugins, it's predefined and
+// includes addresses of entry functions. (Yes, it's Win32 NPAPI-centric, but
+// it'll do for holding descriptions of internal plugins cross-platform.)
+struct PluginVersionInfo {
+ const FilePath::CharType* path;
+ // Info about the plugin itself.
+ const wchar_t* product_name;
+ const wchar_t* file_description;
+ const wchar_t* file_version;
+ // Info about the data types that the plugin supports.
+ const wchar_t* mime_types;
+ const wchar_t* file_extensions;
+ const wchar_t* type_descriptions;
+ // Entry points for internal plugins, NULL for external ones.
+ NP_GetEntryPointsFunc np_getentrypoints;
+ NP_InitializeFunc np_initialize;
+ NP_ShutdownFunc np_shutdown;
+};
+
// A PluginLib is a single NPAPI Plugin Library, and is the lifecycle
// manager for new PluginInstances.
class PluginLib : public base::RefCounted<PluginLib> {
@@ -91,6 +111,13 @@ class PluginLib : public base::RefCounted<PluginLib> {
// Shutdown the plugin library.
void Shutdown();
+ // Populate a WebPluginInfo from a PluginVersionInfo.
+ static bool CreateWebPluginInfo(const PluginVersionInfo& pvi,
+ WebPluginInfo* info,
+ NP_GetEntryPointsFunc* np_getentrypoints,
+ NP_InitializeFunc* np_initialize,
+ NP_ShutdownFunc* np_shutdown);
+
public:
#if defined(OS_WIN)
typedef HMODULE NativeLibrary;