| 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/mac/scoped_cftyperef.h" |
| 9 #include "base/native_library.h" | 10 #include "base/native_library.h" |
| 10 #include "base/scoped_cftyperef.h" | |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "base/string_split.h" | 12 #include "base/string_split.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "webkit/glue/plugins/plugin_list.h" | 16 #include "webkit/glue/plugins/plugin_list.h" |
| 17 | 17 |
| 18 static const short kSTRTypeDefinitionResourceID = 128; | 18 static const short kSTRTypeDefinitionResourceID = 128; |
| 19 static const short kSTRTypeDescriptionResourceID = 127; | 19 static const short kSTRTypeDescriptionResourceID = 127; |
| 20 static const short kSTRPluginDescriptionResourceID = 126; | 20 static const short kSTRPluginDescriptionResourceID = 126; |
| 21 | 21 |
| 22 namespace NPAPI | 22 using base::mac::ScopedCFTypeRef; |
| 23 { | 23 |
| 24 namespace NPAPI { |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 27 NSDictionary* GetMIMETypes(CFBundleRef bundle) { | 28 NSDictionary* GetMIMETypes(CFBundleRef bundle) { |
| 28 NSString* mime_filename = | 29 NSString* mime_filename = |
| 29 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle, | 30 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle, |
| 30 CFSTR("WebPluginMIMETypesFilename")); | 31 CFSTR("WebPluginMIMETypesFilename")); |
| 31 | 32 |
| 32 if (mime_filename) { | 33 if (mime_filename) { |
| 33 | 34 |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 339 |
| 339 if (ReadSTRPluginInfo(filename, bundle.get(), info)) | 340 if (ReadSTRPluginInfo(filename, bundle.get(), info)) |
| 340 return true; | 341 return true; |
| 341 | 342 |
| 342 // ... or not | 343 // ... or not |
| 343 | 344 |
| 344 return false; | 345 return false; |
| 345 } | 346 } |
| 346 | 347 |
| 347 } // namespace NPAPI | 348 } // namespace NPAPI |
| OLD | NEW |