[Mac] Device picker menu should be persistent
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2015 19:14:48 +0000 (19:14 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2015 19:14:48 +0000 (19:14 +0000)
commitccc3d935463c2001e18c3a3a47eefc10ec288ec9
tree8e836b9bb01580dfffeb46e9ffebb5bee674ab18
parent18e093092173cd2d5e703e29a830dde584e4de68
[Mac] Device picker menu should be persistent
https://bugs.webkit.org/show_bug.cgi?id=145311

Reviewed by Brent Fulgham.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Add logging.
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Ditto.
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Ditto.
(WebCore::WebMediaSessionManager::clientStateDidChange): Ditto.
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Ditto.
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Ditto.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Don't set ExternalDeviceAutoPlayCandidate unless
there is an event listener.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Release the menu
controller and remove observers.
(WebCore::MediaPlaybackTargetPickerMac::create): Add logging.
(WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Ditto.
(WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Ditto.
(WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Ditto.
(WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Start the timer after
a brief pause to debounce multiple identical notifications.
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Add logging.
(WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets): Add logging.
(WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Don't release
the menu controller delegate.
(-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Add logging.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Update logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm