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