Chromium Code Reviews| Index: content/shell/shell_plugin_service_filter.cc |
| diff --git a/content/shell/shell_plugin_service_filter.cc b/content/shell/shell_plugin_service_filter.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bd26bbc82b525313e580c35e15a840a10f0b3d78 |
| --- /dev/null |
| +++ b/content/shell/shell_plugin_service_filter.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/shell/shell_plugin_service_filter.h" |
| + |
| +#include "base/utf_string_conversions.h" |
| +#include "webkit/plugins/webplugininfo.h" |
| + |
| +namespace content { |
| + |
| +ShellPluginServiceFilter::ShellPluginServiceFilter() {} |
| + |
| +ShellPluginServiceFilter::~ShellPluginServiceFilter() {} |
| + |
| +bool ShellPluginServiceFilter::IsPluginAvailable( |
| + int render_process_id, |
| + int render_view_id, |
| + const void* context, |
| + const GURL& url, |
| + const GURL& policy_url, |
| + webkit::WebPluginInfo* plugin) { |
| + if (plugin->name == ASCIIToUTF16("WebKit Test PlugIn") || |
| + plugin->name == ASCIIToUTF16("NPAPI Test Plugin")) { |
| + return true; |
| + } |
| + return false; |
|
abarth-chromium
2013/05/28 07:56:13
Why not just:
return plugin->name == ASCIIToUTF16
|
| +} |
| + |
| +bool ShellPluginServiceFilter::CanLoadPlugin(int render_process_id, |
| + const base::FilePath& path) { |
| + return true; |
| +} |
| + |
| +} // namespace content |