From 30098fdf6b21c721e7ac18f251fa90e1b2a36dc0 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Fri, 24 Oct 2008 01:33:52 +0000 Subject: Resolve undefined symbols with "mime" in their names resulting from PLATFORM(MAC) killing Review URL: http://codereview.chromium.org/8137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3894 0039d316-1c4b-4281-b951-d872f2087c98 --- .../port/platform/chromium/MimeTypeRegistryChromium.cpp | 16 ++++++++++++++++ webkit/port/platform/mac/PasteboardMac.mm | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'webkit/port') diff --git a/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp index a4eaa9f..f2a72d7 100644 --- a/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp +++ b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp @@ -36,6 +36,22 @@ namespace WebCore { +// From MIMETypeRegistryMac.mm. PLATFORM(CG) seems wrong, this should +// probably be PLATFORM(CF), but the caller uses PLATFORM(CG). This is +// filed upstream at https://bugs.webkit.org/show_bug.cgi?id=21847. +#if PLATFORM(CG) +String getMIMETypeForUTI(const String & uti) +{ + CFStringRef utiref = uti.createCFString(); + CFStringRef mime = UTTypeCopyPreferredTagWithClass(utiref, kUTTagClassMIMEType); + String mimeType = mime; + if (mime) + CFRelease(mime); + CFRelease(utiref); + return mimeType; +} +#endif + // Returns the file extension if one is found. Does not include the dot in the // filename. E.g., 'html'. // NOTE: This does not work in the sandbox because the renderer doesn't have diff --git a/webkit/port/platform/mac/PasteboardMac.mm b/webkit/port/platform/mac/PasteboardMac.mm index c91c337..249235b 100644 --- a/webkit/port/platform/mac/PasteboardMac.mm +++ b/webkit/port/platform/mac/PasteboardMac.mm @@ -282,6 +282,7 @@ void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame) #endif } +#if 0 static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL *url) { SharedBuffer* coreData = resource->data(); @@ -296,7 +297,6 @@ static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL *url) return wrapper; } -#if 0 void Pasteboard::writeFileWrapperAsRTFDAttachment(NSFileWrapper* wrapper) { NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithFileWrapper:wrapper]; -- cgit v1.1