Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaSta...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 17:41:10 +0000 (17:41 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 17:41:10 +0000 (17:41 +0000)
commita98e355c7f49d0fe4296cb167c006f463e9663db
tree71ae12f607bacbac0a9e5e061f79a992c0f05b9b
parentb9541417d6380c8b576fddb0eb322d9b24590f91
Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
https://bugs.webkit.org/show_bug.cgi?id=138153

Reviewed by Jer Noble.

After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
and it doesn't need to query each MediaSession for its characteristics and play state.
MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.

No new tests, no behavior change.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updatePlayState):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::setPlaying):
Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
(WebCore::HTMLMediaElement::setPausedInternal):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::isPlayingAudio):
Call isPlaying() directly rather than checking the MediaSession's state.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::setState):
MediaSessionClient::mediaStateDidChange() has been removed.
(WebCore::MediaSession::hasMediaCharacteristics): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/mac/AudioDestinationMac.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/audio/MediaSession.cpp
Source/WebCore/platform/audio/MediaSession.h
Source/WebCore/platform/audio/ios/AudioDestinationIOS.h
Source/WebCore/platform/audio/mac/AudioDestinationMac.h