Media Session: add support for platform-specific interruption providers
authormrajca@apple.com <mrajca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jul 2015 23:22:36 +0000 (23:22 +0000)
committermrajca@apple.com <mrajca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Jul 2015 23:22:36 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147008

Reviewed by Eric Carlson.

* WebCore.xcodeproj/project.pbxproj: Include new source files.
* platform/mediasession/MediaSessionInterruptionProvider.cpp: Added base class to be used by MediaSessionManager
  to listen for interruption notifications.
(WebCore::MediaSessionInterruptionProvider::MediaSessionInterruptionProvider): Begin listening for interruptions
  upon construction.
(WebCore::MediaSessionInterruptionProvider::~MediaSessionInterruptionProvider): Stop listening for interruptions
  before destruction.
(WebCore::MediaSessionInterruptionProvider::beginListeningForInterruptions): To be overridden by subclasses.
(WebCore::MediaSessionInterruptionProvider::stopListeningForInterruptions): To be overridden by subclasses.
* platform/mediasession/MediaSessionInterruptionProvider.h: Added.
(WebCore::MediaSessionInterruptionProviderClient::~MediaSessionInterruptionProviderClient):
(WebCore::MediaSessionInterruptionProvider::client):
* platform/mediasession/mac/MediaSessionInterruptionProviderMac.h: Added for providing Mac-specific interruptions.
(WebCore::MediaSessionInterruptionProviderMac::~MediaSessionInterruptionProviderMac):
* platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm: Added stubs.
(WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions):
(WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.cpp [new file with mode: 0644]
Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.h [new file with mode: 0644]
Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.h [new file with mode: 0644]
Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm [new file with mode: 0644]

index 748d634..c15f0a4 100644 (file)
@@ -1,3 +1,28 @@
+2015-07-16  Matt Rajca  <mrajca@apple.com>
+
+        Media Session: add support for platform-specific interruption providers
+        https://bugs.webkit.org/show_bug.cgi?id=147008
+
+        Reviewed by Eric Carlson.
+
+        * WebCore.xcodeproj/project.pbxproj: Include new source files.
+        * platform/mediasession/MediaSessionInterruptionProvider.cpp: Added base class to be used by MediaSessionManager
+          to listen for interruption notifications.
+        (WebCore::MediaSessionInterruptionProvider::MediaSessionInterruptionProvider): Begin listening for interruptions
+          upon construction.
+        (WebCore::MediaSessionInterruptionProvider::~MediaSessionInterruptionProvider): Stop listening for interruptions
+          before destruction.
+        (WebCore::MediaSessionInterruptionProvider::beginListeningForInterruptions): To be overridden by subclasses.
+        (WebCore::MediaSessionInterruptionProvider::stopListeningForInterruptions): To be overridden by subclasses.
+        * platform/mediasession/MediaSessionInterruptionProvider.h: Added.
+        (WebCore::MediaSessionInterruptionProviderClient::~MediaSessionInterruptionProviderClient):
+        (WebCore::MediaSessionInterruptionProvider::client):
+        * platform/mediasession/mac/MediaSessionInterruptionProviderMac.h: Added for providing Mac-specific interruptions.
+        (WebCore::MediaSessionInterruptionProviderMac::~MediaSessionInterruptionProviderMac):
+        * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm: Added stubs.
+        (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions):
+        (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions):
+
 2015-07-16  Tim Horton  <timothy_horton@apple.com>
 
         Add shrink-wrapped link highlights
index 5288898..3252f15 100644 (file)
                C90F65561B2253BE002163A1 /* MediaSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C90F65541B225396002163A1 /* MediaSessionManager.h */; };
                C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */ = {isa = PBXBuildFile; fileRef = C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */; };
                C968B2E81B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */; };
