| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/glue/plugins/plugin_list.h" | 5 #include "webkit/glue/plugins/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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 | 376 |
| 377 bool PluginList::GetPluginInfo(const GURL& url, | 377 bool PluginList::GetPluginInfo(const GURL& url, |
| 378 const std::string& mime_type, | 378 const std::string& mime_type, |
| 379 bool allow_wildcard, | 379 bool allow_wildcard, |
| 380 WebPluginInfo* info, | 380 WebPluginInfo* info, |
| 381 std::string* actual_mime_type) { | 381 std::string* actual_mime_type) { |
| 382 bool found = FindPlugin(mime_type, allow_wildcard, info); | 382 bool found = FindPlugin(mime_type, allow_wildcard, info); |
| 383 if (!found || (info->path.value() == kDefaultPluginLibraryName)) { | 383 if (!found || (info->path.value() == kDefaultPluginLibraryName)) { |
| 384 found = FindPlugin(url, actual_mime_type, info) || | 384 if (FindPlugin(url, actual_mime_type, info) || |
| 385 FindDisabledPlugin(mime_type, allow_wildcard, info); | 385 FindDisabledPlugin(mime_type, allow_wildcard, info)) { |
| 386 found = true; |
| 387 } |
| 386 } | 388 } |
| 387 | 389 |
| 388 return found; | 390 return found; |
| 389 } | 391 } |
| 390 | 392 |
| 391 bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, | 393 bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, |
| 392 WebPluginInfo* info) { | 394 WebPluginInfo* info) { |
| 393 LoadPlugins(false); | 395 LoadPlugins(false); |
| 394 AutoLock lock(lock_); | 396 AutoLock lock(lock_); |
| 395 for (size_t i = 0; i < plugins_.size(); ++i) { | 397 for (size_t i = 0; i < plugins_.size(); ++i) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 451 } |
| 450 | 452 |
| 451 return did_disable; | 453 return did_disable; |
| 452 } | 454 } |
| 453 | 455 |
| 454 void PluginList::Shutdown() { | 456 void PluginList::Shutdown() { |
| 455 // TODO | 457 // TODO |
| 456 } | 458 } |
| 457 | 459 |
| 458 } // namespace NPAPI | 460 } // namespace NPAPI |
| OLD | NEW |