| 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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 bool italic, int charset) { | 873 bool italic, int charset) { |
| 874 return -1; | 874 return -1; |
| 875 } | 875 } |
| 876 | 876 |
| 877 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 877 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
| 878 size_t* output_length) { | 878 size_t* output_length) { |
| 879 return false; | 879 return false; |
| 880 } | 880 } |
| 881 #endif | 881 #endif |
| 882 | 882 |
| 883 void NotifyJSOutOfMemory() { |
| 884 // Ignored for test_shell. |
| 885 } |
| 886 |
| 883 void GetPlugins(bool refresh, | 887 void GetPlugins(bool refresh, |
| 884 std::vector<webkit::npapi::WebPluginInfo>* plugins) { | 888 std::vector<webkit::npapi::WebPluginInfo>* plugins) { |
| 885 webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); | 889 webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); |
| 886 // Don't load the forked TestNetscapePlugIn in the chromium code, use | 890 // Don't load the forked TestNetscapePlugIn in the chromium code, use |
| 887 // the copy in webkit.org's repository instead. | 891 // the copy in webkit.org's repository instead. |
| 888 const FilePath::StringType kPluginBlackList[] = { | 892 const FilePath::StringType kPluginBlackList[] = { |
| 889 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), | 893 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), |
| 890 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), | 894 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), |
| 891 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), | 895 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), |
| 892 }; | 896 }; |
| 893 for (int i = plugins->size() - 1; i >= 0; --i) { | 897 for (int i = plugins->size() - 1; i >= 0; --i) { |
| 894 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); | 898 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); |
| 895 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 899 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
| 896 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 900 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
| 897 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 901 webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
| 898 plugins->erase(plugins->begin() + i); | 902 plugins->erase(plugins->begin() + i); |
| 899 } | 903 } |
| 900 } | 904 } |
| 901 } | 905 } |
| 902 } | 906 } |
| 903 | 907 |
| 904 } // namespace webkit_glue | 908 } // namespace webkit_glue |
| OLD | NEW |