OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return false; | 79 return false; |
80 } | 80 } |
81 | 81 |
82 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, | 82 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, |
83 std::vector<WebPluginInfo>* plugins) { | 83 std::vector<WebPluginInfo>* plugins) { |
84 // Plugins that we know don't work at all. | 84 // Plugins that we know don't work at all. |
85 const char* blacklisted_plugin_mimes[] = { | 85 const char* blacklisted_plugin_mimes[] = { |
86 "application/x-director", // Crashes during initialization. | 86 "application/x-director", // Crashes during initialization. |
87 "application/x-googlegears", // Safari-specific. | 87 "application/x-googlegears", // Safari-specific. |
88 "application/x-vnd.movenetworks.qm", // Crashes during initialization. | 88 "application/x-vnd.movenetworks.qm", // Crashes during initialization. |
| 89 "application/vnd.o3d.auto", // Doesn't render, and having it |
| 90 // detected can prevent fallbacks. |
89 }; | 91 }; |
90 // In the case of plugins that share MIME types, we have to blacklist by name. | 92 // In the case of plugins that share MIME types, we have to blacklist by name. |
91 const char* blacklisted_plugin_names[] = { | 93 const char* blacklisted_plugin_names[] = { |
92 // Blacklisted for now since having it non-functional but trying to handle | 94 // Blacklisted for now since having it non-functional but trying to handle |
93 // PDFs is worse than not having it (PDF content would otherwise be | 95 // PDFs is worse than not having it (PDF content would otherwise be |
94 // downloaded or handled by QuickTime). | 96 // downloaded or handled by QuickTime). |
95 "PDF Browser Plugin", | 97 "PDF Browser Plugin", |
96 }; | 98 }; |
97 | 99 |
98 // Plugins that we know are working reasonably well. | 100 // Plugins that we know are working reasonably well. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 for (size_t i = 0; i < plugins->size(); ++i) { | 139 for (size_t i = 0; i < plugins->size(); ++i) { |
138 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { | 140 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { |
139 return false; // We already have a loaded plugin higher in the hierarchy. | 141 return false; // We already have a loaded plugin higher in the hierarchy. |
140 } | 142 } |
141 } | 143 } |
142 | 144 |
143 return true; | 145 return true; |
144 } | 146 } |
145 | 147 |
146 } // namespace NPAPI | 148 } // namespace NPAPI |
OLD | NEW |