equal
deleted
inserted
replaced
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() |