diff options
Diffstat (limited to 'webkit/api/src')
-rw-r--r-- | webkit/api/src/ChromiumBridge.cpp | 9 | ||||
-rw-r--r-- | webkit/api/src/WebMediaPlayerClientImpl.cpp | 15 |
2 files changed, 17 insertions, 7 deletions
diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index f8d2e99..93ac857 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -196,17 +196,20 @@ bool ChromiumBridge::layoutTestMode() bool ChromiumBridge::isSupportedImageMIMEType(const String& mimeType) { - return webKitClient()->mimeRegistry()->supportsImageMIMEType(mimeType); + return webKitClient()->mimeRegistry()->supportsImageMIMEType(mimeType) + != WebMimeRegistry::IsNotSupported; } bool ChromiumBridge::isSupportedJavaScriptMIMEType(const String& mimeType) { - return webKitClient()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType); + return webKitClient()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType) + != WebMimeRegistry::IsNotSupported; } bool ChromiumBridge::isSupportedNonImageMIMEType(const String& mimeType) { - return webKitClient()->mimeRegistry()->supportsNonImageMIMEType(mimeType); + return webKitClient()->mimeRegistry()->supportsNonImageMIMEType(mimeType) + != WebMimeRegistry::IsNotSupported; } String ChromiumBridge::mimeTypeForExtension(const String& extension) diff --git a/webkit/api/src/WebMediaPlayerClientImpl.cpp b/webkit/api/src/WebMediaPlayerClientImpl.cpp index 0451ad8..d26bd16 100644 --- a/webkit/api/src/WebMediaPlayerClientImpl.cpp +++ b/webkit/api/src/WebMediaPlayerClientImpl.cpp @@ -377,10 +377,17 @@ void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type, const String& codecs) { - // FIXME: respect codecs, now we only check for mime-type. - if (webKitClient()->mimeRegistry()->supportsMediaMIMEType(type)) - return MediaPlayer::IsSupported; - return MediaPlayer::IsNotSupported; + WebMimeRegistry::SupportsType supportsType = + webKitClient()->mimeRegistry()->supportsMediaMIMEType(type, codecs); + + switch (supportsType) { + case WebMimeRegistry::IsNotSupported: + return MediaPlayer::IsNotSupported; + case WebMimeRegistry::IsSupported: + return MediaPlayer::IsSupported; + case WebMimeRegistry::MayBeSupported: + return MediaPlayer::MayBeSupported; + } } WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() |