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

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

Issue 7041005: Content settings extension API: Implement ContentSetting.getResourceIdentifiers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 6 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
Index: webkit/plugins/npapi/stub_plugin_list.h
diff --git a/webkit/plugins/npapi/stub_plugin_list.h b/webkit/plugins/npapi/stub_plugin_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c7593fefe4cb5aa790bbd8111f899465d1bda01
--- /dev/null
+++ b/webkit/plugins/npapi/stub_plugin_list.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
jam 2011/06/14 16:39:56 nit: i think MockPluginList would be more consiste
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_PLUGINS_NPAPI_STUB_PLUGIN_LIST_H_
+#define WEBKIT_PLUGINS_NPAPI_STUB_PLUGIN_LIST_H_
+
+#include "webkit/plugins/npapi/plugin_list.h"
+
+namespace webkit {
+namespace npapi {
+
+// A PluginList for tests that avoids file system IO. There is also no reason
+// to use |lock_| (but it doesn't hurt either).
+class StubPluginList : public PluginList {
+ public:
+ StubPluginList(const PluginGroupDefinition* group_definitions,
+ size_t num_group_definitions);
+ virtual ~StubPluginList();
+
+ void AddPluginToLoad(const WebPluginInfo& plugin);
+ void ClearPluginsToLoad();
+
+ private:
+ std::vector<WebPluginInfo> plugins_to_load_;
+
+ // PluginList methods:
+ virtual void LoadPluginsInternal(
+ ScopedVector<PluginGroup>* plugin_groups) OVERRIDE;
+};
+
+} // npapi
+} // webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_STUB_PLUGIN_LIST_H_

Powered by Google App Engine
This is Rietveld 408576698