summaryrefslogtreecommitdiffstats
path: root/content/worker
diff options
context:
space:
mode:
Diffstat (limited to 'content/worker')
-rw-r--r--content/worker/worker_webkitclient_impl.cc9
-rw-r--r--content/worker/worker_webkitclient_impl.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/content/worker/worker_webkitclient_impl.cc b/content/worker/worker_webkitclient_impl.cc
index 75a822b..d4866d1 100644
--- a/content/worker/worker_webkitclient_impl.cc
+++ b/content/worker/worker_webkitclient_impl.cc
@@ -14,6 +14,7 @@
#include "content/common/webmessageportchannel_impl.h"
#include "content/worker/worker_thread.h"
#include "ipc/ipc_sync_message_filter.h"
+#include "net/base/mime_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
@@ -238,6 +239,14 @@ WebString WorkerWebKitClientImpl::mimeTypeForExtension(
return ASCIIToUTF16(mime_type);
}
+WebString WorkerWebKitClientImpl::wellKnownMimeTypeForExtension(
+ const WebString& file_extension) {
+ std::string mime_type;
+ net::GetWellKnownMimeTypeFromExtension(
+ webkit_glue::WebStringToFilePathString(file_extension), &mime_type);
+ return ASCIIToUTF16(mime_type);
+}
+
WebString WorkerWebKitClientImpl::mimeTypeFromFile(
const WebString& file_path) {
std::string mime_type;
diff --git a/content/worker/worker_webkitclient_impl.h b/content/worker/worker_webkitclient_impl.h
index d38db0e..98df47a 100644
--- a/content/worker/worker_webkitclient_impl.h
+++ b/content/worker/worker_webkitclient_impl.h
@@ -74,6 +74,8 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl,
virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType(
const WebKit::WebString&);
virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&);
+ virtual WebKit::WebString wellKnownMimeTypeForExtension(
+ const WebKit::WebString&);
virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&);
virtual WebKit::WebString preferredExtensionForMIMEType(
const WebKit::WebString&);