diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:39:04 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:39:04 +0000 |
commit | 28ab7f9770e0096536e5277c62f5463625f152bd (patch) | |
tree | fd7db6edfb8ad20a39944ac3d438d2ca4738c1fb /webkit/glue/plugins | |
parent | d7bb1f68d48f5939c9579fbfacd82389096b776c (diff) | |
download | chromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.zip chromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.tar.gz chromium_src-28ab7f9770e0096536e5277c62f5463625f152bd.tar.bz2 |
Change "dll" to "plugin" where appropriate.
Review URL: http://codereview.chromium.org/16543
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/nphostapi.h | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 5 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_lib.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_lib.h | 14 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 10 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 19 |
6 files changed, 29 insertions, 25 deletions
diff --git a/webkit/glue/plugins/nphostapi.h b/webkit/glue/plugins/nphostapi.h index b7814d8..3a0ab82 100644 --- a/webkit/glue/plugins/nphostapi.h +++ b/webkit/glue/plugins/nphostapi.h @@ -264,7 +264,7 @@ typedef struct _NPNetscapeFuncs { } NPNetscapeFuncs; // -// NPAPI DLL entry points +// NPAPI library entry points // typedef NPError (API_CALL * NP_InitializeFunc)(NPNetscapeFuncs* pFuncs); typedef NPError (API_CALL * NP_GetEntryPointsFunc)(NPPluginFuncs* pFuncs); diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 3be9304..60b2b91 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -760,9 +760,10 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void *value) { // variable definition. scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); if (plugin->plugin_lib()->plugin_info().file.value() == - kDefaultPluginDllName) + kDefaultPluginLibraryName) { plugin->webplugin()->OnMissingPluginStatus( variable - default_plugin::kMissingPluginStatusStart); + } break; } default: @@ -811,7 +812,7 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void *value) { DLOG(INFO) << "NPN_SetValue(NPPVJavascriptPushCallerBool) is not implemented."; return NPERR_GENERIC_ERROR; case NPPVpluginKeepLibraryInMemory: - // Tells browser that plugin dll should live longer than usual. + // Tells browser that plugin library should live longer than usual. // TODO: implement me DLOG(INFO) << "NPN_SetValue(NPPVpluginKeepLibraryInMemory) is not implemented."; return NPERR_GENERIC_ERROR; diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index 5936747..e2c0f59 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -84,7 +84,7 @@ PluginLib* PluginLib::CreatePluginLib(const FilePath& filename) { }; static const InternalPluginInfo default_plugin_info = { - {kDefaultPluginDllName, + {kDefaultPluginLibraryName, L"Default Plug-in", L"Provides functionality for installing third-party plug-ins", L"1, 0, 0, 1", @@ -339,7 +339,7 @@ class FreePluginLibraryTask : public Task { void PluginLib::Unload() { if (!internal_ && module_) { // In case of single process mode, a plugin can delete itself - // by executing a script. So delay the unloading of the DLL + // by executing a script. So delay the unloading of the library // so that the plugin will have a chance to unwind. bool defer_unload = webkit_glue::IsPluginRunningInRendererProcess(); diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h index 11b3498..cd3db97 100644 --- a/webkit/glue/plugins/plugin_lib.h +++ b/webkit/glue/plugins/plugin_lib.h @@ -24,7 +24,7 @@ namespace NPAPI class PluginInstance; -// This struct fully describes a plugin. For dll plugins, it's read in from +// 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. struct PluginVersionInfo { std::wstring file_name; @@ -52,7 +52,7 @@ class PluginLib : public base::RefCounted<PluginLib> { virtual ~PluginLib(); static PluginLib* CreatePluginLib(const FilePath& filename); - // Unloads all the loaded plugin dlls and cleans up the plugin map. + // Unloads all the loaded plugin libraries and cleans up the plugin map. static void UnloadAllPlugins(); // Shuts down all loaded plugin instances. @@ -97,22 +97,22 @@ class PluginLib : public base::RefCounted<PluginLib> { private: // Creates a new PluginLib. The WebPluginInfo object is owned by this // object. If internal_plugin_info is not NULL, this Lib is an internal - // plugin thus doesn't need to load dll. + // plugin thus doesn't need to load a library. PluginLib(WebPluginInfo* info, const InternalPluginInfo* internal_plugin_info); - // Attempts to load the plugin from the DLL. + // Attempts to load the plugin from the library. // Returns true if it is a legitimate plugin, false otherwise bool Load(); - // Unloading the plugin DLL. + // Unloads the plugin library. void Unload(); - // Shutdown the plugin DLL. + // Shutdown the plugin library. void Shutdown(); // Returns a WebPluginInfo structure given a plugin's path. Returns NULL if - // the dll couldn't be found, or if it's not a plugin. + // the library couldn't be found, or if it's not a plugin. static WebPluginInfo* ReadWebPluginInfo(const FilePath &filename); // Creates WebPluginInfo structure based on read in or built in // PluginVersionInfo. diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index a41f800..f969874 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -123,7 +123,7 @@ void PluginList::LoadPlugins(bool refresh) { if (webkit_glue::IsDefaultPluginEnabled()) { scoped_refptr<PluginLib> default_plugin = PluginLib::CreatePluginLib( - FilePath(kDefaultPluginDllName)); + FilePath(kDefaultPluginLibraryName)); plugins_.push_back(default_plugin); } @@ -332,7 +332,7 @@ bool PluginList::GetPluginInfo(const GURL& url, allow_wildcard); if (plugin.get() == NULL || - (plugin->plugin_info().file.value() == kDefaultPluginDllName + (plugin->plugin_info().file.value() == kDefaultPluginLibraryName && clsid.empty())) { scoped_refptr<PluginLib> default_plugin = plugin; plugin = FindPlugin(url, actual_mime_type); @@ -348,11 +348,11 @@ bool PluginList::GetPluginInfo(const GURL& url, return true; } -bool PluginList::GetPluginInfoByDllPath(const FilePath& dll_path, - WebPluginInfo* info) { +bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, + WebPluginInfo* info) { for (size_t i = 0; i < plugins_.size(); ++i) { if (wcsicmp(plugins_[i]->plugin_info().file.value().c_str(), - dll_path.value().c_str()) == 0) { + plugin_path.value().c_str()) == 0) { *info = plugins_[i]->plugin_info(); return true; } diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index d2cab7d..ebdb687 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -31,15 +31,18 @@ namespace NPAPI #define kActivexShimFileNameForMediaPlayer \ L"Microsoft� Windows Media Player Firefox Plugin" -#define kDefaultPluginDllName L"default_plugin" +#define kDefaultPluginLibraryName L"default_plugin" class PluginLib; class PluginInstance; -// The PluginList is responsible for loading our NPAPI based plugins. -// It loads plugins from a known directory by looking for DLLs -// which start with "NP", and checking to see if they are valid -// NPAPI libraries. +// The PluginList is responsible for loading our NPAPI based plugins. It does +// so in whatever manner is appropriate for the platform. On Windows, it loads +// plugins from a known directory by looking for DLLs which start with "NP", +// and checking to see if they are valid NPAPI libraries. On the Mac, it walks +// the machine-wide and user plugin directories and loads anything that has +// the correct types. On Linux, it walks the plugin directories as well +// (e.g. /usr/lib/browser-plugins/). class PluginList : public base::RefCounted<PluginList> { public: // Gets the one instance of the PluginList. @@ -102,10 +105,10 @@ class PluginList : public base::RefCounted<PluginList> { WebPluginInfo* info, std::string* actual_mime_type); - // Get plugin info by plugin dll path. Returns true if the plugin is found and + // Get plugin info by plugin path. Returns true if the plugin is found and // WebPluginInfo has been filled in |info| - bool GetPluginInfoByDllPath(const FilePath& dll_path, - WebPluginInfo* info); + bool GetPluginInfoByPath(const FilePath& plugin_path, + WebPluginInfo* info); private: // Constructors are private for singletons PluginList(); |