webengine/osswebengine/WebCore/platform/MimeTypeRegistry.cpp
changeset 13 10e98eab6f85
parent 0 dd21522fd290
child 16 a359256acfc6
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
    42 namespace WebCore
    42 namespace WebCore
    43 {
    43 {
    44 static WTF::HashSet<String>* supportedImageResourceMIMETypes;
    44 static WTF::HashSet<String>* supportedImageResourceMIMETypes;
    45 static WTF::HashSet<String>* supportedImageMIMETypes;
    45 static WTF::HashSet<String>* supportedImageMIMETypes;
    46 static WTF::HashSet<String>* supportedNonImageMIMETypes;
    46 static WTF::HashSet<String>* supportedNonImageMIMETypes;
    47     
    47 
       
    48 struct cleanupMimeTypes {
       
    49     ~cleanupMimeTypes() {
       
    50         if( supportedImageResourceMIMETypes ) {
       
    51             supportedImageResourceMIMETypes->clear();
       
    52             delete supportedImageResourceMIMETypes;
       
    53             supportedImageResourceMIMETypes = 0;
       
    54         }
       
    55         if( supportedImageMIMETypes ) {
       
    56             supportedImageMIMETypes->clear();
       
    57             delete supportedImageMIMETypes;
       
    58             supportedImageMIMETypes = 0;
       
    59         }
       
    60         if( supportedNonImageMIMETypes ) {
       
    61             supportedNonImageMIMETypes->clear();
       
    62             delete supportedNonImageMIMETypes;
       
    63             supportedNonImageMIMETypes = 0;
       
    64         }
       
    65     }
       
    66 };
       
    67 struct cleanupMimeTypes cleanMimeTypes;
       
    68 
    48 #if PLATFORM(CG)
    69 #if PLATFORM(CG)
    49 extern String getMIMETypeForUTI(const String& uti);
    70 extern String getMIMETypeForUTI(const String& uti);
    50 #endif
    71 #endif
    51 
    72 
    52 static void initialiseSupportedImageMIMETypes()
    73 static void initialiseSupportedImageMIMETypes()