summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:43:44 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-11 00:43:44 +0000
commitf99c73ade9f93c7257e74992f2e540cb8319c1ad (patch)
tree3f5683ab851f1dceaef14a8f17fcdbac162ba84b /webkit
parent036d83894fc084e0d05cc98fcf992505800f0c8c (diff)
downloadchromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.zip
chromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.tar.gz
chromium_src-f99c73ade9f93c7257e74992f2e540cb8319c1ad.tar.bz2
glue: deprecate npapi::PluginVersionInfo
Add new entry points to RegisterInternalPlugin that take the appropriate arguments. Currently they just call into the old version of the function. I intend to remove this function completely, but NaCl still depends on the existing API, so this is the first change while I shuffle depedencies around. TEST=compiles Review URL: http://codereview.chromium.org/6161004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/npapi/plugin_list.cc25
-rw-r--r--webkit/plugins/npapi/plugin_list.h10
2 files changed, 35 insertions, 0 deletions
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc
index 766199e..b2598a7 100644
--- a/webkit/plugins/npapi/plugin_list.cc
+++ b/webkit/plugins/npapi/plugin_list.cc
@@ -225,6 +225,31 @@ void PluginList::RegisterInternalPlugin(const PluginVersionInfo& info) {
internal_plugins_.push_back(info);
}
+void PluginList::RegisterInternalPlugin(const FilePath& path) {
+ webkit::npapi::PluginVersionInfo info;
+ info.path = path;
+ memset(&info.entry_points, 0, sizeof(info.entry_points));
+ RegisterInternalPlugin(info);
+}
+
+void PluginList::RegisterInternalPlugin(const FilePath& filename,
+ const std::string& name,
+ const std::string& description,
+ const std::string& mime_type,
+ const PluginEntryPoints& entry_points) {
+ webkit::npapi::PluginVersionInfo info = {
+ filename,
+ ASCIIToWide(name),
+ ASCIIToWide(description),
+ L"1",
+ ASCIIToWide(mime_type),
+ L"",
+ L"",
+ entry_points
+ };
+ RegisterInternalPlugin(info);
+}
+
void PluginList::UnregisterInternalPlugin(const FilePath& path) {
AutoLock lock(lock_);
for (size_t i = 0; i < internal_plugins_.size(); i++) {
diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h
index 94124a2..553b554 100644
--- a/webkit/plugins/npapi/plugin_list.h
+++ b/webkit/plugins/npapi/plugin_list.h
@@ -47,6 +47,7 @@ struct PluginEntryPoints {
// 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.)
+// TODO(evan): remove when NaCl is fixed.
struct PluginVersionInfo {
FilePath path;
// Info about the plugin itself.
@@ -99,6 +100,15 @@ class PluginList {
// Register an internal plugin with the specified plugin information and
// function pointers. An internal plugin must be registered before it can
// be loaded using PluginList::LoadPlugin().
+ void RegisterInternalPlugin(const FilePath& path);
+ void RegisterInternalPlugin(const FilePath& filename,
+ const std::string& name,
+ const std::string& description,
+ const std::string& mime_type,
+ const PluginEntryPoints& entry_points);
+
+ // Deprecated version of the above.
+ // TODO(evan): remove when NaCl is fixed.
void RegisterInternalPlugin(const PluginVersionInfo& info);
// Removes a specified internal plugin from the list. The search will match