diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 01:53:24 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 01:53:24 +0000 |
commit | 8ff260907719175f91a380fba3f6114af23725dd (patch) | |
tree | 71cbfd4960535bcbb71ca06c82e013d19c50e605 /webkit/glue/plugins/plugin_lib_mac.mm | |
parent | a6c712d9b9f2459273ad7616e03ee5f823d539ca (diff) | |
download | chromium_src-8ff260907719175f91a380fba3f6114af23725dd.zip chromium_src-8ff260907719175f91a380fba3f6114af23725dd.tar.gz chromium_src-8ff260907719175f91a380fba3f6114af23725dd.tar.bz2 |
Make adding internal plugins easier (and allow it to be dynamic). This code also cleans up the internal plugin handling some more.
Review URL: http://codereview.chromium.org/19443
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_lib_mac.mm')
-rw-r--r-- | webkit/glue/plugins/plugin_lib_mac.mm | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm index bfd5a13f..7fcb41a3 100644 --- a/webkit/glue/plugins/plugin_lib_mac.mm +++ b/webkit/glue/plugins/plugin_lib_mac.mm @@ -11,7 +11,6 @@ #include "base/scoped_cftyperef.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" -#include "webkit/default_plugin/plugin_main.h" #include "webkit/glue/plugins/plugin_list.h" static const short kSTRTypeDefinitionResourceID = 128; @@ -21,21 +20,6 @@ static const short kSTRPluginDescriptionResourceID = 126; namespace NPAPI { -static const PluginVersionInfo g_internal_plugins[] = { - { - kDefaultPluginLibraryName, - L"Default Plug-in", - L"Provides functionality for installing third-party plug-ins", - L"1.0", - L"*", - L"", - L"", - default_plugin::NP_GetEntryPoints, - default_plugin::NP_Initialize, - default_plugin::NP_Shutdown - }, -}; - /* static */ PluginLib::NativeLibrary PluginLib::LoadNativeLibrary( const FilePath& library_path) { @@ -258,21 +242,7 @@ bool ReadSTRPluginInfo(const FilePath& filename, CFBundleRef bundle, } // anonymous namespace bool PluginLib::ReadWebPluginInfo(const FilePath &filename, - WebPluginInfo* info, - NP_GetEntryPointsFunc* np_getentrypoints, - NP_InitializeFunc* np_initialize, - NP_ShutdownFunc* np_shutdown) { - for (int i = 0; i < arraysize(g_internal_plugins); ++i) { - if (filename.value() == g_internal_plugins[i].path) { - return CreateWebPluginInfo(g_internal_plugins[i], info, np_getentrypoints, - np_initialize, np_shutdown); - } - } - - *np_getentrypoints = NULL; - *np_initialize = NULL; - *np_shutdown = NULL; - + WebPluginInfo* info) { // There are two ways to get information about plugin capabilities. One is an // Info.plist set of keys, documented at // http://developer.apple.com/documentation/InternetWeb/Conceptual/WebKit_PluginProgTopic/Concepts/AboutPlugins.html . |