| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/plugins/npapi/mock_plugin_list.h" | 5 #include "webkit/plugins/npapi/mock_plugin_list.h" |
| 6 | 6 |
| 7 namespace webkit { | 7 namespace webkit { |
| 8 namespace npapi { | 8 namespace npapi { |
| 9 | 9 |
| 10 MockPluginList::MockPluginList() |
| 11 : PluginList(1) { |
| 12 } |
| 13 |
| 10 MockPluginList::MockPluginList(const PluginGroupDefinition* group_definitions, | 14 MockPluginList::MockPluginList(const PluginGroupDefinition* group_definitions, |
| 11 size_t num_group_definitions) : | 15 size_t num_group_definitions) : |
| 12 PluginList(group_definitions, num_group_definitions) { | 16 PluginList(group_definitions, num_group_definitions) { |
| 13 } | 17 } |
| 14 | 18 |
| 15 MockPluginList::~MockPluginList() { | 19 MockPluginList::~MockPluginList() { |
| 16 } | 20 } |
| 17 | 21 |
| 18 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) { | 22 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) { |
| 19 plugins_to_load_.push_back(plugin); | 23 plugins_to_load_.push_back(plugin); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 38 | 42 |
| 39 void MockPluginList::LoadPluginsIntoPluginListInternal( | 43 void MockPluginList::LoadPluginsIntoPluginListInternal( |
| 40 std::vector<webkit::WebPluginInfo>* plugins) { | 44 std::vector<webkit::WebPluginInfo>* plugins) { |
| 41 for (size_t i = 0; i < plugins_to_load_.size(); ++i) { | 45 for (size_t i = 0; i < plugins_to_load_.size(); ++i) { |
| 42 plugins->push_back(plugins_to_load_[i]); | 46 plugins->push_back(plugins_to_load_[i]); |
| 43 } | 47 } |
| 44 } | 48 } |
| 45 | 49 |
| 46 } // npapi | 50 } // npapi |
| 47 } // webkit | 51 } // webkit |
| OLD | NEW |