mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add a CefGetMimeType function for retrieving the mime type of a file extension (issue #1098).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1577 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include "include/cef_url.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
bool CefParseURL(const CefString& url,
|
||||
@@ -66,3 +67,9 @@ bool CefCreateURL(const CefURLParts& parts,
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CefString CefGetMimeType(const CefString& extension) {
|
||||
std::string mime_type;
|
||||
net::GetMimeTypeFromExtension(extension, &mime_type);
|
||||
return mime_type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user