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

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: fix conflicts Created 8 years, 2 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
« no previous file with comments | « webkit/plugins/npapi/mock_plugin_list.h ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) :
12 PluginList(group_definitions, num_group_definitions) {
13 } 11 }
14 12
15 MockPluginList::~MockPluginList() { 13 MockPluginList::~MockPluginList() {
16 } 14 }
17 15
18 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) { 16 void MockPluginList::AddPluginToLoad(const WebPluginInfo& plugin) {
19 plugins_to_load_.push_back(plugin); 17 plugins_to_load_.push_back(plugin);
20 } 18 }
21 19
22 void MockPluginList::ClearPluginsToLoad() { 20 void MockPluginList::ClearPluginsToLoad() {
23 plugins_to_load_.clear(); 21 plugins_to_load_.clear();
24 } 22 }
25 23
26 bool MockPluginList::GetPluginsNoRefresh( 24 bool MockPluginList::GetPluginsNoRefresh(
27 std::vector<webkit::WebPluginInfo>* plugins) { 25 std::vector<webkit::WebPluginInfo>* plugins) {
28 GetPlugins(plugins); 26 GetPlugins(plugins);
29 return true; 27 return true;
30 } 28 }
31 29
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( 30 void MockPluginList::LoadPluginsIntoPluginListInternal(
40 std::vector<webkit::WebPluginInfo>* plugins) { 31 std::vector<webkit::WebPluginInfo>* plugins) {
41 for (size_t i = 0; i < plugins_to_load_.size(); ++i) { 32 for (size_t i = 0; i < plugins_to_load_.size(); ++i) {
42 plugins->push_back(plugins_to_load_[i]); 33 plugins->push_back(plugins_to_load_[i]);
43 } 34 }
44 } 35 }
45 36
46 } // npapi 37 } // npapi
47 } // webkit 38 } // webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/mock_plugin_list.h ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698