OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
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 "webkit/plugins/npapi/mock_plugin_list.h" | |
6 | |
7 namespace webkit { | |
8 namespace npapi { | |
9 | |
10 MockPluginList::MockPluginList() { | |
11 } | |
12 | |
13 MockPluginList::~MockPluginList() { | |
14 } | |
15 | |
16 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) { | |
17 plugins_to_load_.push_back(plugin); | |
18 } | |
19 | |
20 void MockPluginList::ClearPluginsToLoad() { | |
21 plugins_to_load_.clear(); | |
22 } | |
23 | |
24 bool MockPluginList::GetPluginsNoRefresh( | |
25 std::vector<webkit::WebPluginInfo>* plugins) { | |
26 GetPlugins(plugins); | |
27 return true; | |
28 } | |
29 | |
30 void MockPluginList::LoadPluginsIntoPluginListInternal( | |
31 std::vector<webkit::WebPluginInfo>* plugins) { | |
32 for (size_t i = 0; i < plugins_to_load_.size(); ++i) { | |
33 plugins->push_back(plugins_to_load_[i]); | |
34 } | |
35 } | |
36 | |
37 } // npapi | |
38 } // webkit | |
OLD | NEW |