Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: webkit/plugins/npapi/plugin_list.h

Issue 7648017: Make WebPluginInfo more generic (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/npapi/plugin_lib.cc ('k') | webkit/plugins/npapi/plugin_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_list.h
===================================================================
--- webkit/plugins/npapi/plugin_list.h (revision 96613)
+++ webkit/plugins/npapi/plugin_list.h (working copy)
@@ -17,7 +17,7 @@
#include "base/synchronization/lock.h"
#include "third_party/npapi/bindings/nphostapi.h"
#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/plugins/webplugininfo.h"
class GURL;
@@ -80,7 +80,7 @@
// Register an internal plugin with the specified plugin information.
// An internal plugin must be registered before it can
// be loaded using PluginList::LoadPlugin().
- void RegisterInternalPlugin(const WebPluginInfo& info);
+ void RegisterInternalPlugin(const webkit::WebPluginInfo& info);
// This second version is for "plugins" that have been compiled
// directly into the binary -- callers must provide the metadata and
@@ -105,20 +105,21 @@
// internally-owned PluginEntryPoints pointer.
// Returns false if the library couldn't be found, or if it's not a plugin.
bool ReadPluginInfo(const FilePath& filename,
- WebPluginInfo* info,
+ webkit::WebPluginInfo* info,
const PluginEntryPoints** entry_points);
// In Windows plugins, the mime types are passed as a specially formatted list
// of strings. This function parses those strings into a WebPluginMimeType
// vector.
// TODO(evan): move this code into plugin_list_win.
- static bool ParseMimeTypes(const std::string& mime_types,
- const std::string& file_extensions,
- const string16& mime_type_descriptions,
- std::vector<WebPluginMimeType>* parsed_mime_types);
+ static bool ParseMimeTypes(
+ const std::string& mime_types,
+ const std::string& file_extensions,
+ const string16& mime_type_descriptions,
+ std::vector<webkit::WebPluginMimeType>* parsed_mime_types);
// Get all the plugins.
- void GetPlugins(std::vector<WebPluginInfo>* plugins);
+ void GetPlugins(std::vector<webkit::WebPluginInfo>* plugins);
// Returns a list in |info| containing plugins that are found for
// the given url and mime type (including disabled plugins, for
@@ -137,13 +138,13 @@
const std::string& mime_type,
bool allow_wildcard,
bool* use_stale,
- std::vector<WebPluginInfo>* info,
+ std::vector<webkit::WebPluginInfo>* info,
std::vector<std::string>* actual_mime_types);
// Get plugin info by plugin path (including disabled plugins). Returns true
// if the plugin is found and WebPluginInfo has been filled in |info|.
bool GetPluginInfoByPath(const FilePath& plugin_path,
- WebPluginInfo* info);
+ webkit::WebPluginInfo* info);
// Populates the given vector with all available plugin groups.
void GetPluginGroups(bool load_if_necessary,
@@ -157,7 +158,8 @@
// call to |GetPlugins()|, |GetEnabledPlugins()|, |GetPluginInfoArray()|,
// |GetPluginInfoByPath()|, or |GetPluginGroups(true, _)|. It is the caller's
// responsibility to make sure this doesn't happen.
- const PluginGroup* GetPluginGroup(const WebPluginInfo& web_plugin_info);
+ const PluginGroup* GetPluginGroup(
+ const webkit::WebPluginInfo& web_plugin_info);
// Returns the name of the PluginGroup with the given identifier.
// If no such group exists, an empty string is returned.
@@ -166,7 +168,8 @@
// Returns the identifier string of the PluginGroup corresponding to the given
// WebPluginInfo. If no such group exists, it is created and added to the
// cache.
- std::string GetPluginGroupIdentifier(const WebPluginInfo& web_plugin_info);
+ std::string GetPluginGroupIdentifier(
+ const webkit::WebPluginInfo& web_plugin_info);
// Load a specific plugin with full path.
void LoadPlugin(const FilePath& filename,
@@ -206,7 +209,7 @@
// Adds the given WebPluginInfo to its corresponding group, creating it if
// necessary, and returns the group.
// Callers need to protect calls to this method by a lock themselves.
- PluginGroup* AddToPluginGroups(const WebPluginInfo& web_plugin_info,
+ PluginGroup* AddToPluginGroups(const webkit::WebPluginInfo& web_plugin_info,
ScopedVector<PluginGroup>* plugin_groups);
private:
@@ -240,7 +243,7 @@
// Returns true if we should load the given plugin, or false otherwise.
// plugins is the list of plugins we have crawled in the current plugin
// loading run.
- bool ShouldLoadPlugin(const WebPluginInfo& info,
+ bool ShouldLoadPlugin(const webkit::WebPluginInfo& info,
ScopedVector<PluginGroup>* plugins);
// Return whether a plug-in group with the given name should be disabled,
@@ -251,7 +254,7 @@
// Returns true if the plugin supports |mime_type|. |mime_type| should be all
// lower case.
- bool SupportsType(const WebPluginInfo& plugin,
+ bool SupportsType(const webkit::WebPluginInfo& plugin,
const std::string& mime_type,
bool allow_wildcard);
@@ -259,7 +262,7 @@
// |extension| should be all lower case. If |mime_type| is not NULL, it will
// be set to the MIME type if found. The MIME type which corresponds to the
// extension is optionally returned back.
- bool SupportsExtension(const WebPluginInfo& plugin,
+ bool SupportsExtension(const webkit::WebPluginInfo& plugin,
const std::string& extension,
std::string* actual_mime_type);
@@ -298,7 +301,7 @@
std::vector<FilePath> extra_plugin_dirs_;
struct InternalPlugin {
- WebPluginInfo info;
+ webkit::WebPluginInfo info;
PluginEntryPoints entry_points;
};
// Holds information about internal plugins.
« no previous file with comments | « webkit/plugins/npapi/plugin_lib.cc ('k') | webkit/plugins/npapi/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698