+               C96F5EC51B5872260091EA9D /* MediaSessionInterruptionProviderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = C96F5EC11B5872260091EA9D /* MediaSessionInterruptionProviderMac.h */; };
+               C96F5EC61B5872260091EA9D /* MediaSessionInterruptionProviderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C96F5EC21B5872260091EA9D /* MediaSessionInterruptionProviderMac.mm */; };
+               C96F5EC71B5872260091EA9D /* MediaSessionInterruptionProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C96F5EC31B5872260091EA9D /* MediaSessionInterruptionProvider.cpp */; };
+               C96F5EC81B5872260091EA9D /* MediaSessionInterruptionProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = C96F5EC41B5872260091EA9D /* MediaSessionInterruptionProvider.h */; };
                C9D851F01B39DC780085062E /* MediaSessionMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = C9D851EE1B39DC780085062E /* MediaSessionMetadata.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C9DADBCB1B1D3B97001F17D8 /* JSMediaSession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */; };
                C9F87CFE1B28F40E00979B83 /* MediaSessionEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = C9F87CFD1B28E5F600979B83 /* MediaSessionEvents.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C968B2E51B1E704500EF1F81 /* HTMLMediaElementMediaSession.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLMediaElementMediaSession.idl; sourceTree = "<group>"; };
                C968B2E61B1E72F700EF1F81 /* HTMLMediaElementMediaSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementMediaSession.h; sourceTree = "<group>"; };
                C968B2E71B1E778100EF1F81 /* HTMLMediaElementMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMediaElementMediaSession.cpp; sourceTree = "<group>"; };
+               C96F5EC11B5872260091EA9D /* MediaSessionInterruptionProviderMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSessionInterruptionProviderMac.h; sourceTree = "<group>"; };
+               C96F5EC21B5872260091EA9D /* MediaSessionInterruptionProviderMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaSessionInterruptionProviderMac.mm; sourceTree = "<group>"; };
+               C96F5EC31B5872260091EA9D /* MediaSessionInterruptionProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSessionInterruptionProvider.cpp; sourceTree = "<group>"; };
+               C96F5EC41B5872260091EA9D /* MediaSessionInterruptionProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSessionInterruptionProvider.h; sourceTree = "<group>"; };
                C9D851EE1B39DC780085062E /* MediaSessionMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSessionMetadata.h; sourceTree = "<group>"; };
                C9DADBC91B1D3B25001F17D8 /* JSMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaSession.cpp; sourceTree = "<group>"; };
                C9DADBCA1B1D3B25001F17D8 /* JSMediaSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaSession.h; sourceTree = "<group>"; };
                                B2A015910AF6CD53006BCE0E /* graphics */,
                                A59E3C1B11580F340072928E /* ios */,
                                6582A14809999D6C00BEEB6D /* mac */,
+                               C96F5EBF1B5872260091EA9D /* mediasession */,
                                07221B9217CF0AD400848E51 /* mediastream */,
                                59C77F101054591C00506104 /* mock */,
                                656B84D70AEA1CE900A095B4 /* network */,
                        tabWidth = 4;
                        usesTabs = 0;
                };
