Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: webkit/glue/plugins/plugin_list_mac.mm

Issue 369004: Revert 31094 - [Mac] Blacklist PDF so that they are downloaded instead of han... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
93 }; 91 };
94 // 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.
95 const char* blacklisted_plugin_names[] = { 93 const char* blacklisted_plugin_names[] = {
96 // 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
97 // 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
98 // downloaded or handled by QuickTime). 96 // downloaded or handled by QuickTime).
99 "PDF Browser Plugin", 97 "PDF Browser Plugin",
100 }; 98 };
101 99
102 // 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
141 for (size_t i = 0; i < plugins->size(); ++i) { 139 for (size_t i = 0; i < plugins->size(); ++i) {
142 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { 140 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) {
143 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.
144 } 142 }
145 } 143 }
146 144
147 return true; 145 return true;
148 } 146 }
149 147
150 } // namespace NPAPI 148 } // namespace NPAPI
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698