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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "WebMediaPlayerClientImpl.h" 6 #include "WebMediaPlayerClientImpl.h"
7 7
8 #if ENABLE(VIDEO) 8 #if ENABLE(VIDEO)
9 9
10 #include "TemporaryGlue.h" 10 #include "TemporaryGlue.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes) 371 void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes)
372 { 372 {
373 // FIXME: integrate this list with WebMediaPlayerClientImpl::supportsType. 373 // FIXME: integrate this list with WebMediaPlayerClientImpl::supportsType.
374 notImplemented(); 374 notImplemented();
375 } 375 }
376 376
377 MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type, 377 MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type,
378 const String& codecs) 378 const String& codecs)
379 { 379 {
380 // FIXME: respect codecs, now we only check for mime-type. 380 WebMimeRegistry::SupportsType supportsType =
381 if (webKitClient()->mimeRegistry()->supportsMediaMIMEType(type)) 381 webKitClient()->mimeRegistry()->supportsMediaMIMEType(type, codecs);
382 return MediaPlayer::IsSupported; 382
383 return MediaPlayer::IsNotSupported; 383 switch (supportsType) {
384 case WebMimeRegistry::IsNotSupported:
385 return MediaPlayer::IsNotSupported;
386 case WebMimeRegistry::IsSupported:
387 return MediaPlayer::IsSupported;
388 case WebMimeRegistry::MayBeSupported:
389 return MediaPlayer::MayBeSupported;
390 }
384 } 391 }
385 392
386 WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() 393 WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
387 : m_mediaPlayer(0) 394 : m_mediaPlayer(0)
388 { 395 {
389 } 396 }
390 397
391 } // namespace WebKit 398 } // namespace WebKit
392 399
393 #endif // ENABLE(VIDEO) 400 #endif // ENABLE(VIDEO)
OLDNEW
« 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