OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "PlatformString.h" | 29 #include "PlatformString.h" |
30 #include <wtf/HashSet.h> | 30 #include <wtf/HashSet.h> |
31 #include <wtf/Vector.h> | 31 #include <wtf/Vector.h> |
32 #include <wtf/text/StringHash.h> | 32 #include <wtf/text/StringHash.h> |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class MIMETypeRegistry { | 36 class MIMETypeRegistry { |
37 public: | 37 public: |
38 static String getMIMETypeForExtension(const String& extension); | 38 static String getMIMETypeForExtension(const String& extension); |
39 #if ENABLE(FILE_SYSTEM) && ENABLE(WORKERS) | 39 #if ENABLE(FILE_SYSTEM) |
40 static String getMIMETypeForExtensionThreadSafe(const String& extension); | 40 static String getWellKnownMIMETypeForExtension(const String& extension); |
41 #endif | 41 #endif |
| 42 |
42 static Vector<String> getExtensionsForMIMEType(const String& type); | 43 static Vector<String> getExtensionsForMIMEType(const String& type); |
43 static String getPreferredExtensionForMIMEType(const String& type); | 44 static String getPreferredExtensionForMIMEType(const String& type); |
44 static String getMediaMIMETypeForExtension(const String& extension); | 45 static String getMediaMIMETypeForExtension(const String& extension); |
45 static Vector<String> getMediaMIMETypesForExtension(const String& extension)
; | 46 static Vector<String> getMediaMIMETypesForExtension(const String& extension)
; |
46 | 47 |
47 static String getMIMETypeForPath(const String& path); | 48 static String getMIMETypeForPath(const String& path); |
48 | 49 |
49 // Check to see if a mime type is suitable for being loaded inline as an | 50 // Check to see if a mime type is suitable for being loaded inline as an |
50 // image (e.g., <img> tags). | 51 // image (e.g., <img> tags). |
51 static bool isSupportedImageMIMEType(const String& mimeType); | 52 static bool isSupportedImageMIMEType(const String& mimeType); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 static HashSet<String>& getSupportedNonImageMIMETypes(); | 86 static HashSet<String>& getSupportedNonImageMIMETypes(); |
86 static HashSet<String>& getSupportedMediaMIMETypes(); | 87 static HashSet<String>& getSupportedMediaMIMETypes(); |
87 static HashSet<String>& getUnsupportedTextMIMETypes(); | 88 static HashSet<String>& getUnsupportedTextMIMETypes(); |
88 }; | 89 }; |
89 | 90 |
90 const String& defaultMIMEType(); | 91 const String& defaultMIMEType(); |
91 | 92 |
92 } // namespace WebCore | 93 } // namespace WebCore |
93 | 94 |
94 #endif // MIMETypeRegistry_h | 95 #endif // MIMETypeRegistry_h |
OLD | NEW |