| 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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "webkit/glue/plugins/plugin_lib.h" | 7 #include "webkit/glue/plugins/plugin_lib.h" |
| 8 | 8 |
| 9 #include "base/native_library.h" | 9 #include "base/native_library.h" |
| 10 #include "base/scoped_cftyperef.h" | 10 #include "base/scoped_cftyperef.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 kSTRPluginDescriptionResourceID, | 193 kSTRPluginDescriptionResourceID, |
| 194 &plugin_descs); | 194 &plugin_descs); |
| 195 | 195 |
| 196 size_t num_types = type_strings.size()/2; | 196 size_t num_types = type_strings.size()/2; |
| 197 | 197 |
| 198 for (size_t i = 0; i < num_types; ++i) { | 198 for (size_t i = 0; i < num_types; ++i) { |
| 199 WebPluginMimeType mime; | 199 WebPluginMimeType mime; |
| 200 mime.mime_type = StringToLowerASCII(type_strings[2*i]); | 200 mime.mime_type = StringToLowerASCII(type_strings[2*i]); |
| 201 if (have_type_descs && i < type_descs.size()) | 201 if (have_type_descs && i < type_descs.size()) |
| 202 mime.description = UTF8ToUTF16(type_descs[i]); | 202 mime.description = UTF8ToUTF16(type_descs[i]); |
| 203 SplitString(StringToLowerASCII(type_strings[2*i+1]), ',', | 203 base::SplitString( |
| 204 &mime.file_extensions); | 204 StringToLowerASCII(type_strings[2*i+1]), ',', &mime.file_extensions); |
| 205 | 205 |
| 206 info->mime_types.push_back(mime); | 206 info->mime_types.push_back(mime); |
| 207 } | 207 } |
| 208 | 208 |
| 209 NSString* plugin_vers = | 209 NSString* plugin_vers = |
| 210 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle, | 210 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle, |
| 211 CFSTR("CFBundleShortVersionString")); | 211 CFSTR("CFBundleShortVersionString")); |
| 212 | 212 |
| 213 if (have_plugin_descs && plugin_descs.size() > 1) | 213 if (have_plugin_descs && plugin_descs.size() > 1) |
| 214 info->name = UTF8ToUTF16(plugin_descs[1]); | 214 info->name = UTF8ToUTF16(plugin_descs[1]); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 if (ReadSTRPluginInfo(filename, bundle.get(), info)) | 339 if (ReadSTRPluginInfo(filename, bundle.get(), info)) |
| 340 return true; | 340 return true; |
| 341 | 341 |
| 342 // ... or not | 342 // ... or not |
| 343 | 343 |
| 344 return false; | 344 return false; |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace NPAPI | 347 } // namespace NPAPI |
| OLD | NEW |