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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 89 "application/vnd.o3d.auto", // Doesn't render, and having it |
90 // detected can prevent fallbacks. | 90 // detected can prevent fallbacks. |
| 91 "application/x-pdf", // Force download of PDFs rather than |
| 92 "application/pdf" // showing the 1st page through QT. |
91 }; | 93 }; |
92 // In the case of plugins that share MIME types, we have to blacklist by name. | 94 // In the case of plugins that share MIME types, we have to blacklist by name. |
93 const char* blacklisted_plugin_names[] = { | 95 const char* blacklisted_plugin_names[] = { |
94 // Blacklisted for now since having it non-functional but trying to handle | 96 // Blacklisted for now since having it non-functional but trying to handle |
95 // PDFs is worse than not having it (PDF content would otherwise be | 97 // PDFs is worse than not having it (PDF content would otherwise be |
96 // downloaded or handled by QuickTime). | 98 // downloaded or handled by QuickTime). |
97 "PDF Browser Plugin", | 99 "PDF Browser Plugin", |
98 }; | 100 }; |
99 | 101 |
100 // Plugins that we know are working reasonably well. | 102 // Plugins that we know are working reasonably well. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 for (size_t i = 0; i < plugins->size(); ++i) { | 141 for (size_t i = 0; i < plugins->size(); ++i) { |
140 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { | 142 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { |
141 return false; // We already have a loaded plugin higher in the hierarchy. | 143 return false; // We already have a loaded plugin higher in the hierarchy. |
142 } | 144 } |
143 } | 145 } |
144 | 146 |
145 return true; | 147 return true; |
146 } | 148 } |
147 | 149 |
148 } // namespace NPAPI | 150 } // namespace NPAPI |
OLD | NEW |