Bug 148109

Summary: Media Session: don't begin listening for interruptions when an interruption provider is created
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz, eric.carlson, mrajca, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145411    
Attachments:
Description Flags
Patch eric.carlson: review+

Matt Rajca
Reported 2015-08-17 17:01:25 PDT
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.
Attachments
Patch (2.58 KB, patch)
2015-08-17 17:06 PDT, Matt Rajca
eric.carlson: review+
Radar WebKit Bug Importer
Comment 1 2015-08-17 17:02:42 PDT
Matt Rajca
Comment 2 2015-08-17 17:06:49 PDT
Eric Carlson
Comment 3 2015-08-18 08:20:03 PDT
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?
Matt Rajca
Comment 4 2015-08-18 18:04:13 PDT
(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.
Matt Rajca
Comment 5 2015-08-18 18:05:22 PDT
Note You need to log in before you can comment on or make changes to this bug.