OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 } | 678 } |
679 | 679 |
680 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 680 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
681 size_t* output_length) { | 681 size_t* output_length) { |
682 return false; | 682 return false; |
683 } | 683 } |
684 #endif | 684 #endif |
685 | 685 |
686 void GetPlugins(bool refresh, | 686 void GetPlugins(bool refresh, |
687 std::vector<webkit::npapi::WebPluginInfo>* plugins) { | 687 std::vector<webkit::npapi::WebPluginInfo>* plugins) { |
688 webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); | 688 if (refresh) |
| 689 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
| 690 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); |
689 // Don't load the forked TestNetscapePlugIn in the chromium code, use | 691 // Don't load the forked TestNetscapePlugIn in the chromium code, use |
690 // the copy in webkit.org's repository instead. | 692 // the copy in webkit.org's repository instead. |
691 const FilePath::StringType kPluginBlackList[] = { | 693 const FilePath::StringType kPluginBlackList[] = { |
692 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), | 694 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), |
693 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), | 695 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), |
694 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), | 696 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), |
695 }; | 697 }; |
696 for (int i = plugins->size() - 1; i >= 0; --i) { | 698 for (int i = plugins->size() - 1; i >= 0; --i) { |
697 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); | 699 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); |
698 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 700 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
699 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 701 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
700 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 702 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
701 plugins->erase(plugins->begin() + i); | 703 plugins->erase(plugins->begin() + i); |
702 } | 704 } |
703 } | 705 } |
704 } | 706 } |
705 } | 707 } |
706 | 708 |
707 } // namespace webkit_glue | 709 } // namespace webkit_glue |
OLD | NEW |