If we call beginListeningForInterruption in MediaSessionInterruptionProvider's constructor, the current class's implementation will get called, not implementations provided by subclasses (this makes sense since base classes are initialized before derived classes). To fix this, we let clients of MediaSessionInterruptionProvider start listening for interruptions instead.
<rdar://problem/22317444>
Created attachment 259212 [details] Patch
Comment on attachment 259212 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259212&action=review > Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:48 > + m_interruptionProvider->beginListeningForInterruptions(); Shouldn't this and stopListeningForInterruptions be pure virtual?
(In reply to comment #3) > Comment on attachment 259212 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259212&action=review > > > Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:48 > > + m_interruptionProvider->beginListeningForInterruptions(); > > Shouldn't this and stopListeningForInterruptions be pure virtual? Yeah. That wasn't possible before since we were calling these in MediaSessionInterruptionProvider's constructor/destructor, but now that that responsibility has been demoted to the caller, I'll make the switch.
Committed r188615: <http://trac.webkit.org/changeset/188615>