Chromium Code Reviews| Index: content/test/test_plugin_service.cc |
| diff --git a/content/test/test_plugin_service.cc b/content/test/test_plugin_service.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6d8a827385a2b0e7ac0d5474570679a110b8def5 |
| --- /dev/null |
| +++ b/content/test/test_plugin_service.cc |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
|
jam
2011/11/08 23:12:57
why do we need a testpluginservice?
the testing p
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/test/test_plugin_service.h" |
| + |
| +#include "base/bind.h" |
| +#include "base/message_loop.h" |
| +#include "webkit/plugins/npapi/plugin_group.h" |
| +#include "webkit/plugins/npapi/plugin_list.h" |
| +#include "webkit/plugins/webplugininfo.h" |
| + |
| +TestPluginService::TestPluginService(webkit::npapi::PluginList* plugin_list) |
| + : PluginService() { |
| + SetPluginListForTesting(plugin_list); |
| + Init(); |
| +} |
| + |
| +TestPluginService::~TestPluginService() { |
| +} |
| + |
| +void TestPluginService::GetPlugins(const GetPluginsCallback& cb) { |
| + std::vector<webkit::WebPluginInfo> plugins; |
| + plugin_list()->GetPlugins(&plugins); |
| + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(cb, plugins)); |
| +} |
| + |
| +void TestPluginService::GetPluginGroups(const GetPluginGroupsCallback& cb) { |
| + std::vector<webkit::npapi::PluginGroup> groups; |
| + plugin_list()->GetPluginGroups(true, &groups); |
| + MessageLoop::current()->PostTask(FROM_HERE, base::Bind(cb, groups)); |
| +} |