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

Unified Diff: webkit/glue/plugins/plugin_group.h

Issue 5783005: PluginList: Unit tests and bugfixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « no previous file | webkit/glue/plugins/plugin_group.cc » ('j') | webkit/glue/plugins/plugin_group.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_group.h
diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/glue/plugins/plugin_group.h
index 2c4951cc821d4440e3db9fc950a271a381e8b056..0ac3fa01a8b2729aafee43b1d8c97b043186cd50 100644
--- a/webkit/glue/plugins/plugin_group.h
+++ b/webkit/glue/plugins/plugin_group.h
@@ -24,6 +24,9 @@ struct WebPluginInfo;
namespace NPAPI {
class PluginList;
};
+namespace plugin_test_internal {
+class TestablePluginList;
+}
// Hard-coded version ranges for plugin groups.
struct VersionRangeDefinition {
@@ -110,6 +113,8 @@ class PluginGroup {
// Returns the positions of the plugins in the group.
std::vector<int>& GetPluginPositions();
+ bool IsEmpty();
+
// Enables/disables this group. This enables/disables all plugins in the
// group.
void Enable(bool enable);
@@ -152,6 +157,7 @@ class PluginGroup {
typedef std::map<std::string, PluginGroup*> PluginMap;
friend class NPAPI::PluginList;
+ friend class plugin_test_internal::TestablePluginList;
friend class PluginGroupTest;
friend class TableModelArrayControllerTest;
friend class PluginExceptionsTableModelTest;
@@ -198,6 +204,9 @@ class PluginGroup {
// enabled one, or if all plugins are disabled, simply the first one.
void UpdateActivePlugin(const WebPluginInfo& plugin);
+ // Used by tests to override the default PluginList singleton.
+ NPAPI::PluginList* GetPluginList();
+
static std::set<string16>* policy_disabled_plugin_patterns_;
std::string identifier_;
@@ -210,6 +219,7 @@ class PluginGroup {
scoped_ptr<Version> version_;
std::list<WebPluginInfo> web_plugin_infos_;
std::vector<int> web_plugin_positions_;
+ NPAPI::PluginList* plugin_list_;
};
#endif // WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_
« no previous file with comments | « no previous file | webkit/glue/plugins/plugin_group.cc » ('j') | webkit/glue/plugins/plugin_group.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698