| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Plugins that we know are working reasonably well. | 99 // Plugins that we know are working reasonably well. |
| 100 const char* whitelisted_plugin_mimes[] = { | 100 const char* whitelisted_plugin_mimes[] = { |
| 101 "application/geplugin", | 101 "application/geplugin", |
| 102 "application/googletalk", | 102 "application/googletalk", |
| 103 "application/vnd.npapi-test", | 103 "application/vnd.npapi-test", |
| 104 "application/x-id-quakelive", | 104 "application/x-id-quakelive", |
| 105 "application/x-picasa-detect", | 105 "application/x-picasa-detect", |
| 106 "application/x-shockwave-flash", | 106 "application/x-shockwave-flash", |
| 107 "application/x-silverlight", | 107 "application/x-silverlight", |
| 108 "application/x-webkit-test-netscape", | 108 "application/x-webkit-test-netscape", |
| 109 "pepper-application/x-pepper-test-plugin", |
| 109 "video/quicktime", | 110 "video/quicktime", |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 // Start with names. | 113 // Start with names. |
| 113 std::string plugin_name = WideToUTF8(info.name); | 114 std::string plugin_name = WideToUTF8(info.name); |
| 114 if (ArrayContainsString(blacklisted_plugin_names, | 115 if (ArrayContainsString(blacklisted_plugin_names, |
| 115 arraysize(blacklisted_plugin_names), plugin_name)) { | 116 arraysize(blacklisted_plugin_names), plugin_name)) { |
| 116 return false; | 117 return false; |
| 117 } | 118 } |
| 118 // Then check mime types. | 119 // Then check mime types. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 143 for (size_t i = 0; i < plugins->size(); ++i) { | 144 for (size_t i = 0; i < plugins->size(); ++i) { |
| 144 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { | 145 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { |
| 145 return false; // We already have a loaded plugin higher in the hierarchy. | 146 return false; // We already have a loaded plugin higher in the hierarchy. |
| 146 } | 147 } |
| 147 } | 148 } |
| 148 | 149 |
| 149 return true; | 150 return true; |
| 150 } | 151 } |
| 151 | 152 |
| 152 } // namespace NPAPI | 153 } // namespace NPAPI |
| OLD | NEW |