+               C96F5EBF1B5872260091EA9D /* mediasession */ = {
+                       isa = PBXGroup;
+                       children = (
+                               C96F5EC01B5872260091EA9D /* mac */,
+                               C96F5EC31B5872260091EA9D /* MediaSessionInterruptionProvider.cpp */,
+                               C96F5EC41B5872260091EA9D /* MediaSessionInterruptionProvider.h */,
+                       );
+                       path = mediasession;
+                       sourceTree = "<group>";
+               };
+               C96F5EC01B5872260091EA9D /* mac */ = {
+                       isa = PBXGroup;
+                       children = (
+                               C96F5EC11B5872260091EA9D /* MediaSessionInterruptionProviderMac.h */,
+                               C96F5EC21B5872260091EA9D /* MediaSessionInterruptionProviderMac.mm */,
+                       );
+                       path = mac;
+                       sourceTree = "<group>";
+               };
                CD0DBB3E142274E600280263 /* audio */ = {
                        isa = PBXGroup;
                        children = (
                                CDBEAEAD19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.h in Headers */,
                                C9027F421B1D0AD200BFBFEF /* MediaSession.h in Headers */,
                                C9F87CFE1B28F40E00979B83 /* MediaSessionEvents.h in Headers */,
+                               C96F5EC81B5872260091EA9D /* MediaSessionInterruptionProvider.h in Headers */,
+                               C96F5EC51B5872260091EA9D /* MediaSessionInterruptionProviderMac.h in Headers */,
                                C90F65561B2253BE002163A1 /* MediaSessionManager.h in Headers */,
                                07638A991884487200E15A1B /* MediaSessionManagerIOS.h in Headers */,
                                C9D851F01B39DC780085062E /* MediaSessionMetadata.h in Headers */,
                                CEEFCD7919DB31F7003876D7 /* MediaResourceLoader.cpp in Sources */,
                                CDBEAEAC19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.mm in Sources */,
                                C9027F411B1D0AD200BFBFEF /* MediaSession.cpp in Sources */,
+                               C96F5EC71B5872260091EA9D /* MediaSessionInterruptionProvider.cpp in Sources */,
+                               C96F5EC61B5872260091EA9D /* MediaSessionInterruptionProviderMac.mm in Sources */,
                                C90F65551B2253B1002163A1 /* MediaSessionManager.cpp in Sources */,
                                07638A9A1884487200E15A1B /* MediaSessionManagerIOS.mm in Sources */,
                                07EDC3EE1AACB75D00983EB5 /* MediaSessionManagerMac.cpp in Sources */,
diff --git a/Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.cpp b/Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.cpp
new file mode 100644 (file)
index 0000000..c552ab8
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MediaSessionInterruptionProvider.h"
+
+#if ENABLE(MEDIA_SESSION)
+
+namespace WebCore {
+
+MediaSessionInterruptionProvider::MediaSessionInterruptionProvider(MediaSessionInterruptionProviderClient& client)
+    : m_client(&client)
+{
+    beginListeningForInterruptions();
+}
+
+MediaSessionInterruptionProvider::~MediaSessionInterruptionProvider()
+{
+    stopListeningForInterruptions();
+}
+
+void MediaSessionInterruptionProvider::beginListeningForInterruptions()
+{
+    ASSERT_NOT_REACHED();
+}
+
+void MediaSessionInterruptionProvider::stopListeningForInterruptions()
+{
+    ASSERT_NOT_REACHED();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_SESSION)
diff --git a/Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.h b/Source/WebCore/platform/mediasession/MediaSessionInterruptionProvider.h
new file mode 100644 (file)
index 0000000..f798e50
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MediaSessionInterruptionProvider_h
+#define MediaSessionInterruptionProvider_h
+
+#if ENABLE(MEDIA_SESSION)
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+enum class MediaSessionInterruptingCategory {
+    Content,
+    Transient,
+    TransientSolo
+};
+
+class MediaSessionInterruptionProviderClient {
+public:
+    virtual void didReceiveStartOfInterruptionNotification(MediaSessionInterruptingCategory) = 0;
+    virtual void didReceiveEndOfInterruptionNotification(MediaSessionInterruptingCategory) = 0;
+
+protected:
+    virtual ~MediaSessionInterruptionProviderClient() { }
+};
+
+class MediaSessionInterruptionProvider : public RefCounted<MediaSessionInterruptionProvider> {
+public:
+    explicit MediaSessionInterruptionProvider(MediaSessionInterruptionProviderClient&);
+    virtual ~MediaSessionInterruptionProvider();
+
+    // To be overriden by subclasses.
+    virtual void beginListeningForInterruptions();
+    virtual void stopListeningForInterruptions();
+
+    MediaSessionInterruptionProviderClient& client() const { return *m_client; }
+
+private:
+    MediaSessionInterruptionProviderClient* m_client;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_SESSION)
+
+#endif /* MediaSessionInterruptionProvider_h */
diff --git a/Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.h b/Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.h
new file mode 100644 (file)
index 0000000..0a53137
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MediaSessionInterruptionProviderMac_h
+#define MediaSessionInterruptionProviderMac_h
+
+#if ENABLE(MEDIA_SESSION) && PLATFORM(MAC)
+
+#include "MediaSessionInterruptionProvider.h"
+
+namespace WebCore {
+
+class MediaSessionInterruptionProviderMac : public MediaSessionInterruptionProvider {
+public:
+    using MediaSessionInterruptionProvider::MediaSessionInterruptionProvider;
+
+    virtual void beginListeningForInterruptions() override;
+    virtual void stopListeningForInterruptions() override;
+
+protected:
+    virtual ~MediaSessionInterruptionProviderMac() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_SESSION) && PLATFORM(MAC)
+
+#endif /* MediaSessionInterruptionProviderMac_h */
diff --git a/Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm b/Source/WebCore/platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm
new file mode 100644 (file)
index 0000000..dad745d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MediaSessionInterruptionProviderMac.h"
+
+#if ENABLE(MEDIA_SESSION) && PLATFORM(MAC)
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+void MediaSessionInterruptionProviderMac::beginListeningForInterruptions()
+{
+    notImplemented();
+}
+
+void MediaSessionInterruptionProviderMac::stopListeningForInterruptions()
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_SESSION) && PLATFORM(MAC)