| 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/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "webkit/glue/plugins/plugin_list.h" | 10 #include "webkit/glue/plugins/plugin_list.h" |
| 11 | 11 |
| 12 // Functions needed by webkit_glue. | 12 // Functions needed by webkit_glue. |
| 13 | 13 |
| 14 namespace webkit_glue { | 14 namespace webkit_glue { |
| 15 | 15 |
| 16 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 16 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 17 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); | 17 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); |
| 18 // Don't load the forked npapi_layout_test_plugin in DRT, we only |
| 19 // want to use the upstream version TestNetscapePlugIn. We don't need to |
| 20 // blacklist on Mac because DRT Mac already uses the upstream version of |
| 21 // TestNetscapePlugIn. |
| 22 const FilePath::StringType kPluginBlackList[] = { |
| 23 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), |
| 24 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), |
| 25 }; |
| 26 for (int i = plugins->size() - 1; i >= 0; --i) { |
| 27 WebPluginInfo plugin_info = plugins->at(i); |
| 28 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
| 29 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
| 30 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
| 31 plugins->erase(plugins->begin() + i); |
| 32 } |
| 33 } |
| 34 } |
| 18 } | 35 } |
| 19 | 36 |
| 20 bool IsDefaultPluginEnabled() { | 37 bool IsDefaultPluginEnabled() { |
| 21 return false; | 38 return false; |
| 22 } | 39 } |
| 23 | 40 |
| 24 bool IsPluginRunningInRendererProcess() { | 41 bool IsPluginRunningInRendererProcess() { |
| 25 return true; | 42 return true; |
| 26 } | 43 } |
| 27 | 44 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return -1; | 105 return -1; |
| 89 } | 106 } |
| 90 | 107 |
| 91 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 108 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
| 92 size_t* output_length) { | 109 size_t* output_length) { |
| 93 return false; | 110 return false; |
| 94 } | 111 } |
| 95 #endif | 112 #endif |
| 96 | 113 |
| 97 } // namespace webkit_glue | 114 } // namespace webkit_glue |
| OLD | NEW |