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

Side by Side Diff: webkit/plugins/npapi/mock_plugin_list.cc

Issue 10918174: Remove PluginGroup (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_async_plugin_finder
Patch Set: Created 8 years, 3 months 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
OLDNEW
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(const PluginGroupDefinition* group_definitions, 10 MockPluginList::MockPluginList()
11 size_t num_group_definitions) : 11 : PluginList(1) {
12 PluginList(group_definitions, num_group_definitions) {
13 } 12 }
14 13
15 MockPluginList::~MockPluginList() { 14 MockPluginList::~MockPluginList() {
16 } 15 }
17 16
18 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) { 17 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) {
19 plugins_to_load_.push_back(plugin); 18 plugins_to_load_.push_back(plugin);
20 } 19 }
21 20
22 void MockPluginList::ClearPluginsToLoad() { 21 void MockPluginList::ClearPluginsToLoad() {
23 plugins_to_load_.clear(); 22 plugins_to_load_.clear();
24 } 23 }
25 24
26 bool MockPluginList::GetPluginsNoRefresh( 25 bool MockPluginList::GetPluginsNoRefresh(
27 std::vector<webkit::WebPluginInfo>* plugins) { 26 std::vector<webkit::WebPluginInfo>* plugins) {
28 GetPlugins(plugins); 27 GetPlugins(plugins);
29 return true; 28 return true;
30 } 29 }
31 30
32 // TODO(ibraaaa): DELETE. http://crbug.com/124396
33 void MockPluginList::LoadPluginsInternal(
34 ScopedVector<PluginGroup>* plugin_groups) {
35 for (size_t i = 0; i < plugins_to_load_.size(); ++i)
36 AddToPluginGroups(plugins_to_load_[i], plugin_groups);
37 }
38
39 void MockPluginList::LoadPluginsIntoPluginListInternal( 31 void MockPluginList::LoadPluginsIntoPluginListInternal(
40 std::vector<webkit::WebPluginInfo>* plugins) { 32 std::vector<webkit::WebPluginInfo>* plugins) {
41 for (size_t i = 0; i < plugins_to_load_.size(); ++i) { 33 for (size_t i = 0; i < plugins_to_load_.size(); ++i) {
42 plugins->push_back(plugins_to_load_[i]); 34 plugins->push_back(plugins_to_load_[i]);
43 } 35 }
44 } 36 }
45 37
46 } // npapi 38 } // npapi
47 } // webkit 39 } // webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698