| 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 want to | 18 // Don't load the forked npapi_layout_test_plugin in DRT, we only want to |
| 19 // use the upstream version TestNetscapePlugIn (on Mac, the upstream version | 19 // use the upstream version TestNetscapePlugIn (on Mac, the upstream version |
| 20 // is named WebKitTestNetscapePlugIn). | 20 // is named WebKitTestNetscapePlugIn). |
| 21 const FilePath::StringType kPluginBlackList[] = { | 21 const FilePath::StringType kPluginBlackList[] = { |
| 22 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), | 22 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), |
| 23 FILE_PATH_LITERAL("TestNetscapePlugIn.plugin"), | 23 FILE_PATH_LITERAL("TestNetscapePlugIn.plugin"), |
| 24 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), | 24 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), |
| 25 }; | 25 }; |
| 26 for (int i = plugins->size() - 1; i >= 0; --i) { | 26 for (int i = plugins->size() - 1; i >= 0; --i) { |
| 27 WebPluginInfo plugin_info = plugins->at(i); | 27 WebPluginInfo plugin_info = plugins->at(i); |
| 28 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 28 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
| 29 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 29 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
| 30 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 30 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path, false); |
| 31 plugins->erase(plugins->begin() + i); | 31 plugins->erase(plugins->begin() + i); |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool IsDefaultPluginEnabled() { | 37 bool IsDefaultPluginEnabled() { |
| 38 return false; | 38 return false; |
| 39 } | 39 } |
| 40 | 40 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return -1; | 105 return -1; |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 108 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
| 109 size_t* output_length) { | 109 size_t* output_length) { |
| 110 return false; | 110 return false; |
| 111 } | 111 } |
| 112 #endif | 112 #endif |
| 113 | 113 |
| 114 } // namespace webkit_glue | 114 } // namespace webkit_glue |
| OLD | NEW |