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

Unified Diff: content/browser/mock_content_browser_client.cc

Issue 7387010: Add PluginServiceFilter interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move PluginFilter into content:: Created 9 years, 5 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: content/browser/mock_content_browser_client.cc
diff --git a/content/browser/mock_content_browser_client.cc b/content/browser/mock_content_browser_client.cc
index 1c68a244765a4b58c22519cd8236587c0ed07269..60faac8ae8ca83f10ae4cecb8c8554d0a389bf32 100644
--- a/content/browser/mock_content_browser_client.cc
+++ b/content/browser/mock_content_browser_client.cc
@@ -6,12 +6,26 @@
#include <string>
+#include "content/browser/plugin_filter.h"
#include "content/browser/webui/empty_web_ui_factory.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard.h"
#include "webkit/glue/webpreferences.h"
+namespace {
+
+class DummyPluginFilter : public content::PluginFilter {
+ public:
+ DummyPluginFilter() {}
+
+ virtual bool ShouldUsePlugin(webkit::npapi::WebPluginInfo* plugin) OVERRIDE {
+ return true;
+ }
+};
+
+} // namespace
+
namespace content {
MockContentBrowserClient::~MockContentBrowserClient() {
@@ -100,6 +114,15 @@ bool MockContentBrowserClient::AllowSaveLocalState(
return true;
}
+content::PluginFilter* MockContentBrowserClient::CreatePluginFilter(
+ int render_process_id,
+ int render_view_id,
+ const content::ResourceContext& context,
+ const GURL& url,
+ const GURL& policy_url) {
+ return new DummyPluginFilter();
+}
+
QuotaPermissionContext*
MockContentBrowserClient::CreateQuotaPermissionContext() {
return NULL;

Powered by Google App Engine
This is Rietveld 408576698