Factor MediaSource methods out of MediaPlayer & MediaPlayerPrivate and into a new MediaSourcePrivate interface.
https://bugs.webkit.org/show_bug.cgi?id=109857

Reviewed by Adam Barth.

Source/WebCore:

This is a simple refactor that moves MediaSource related methods out of MediaPlayer & MediaPlayerPrivate
so that the MediaSource implementation can be updated without further polluting these interfaces.
MediaSourcePrivate is the new WebCore interface that ports must implement to support the MediaSource API.

No new tests. No user visible behavior has changed.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::duration):
(WebCore::MediaSource::setDuration):
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::endOfStream):
(WebCore::MediaSource::buffered):
(WebCore::MediaSource::append):
(WebCore::MediaSource::abort):
(WebCore::MediaSource::setTimestampOffset):
(WebCore::MediaSource::setPrivateAndOpen):
(WebCore):
(WebCore::MediaSource::hasPendingActivity):
(WebCore::MediaSource::stop):
* Modules/mediasource/MediaSource.h:
(MediaSource):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::createMediaPlayer):
(WebCore::HTMLMediaElement::reportMemoryUsage):
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* platform/graphics/MediaPlayer.cpp:
(NullMediaPlayerPrivate):
(WebCore::NullMediaPlayerPrivate::load):
(WebCore::MediaPlayer::load):
(WebCore):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
* platform/graphics/MediaPlayer.h:
(WebCore):
(MediaPlayerClient):
(MediaPlayer):
* platform/graphics/MediaPlayerPrivate.h:
(MediaPlayerPrivateInterface):
* platform/graphics/MediaSourcePrivate.h: Added.
(WebCore):
(MediaSourcePrivate): Contains the MediaSource methods extracted from MediaPlayer.
(WebCore::MediaSourcePrivate::MediaSourcePrivate):
(WebCore::MediaSourcePrivate::~MediaSourcePrivate):

Source/WebKit/chromium:

WebMediaSource and WebMediaSource client were created to replace the MediaSource methods in WebMediaPlayer and
WebMediaPlayerClient. This allows the MediaSource implementation to be updated without further polluting the
media player interfaces.

* WebKit.gyp:
* public/WebMediaPlayer.h:
(WebMediaPlayer):
(WebKit::WebMediaPlayer::load):
* public/WebMediaPlayerClient.h:
(WebKit):
* public/WebMediaSource.h: Added.
(WebKit):
(WebMediaSource):
(WebKit::WebMediaSource::~WebMediaSource):
* public/WebMediaSourceClient.h: Added.
(WebKit):
(WebMediaSourceClient):
(WebKit::WebMediaSourceClient::~WebMediaSourceClient):
* src/AssertMatchingEnums.cpp:
* src/WebMediaPlayerClientImpl.cpp:
(WebKit):
(WebMediaSourceClientImpl): Temporary WebMediaSourceClient implementation to keep things working until Chromium
                            changes land.
(WebKit::WebMediaSourceClientImpl::WebMediaSourceClientImpl):
(WebKit::WebMediaSourceClientImpl::~WebMediaSourceClientImpl):
(WebKit::WebMediaSourceClientImpl::addId):
(WebKit::WebMediaSourceClientImpl::removeId):
(WebKit::WebMediaSourceClientImpl::buffered):
(WebKit::WebMediaSourceClientImpl::append):
(WebKit::WebMediaSourceClientImpl::abort):
(WebKit::WebMediaSourceClientImpl::duration):
(WebKit::WebMediaSourceClientImpl::setDuration):
(WebKit::WebMediaSourceClientImpl::endOfStream):
(WebKit::WebMediaSourceClientImpl::setTimestampOffset):
(WebKit::WebMediaPlayerClientImpl::sourceOpened):
(WebKit::WebMediaPlayerClientImpl::sourceURL):
(WebKit::WebMediaPlayerClientImpl::load):
(WebKit::WebMediaPlayerClientImpl::loadRequested):
(WebKit::WebMediaPlayerClientImpl::loadInternal):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):
* src/WebMediaSourceImpl.cpp: Added.
(WebKit):
(MediaSourcePrivateImpl):
(WebKit::MediaSourcePrivateImpl::~MediaSourcePrivateImpl):
(WebKit::MediaSourcePrivateImpl::MediaSourcePrivateImpl):
(WebKit::MediaSourcePrivateImpl::addId):
(WebKit::MediaSourcePrivateImpl::removeId):
(WebKit::MediaSourcePrivateImpl::buffered):
(WebKit::MediaSourcePrivateImpl::append):
(WebKit::MediaSourcePrivateImpl::abort):
(WebKit::MediaSourcePrivateImpl::duration):
(WebKit::MediaSourcePrivateImpl::setDuration):
(WebKit::MediaSourcePrivateImpl::endOfStream):
(WebKit::MediaSourcePrivateImpl::setTimestampOffset):
(WebKit::WebMediaSourceImpl::WebMediaSourceImpl):
(WebKit::WebMediaSourceImpl::~WebMediaSourceImpl):
(WebKit::WebMediaSourceImpl::open):
* src/WebMediaSourceImpl.h: Added.
(WebKit):
(WebMediaSourceImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143826 268f45cc-cd09-0410-ab3c-d52691b4dbfc