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/plugin_list.h" | 5 #include "webkit/plugins/npapi/plugin_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 PluginList::PluginList() | 286 PluginList::PluginList() |
287 : loading_state_(LOADING_STATE_NEEDS_REFRESH) { | 287 : loading_state_(LOADING_STATE_NEEDS_REFRESH) { |
288 PlatformInit(); | 288 PlatformInit(); |
289 AddHardcodedPluginGroups(kGroupDefinitions, | 289 AddHardcodedPluginGroups(kGroupDefinitions, |
290 ARRAYSIZE_UNSAFE(kGroupDefinitions)); | 290 ARRAYSIZE_UNSAFE(kGroupDefinitions)); |
291 } | 291 } |
292 | 292 |
293 PluginList::PluginList(const PluginGroupDefinition* definitions, | 293 PluginList::PluginList(const PluginGroupDefinition* definitions, |
294 size_t num_definitions) | 294 size_t num_definitions) |
295 : loading_state_(LOADING_STATE_NEEDS_REFRESH) { | 295 : |
296 // Don't do platform-dependend initialization in unit tests. | 296 #if defined(OS_WIN) |
| 297 dont_load_new_wmp_(false), |
| 298 #endif |
| 299 loading_state_(LOADING_STATE_NEEDS_REFRESH) { |
| 300 // Don't do platform-dependent initialization in unit tests. |
297 AddHardcodedPluginGroups(definitions, num_definitions); | 301 AddHardcodedPluginGroups(definitions, num_definitions); |
298 } | 302 } |
299 | 303 |
300 PluginGroup* PluginList::CreatePluginGroup( | 304 PluginGroup* PluginList::CreatePluginGroup( |
301 const webkit::WebPluginInfo& web_plugin_info) const { | 305 const webkit::WebPluginInfo& web_plugin_info) const { |
302 for (size_t i = 0; i < hardcoded_plugin_groups_.size(); ++i) { | 306 for (size_t i = 0; i < hardcoded_plugin_groups_.size(); ++i) { |
303 const PluginGroup* group = hardcoded_plugin_groups_[i]; | 307 const PluginGroup* group = hardcoded_plugin_groups_[i]; |
304 if (group->Match(web_plugin_info)) | 308 if (group->Match(web_plugin_info)) |
305 return new PluginGroup(*group); | 309 return new PluginGroup(*group); |
306 } | 310 } |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 } | 634 } |
631 return false; | 635 return false; |
632 } | 636 } |
633 | 637 |
634 PluginList::~PluginList() { | 638 PluginList::~PluginList() { |
635 } | 639 } |
636 | 640 |
637 | 641 |
638 } // namespace npapi | 642 } // namespace npapi |
639 } // namespace webkit | 643 } // namespace webkit |
OLD | NEW |