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

Unified Diff: webkit/api/src/WebMediaPlayerClientImpl.cpp

Issue 160073: Implemented rest of webkit api/glue code needed for HTML5 media canPlayType(). (Closed)
Patch Set: SupportsType... it's everywhere! Created 11 years, 5 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 | « webkit/api/src/ChromiumBridge.cpp ('k') | webkit/glue/simple_webmimeregistry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebMediaPlayerClientImpl.cpp
diff --git a/webkit/api/src/WebMediaPlayerClientImpl.cpp b/webkit/api/src/WebMediaPlayerClientImpl.cpp
index 0451ad888c291f4507112913b141cb5dd9aec48a..d26bd160a1a91ba85d74dc72dad4c06a75d0b405 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()
« no previous file with comments | « webkit/api/src/ChromiumBridge.cpp ('k') | webkit/glue/simple_webmimeregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698