Don't delete the device menu picker when the last client goes away because device selection should be persistent.
<rdar://problem/21077978>
Created attachment 253596 [details] Proposed patch.
Attachment 253596 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:31: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 253596 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=253596&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:-173 > - [m_outputDeviceMenuController removeObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDevicePickedKeyName]; How do these observers get removed when the target picker goes away? I guess the point of this patch is to keep this object alive for as long as WebKit is running?
(In reply to comment #4) > Comment on attachment 253596 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253596&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:-173 > > - [m_outputDeviceMenuController removeObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDevicePickedKeyName]; > > How do these observers get removed when the target picker goes away? I guess > the point of this patch is to keep this object alive for as long as WebKit > is running? They don't. This technically isn't a problem because this is a singleton, but I will add that code to the destructor for completeness.
Committed r184788: https://trac.webkit.org/r184788