Changeset 187005 in webkit
- Timestamp:
- Jul 18, 2015 6:36:50 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r187004 r187005 1 2015-07-16 Matt Rajca <mrajca@apple.com> 2 3 Media Session: add support for telephony interruptions 4 https://bugs.webkit.org/show_bug.cgi?id=147016 5 6 Reviewed by Eric Carlson. 7 8 * platform/audio/mac/MediaSessionInterruptionProviderMac.mm: 9 (WebCore::callDidBeginRinging): Forward this event to media sessions as a 'Transient' interruption. 10 (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): 11 (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): 12 1 13 2015-07-17 Matt Rajca <mrajca@apple.com> 2 14 -
trunk/Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm
r186917 r187005 29 29 #if ENABLE(MEDIA_SESSION) && PLATFORM(MAC) 30 30 31 #include "NotImplemented.h"31 #include <CoreFoundation/CoreFoundation.h> 32 32 33 33 namespace WebCore { 34 34 35 static const CFStringRef callDidBeginRingingNotification = CFSTR("CallDidBeginRinging"); 36 37 static void callDidBeginRinging(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef) 38 { 39 ASSERT_ARG(observer, observer); 40 MediaSessionInterruptionProvider* provider = (MediaSessionInterruptionProvider*)observer; 41 provider->client().didReceiveStartOfInterruptionNotification(MediaSessionInterruptingCategory::Transient); 42 } 43 35 44 void MediaSessionInterruptionProviderMac::beginListeningForInterruptions() 36 45 { 37 notImplemented();46 CFNotificationCenterAddObserver(CFNotificationCenterGetDistributedCenter(), this, callDidBeginRinging, callDidBeginRingingNotification, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately); 38 47 } 39 48 40 49 void MediaSessionInterruptionProviderMac::stopListeningForInterruptions() 41 50 { 42 notImplemented();51 CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), this, callDidBeginRingingNotification, nullptr); 43 52 } 44 53
Note: See TracChangeset
for help on using the changeset viewer.