[Media] Refactor supportsType() factory method to take a parameters object.
https://bugs.webkit.org/show_bug.cgi?id=122489

Reviewed by Eric Carlson.

In order to support adding new conditional properties with which to decide
what MediaPlayerPrivate subclass to create, replace the two versions of the
supportsType() factory method with a single one taking a parameters object.

At the same time, add a 'isMediaSource' parameter to that object, allowing
MediaPlayerPrivate subclasses which support the same type and codecs but
which do not both support MediaSource to be distinguised.

* platform/graphics/MediaPlayer.cpp:
(WebCore::bestMediaEngineForSupportParameters): Renamed from
    bestMediaEngineForTypeAndCodecs.
(WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine()
(WebCore::MediaPlayer::supportsType): Pass parameter object.
(WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine().
* platform/graphics/MediaPlayer.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous
    extendedSupportsType method.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::supportsType): Ditto.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous
    extendedSupportsType method.
(WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
* platform/graphics/wince/MediaPlayerPrivateWinCE.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed