Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: public/platform/WebMimeRegistry.h

Issue 430583002: Add SVG as a picture supported mime type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed approach Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/MIMETypeRegistry.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMimeRegistry.h
diff --git a/public/platform/WebMimeRegistry.h b/public/platform/WebMimeRegistry.h
index 55a146e20812f4f53594b7e062741d0ca5f50b14..519620ff3c2e52052dd807e1c887ec55d0b2fc03 100644
--- a/public/platform/WebMimeRegistry.h
+++ b/public/platform/WebMimeRegistry.h
@@ -32,9 +32,9 @@
#define WebMimeRegistry_h
#include "WebCommon.h"
+#include "WebString.h"
namespace blink {
-class WebString;
class WebMimeRegistry {
public:
@@ -42,6 +42,13 @@ public:
virtual SupportsType supportsMIMEType(const blink::WebString& mimeType) = 0;
virtual SupportsType supportsImageMIMEType(const blink::WebString& mimeType) = 0;
+ virtual SupportsType supportsImagePrefixedMIMEType(const blink::WebString& mimeType)
+ {
+ // FIXME: Replace this hack with a pure virtual that would be implemented by Chrome's WebMimeRegistry implementation.
+ return (supportsImageMIMEType(mimeType) || mimeType == blink::WebString("image/svg+xml")) ?
esprehn 2014/08/11 21:22:21 This doesn't seem like the right layer for this. W
+ WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
+ }
+
virtual SupportsType supportsJavaScriptMIMEType(const blink::WebString& mimeType) = 0;
virtual SupportsType supportsMediaMIMEType(const blink::WebString& mimeType, const blink::WebString& codecs, const blink::WebString& keySystem) = 0;
« no previous file with comments | « Source/platform/MIMETypeRegistry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698