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

Side by Side Diff: content/test/test_plugin_service.cc

Issue 8493019: Refactor PluginService to take PluginList as a dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init() Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // 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
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/test/test_plugin_service.h"
6
7 #include "base/bind.h"
8 #include "base/message_loop.h"
9 #include "webkit/plugins/npapi/plugin_group.h"
10 #include "webkit/plugins/npapi/plugin_list.h"
11 #include "webkit/plugins/webplugininfo.h"
12
13 TestPluginService::TestPluginService(webkit::npapi::PluginList* plugin_list)
14 : PluginService() {
15 SetPluginListForTesting(plugin_list);
16 Init();
17 }
18
19 TestPluginService::~TestPluginService() {
20 }
21
22 void TestPluginService::GetPlugins(const GetPluginsCallback& cb) {
23 std::vector<webkit::WebPluginInfo> plugins;
24 plugin_list()->GetPlugins(&plugins);
25 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(cb, plugins));
26 }
27
28 void TestPluginService::GetPluginGroups(const GetPluginGroupsCallback& cb) {
29 std::vector<webkit::npapi::PluginGroup> groups;
30 plugin_list()->GetPluginGroups(true, &groups);
31 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(cb, groups));
32 }
OLDNEW
« content/browser/plugin_service.cc ('K') | « content/test/test_plugin_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698