Control center controls disappear when pausing, locking device.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2018 01:54:15 +0000 (01:54 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2018 01:54:15 +0000 (01:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188282
<rdar://problem/42497809>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/audio-session-category-video-paused.html

MediaRemote will set any app whose audio session category changes from MediaPlayback to
Ambient as not eligable for being the "now playing" app. Previously, due to the ordering of
events, we never moved from MediaPlayback to Ambient when pausing <video>, even though that
was the intention. Now that that bug is fixed, it exposed this new issue with MediaRemote.

To solve the new issue, make our audio session category policy more explicit: once we are in
MediaPlayback category, we will remain so as long as the media element in queston stays
loaded, has played, and is never interrupted by the system.

Make MediaSessionManagerCocoa a proper subclass of PlatformMediaSessionManager, and make
MediaSessionManageriOS and -Mac subclasses of the -Cocoa class. Add a new
m_hasPlayedSinceLastInterruption ivar to PlatformMediaSession, set when the state() changes
to Playing, and cleared during an interruption. Check this flag when deciding what audio
sessino category to set in MediaSessionManagerCocoa.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::setState):
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSession::hasPlayedSinceLastInterruption const):
(WebCore::PlatformMediaSession::clearHasPlayedSinceLastInterruption):
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::updateSessionState): Deleted.
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::audioHardwareListener):
(WebCore::PlatformMediaSessionManager::updateSessionState):
* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(MediaSessionManagerCocoa::updateSessionState):
(MediaSessionManagerCocoa::beginInterruption):
(PlatformMediaSessionManager::updateSessionState): Deleted.
* platform/audio/cocoa/MediaSessionManagerCocoa.h: Added.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::MediaSessionManagerMac):

LayoutTests:

* platform/mac/media/audio-session-category-video-paused-expected.txt: Added.
* platform/mac/media/audio-session-category-video-paused.html: Added.
* platform/ios/TestExpectations:

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

16 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac/media/audio-session-category-video-paused-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/media/audio-session-category-video-paused.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/audio/PlatformMediaSession.cpp
Source/WebCore/platform/audio/PlatformMediaSession.h
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h [new file with mode: 0644]
Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h
Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm

index a92b983..f3d6e78 100644 (file)
@@ -1,3 +1,15 @@
+2018-08-02  Jer Noble  <jer.noble@apple.com>
+
+        Control center controls disappear when pausing, locking device.
+        https://bugs.webkit.org/show_bug.cgi?id=188282
+        <rdar://problem/42497809>
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac/media/audio-session-category-video-paused-expected.txt: Added.
+        * platform/mac/media/audio-session-category-video-paused.html: Added.
+        * platform/ios/TestExpectations:
+
 2018-08-02  Nan Wang  <n_wang@apple.com>
 
         AX: [iOS] add support to return the attributed string under the element
index 4812e2f..b881ed0 100644 (file)
@@ -3338,3 +3338,6 @@ webkit.org/b/186714 fast/forms/datalist/datalist-textinput-keydown.html [ Skip ]
 
 # We are only accepting GLSL3 for macOS. 
 webkit.org/b/187982 webgl/2.0.0/conformance2/glsl3 [ Skip ]
+
+# Audio session does not have a "none" category on iOS [ Skip ]
+webkit.org/b/188285 platform/mac/media/audio-session-category-video-paused.html [ Skip ]
diff --git a/LayoutTests/platform/mac/media/audio-session-category-video-paused-expected.txt b/LayoutTests/platform/mac/media/audio-session-category-video-paused-expected.txt
new file mode 100644 (file)
index 0000000..9ea0755
--- /dev/null
@@ -0,0 +1,19 @@
+
+RUN(internals.settings.setShouldManageAudioSessionCategory(true))
+RUN(video.src = findMediaFile("video", "../../../media/content/test"))
+RUN(video.play())
+EVENT(playing)
+EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
+RUN(video.pause())
+EVENT(pause)
+EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
+RUN(internals.beginMediaSessionInterruption("system"))
+EXPECTED (internals.audioSessionCategory() == 'None') OK
+RUN(video.play())
+EVENT(playing)
+EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
+RUN(video.src = "")
+RUN(video.load())
+EXPECTED (internals.audioSessionCategory() == 'None') OK
+END OF TEST
+
diff --git a/LayoutTests/platform/mac/media/audio-session-category-video-paused.html b/LayoutTests/platform/mac/media/audio-session-category-video-paused.html
new file mode 100644 (file)
index 0000000..5f5daa5
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>audio-session-category-track-change</title>
+    <script src="../../../media/video-test.js"></script>
+    <script src="../../../media/media-file.js"></script>
+    <script>
+    window.addEventListener('load', async event => {
+        findMediaElement();
+        run('internals.settings.setShouldManageAudioSessionCategory(true)');
+        run('video.src = findMediaFile("video", "../../../media/content/test")');
+        run('video.play()');
+        await waitFor(video, 'playing');
+        await testExpectedEventually('internals.audioSessionCategory()', 'MediaPlayback');
+
+        run('video.pause()');
+        await waitFor(video, 'pause');
+        await testExpectedEventually('internals.audioSessionCategory()', 'MediaPlayback');
+
+        run('internals.beginMediaSessionInterruption("system")');
+        await testExpectedEventually('internals.audioSessionCategory()', 'None');
+
+        run('video.play()');
+        await waitFor(video, 'playing');
+        await testExpectedEventually('internals.audioSessionCategory()', 'MediaPlayback');
+
+        run('video.src = ""');
+        run('video.load()');
+        await testExpectedEventually('internals.audioSessionCategory()', 'None');
+
+        endTest();
+    });
+    </script>
+</head>
+<body>
+    <video controls></video>
+</body>
+</html>
index ebb52ac..7202fcc 100644 (file)
@@ -1,3 +1,51 @@
+2018-08-02  Jer Noble  <jer.noble@apple.com>
+
+        Control center controls disappear when pausing, locking device.
+        https://bugs.webkit.org/show_bug.cgi?id=188282
+        <rdar://problem/42497809>
+
+        Reviewed by Eric Carlson.
+
+        Test: platform/mac/media/audio-session-category-video-paused.html
+
+        MediaRemote will set any app whose audio session category changes from MediaPlayback to
+        Ambient as not eligable for being the "now playing" app. Previously, due to the ordering of
+        events, we never moved from MediaPlayback to Ambient when pausing <video>, even though that
+        was the intention. Now that that bug is fixed, it exposed this new issue with MediaRemote.
+
+        To solve the new issue, make our audio session category policy more explicit: once we are in
+        MediaPlayback category, we will remain so as long as the media element in queston stays
+        loaded, has played, and is never interrupted by the system.
+
+        Make MediaSessionManagerCocoa a proper subclass of PlatformMediaSessionManager, and make
+        MediaSessionManageriOS and -Mac subclasses of the -Cocoa class. Add a new
+        m_hasPlayedSinceLastInterruption ivar to PlatformMediaSession, set when the state() changes
+        to Playing, and cleared during an interruption. Check this flag when deciding what audio 
+        sessino category to set in MediaSessionManagerCocoa.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/audio/PlatformMediaSession.cpp:
+        (WebCore::PlatformMediaSession::setState):
+        * platform/audio/PlatformMediaSession.h:
+        (WebCore::PlatformMediaSession::hasPlayedSinceLastInterruption const):
+        (WebCore::PlatformMediaSession::clearHasPlayedSinceLastInterruption):
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        (WebCore::PlatformMediaSessionManager::updateSessionState): Deleted.
+        * platform/audio/PlatformMediaSessionManager.h:
+        (WebCore::PlatformMediaSessionManager::audioHardwareListener):
+        (WebCore::PlatformMediaSessionManager::updateSessionState):
+        * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
+        (MediaSessionManagerCocoa::updateSessionState):
+        (MediaSessionManagerCocoa::beginInterruption):
+        (PlatformMediaSessionManager::updateSessionState): Deleted.
+        * platform/audio/cocoa/MediaSessionManagerCocoa.h: Added.
+        * platform/audio/ios/MediaSessionManagerIOS.h:
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
+        * platform/audio/mac/MediaSessionManagerMac.h:
+        * platform/audio/mac/MediaSessionManagerMac.mm:
+        (WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
+
 2018-08-02  Nan Wang  <n_wang@apple.com>
 
         AX: [iOS] add support to return the attributed string under the element
index 4876ac8..85288cd 100644 (file)
                CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD1E7346167BC78E009A885D /* TextTrackRepresentation.cpp */; };
                CD225C0B1C46FBF400140761 /* WebCoreNSURLSession.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD225C091C46FBF400140761 /* WebCoreNSURLSession.mm */; };
                CD225C0C1C46FBF400140761 /* WebCoreNSURLSession.h in Headers */ = {isa = PBXBuildFile; fileRef = CD225C0A1C46FBF400140761 /* WebCoreNSURLSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               CD227E3A2113C86200D285AF /* MediaSessionManagerCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = CD227E362113AEFA00D285AF /* MediaSessionManagerCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD2F4A2418D89F700063746D /* AudioHardwareListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CD2F4A2218D89F700063746D /* AudioHardwareListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD2F4A2818D8A3490063746D /* AudioHardwareListenerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = CD2F4A2618D8A3490063746D /* AudioHardwareListenerMac.h */; };
                CD318622199F1E2A0030A0F7 /* CDMPrivateMediaSourceAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD318620199F1E2A0030A0F7 /* CDMPrivateMediaSourceAVFObjC.mm */; };
                CD1E7346167BC78E009A885D /* TextTrackRepresentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextTrackRepresentation.cpp; sourceTree = "<group>"; };
                CD225C091C46FBF400140761 /* WebCoreNSURLSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSURLSession.mm; sourceTree = "<group>"; };
                CD225C0A1C46FBF400140761 /* WebCoreNSURLSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreNSURLSession.h; sourceTree = "<group>"; };
+               CD227E362113AEFA00D285AF /* MediaSessionManagerCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MediaSessionManagerCocoa.h; path = cocoa/MediaSessionManagerCocoa.h; sourceTree = "<group>"; };
                CD27F6E014575C1B0078207D /* MediaController.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MediaController.idl; sourceTree = "<group>"; };
                CD27F6E2145767580078207D /* JSMediaController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaController.cpp; sourceTree = "<group>"; };
                CD27F6E3145767580078207D /* JSMediaController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaController.h; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                CD669D661D232DFF004D1866 /* MediaSessionManagerCocoa.cpp */,
+                               CD227E362113AEFA00D285AF /* MediaSessionManagerCocoa.h */,
                                CDE667A21E4BBF1500E8154A /* WebAudioBufferList.cpp */,
                                CDE667A31E4BBF1500E8154A /* WebAudioBufferList.h */,
                        );
                                8371AC3B1F509BE400FBF284 /* ErrorCallback.h in Headers */,
                                2ECF7AE210162B5800427DE7 /* ErrorEvent.h in Headers */,
                                85031B420A44EFC700F992E0 /* Event.h in Headers */,
+                               CD227E3A2113C86200D285AF /* MediaSessionManagerCocoa.h in Headers */,
                                4138D3351244054800323D33 /* EventContext.h in Headers */,
                                418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */,
                                93C09A530B064DB3005ABD4D /* EventHandler.h in Headers */,
index ee19b67..fa99fee 100644 (file)
@@ -117,6 +117,8 @@ void PlatformMediaSession::setState(State state)
 
     INFO_LOG(LOGIDENTIFIER, state);
     m_state = state;
+    if (m_state == State::Playing)
+        m_hasPlayedSinceLastInterruption = true;
     PlatformMediaSessionManager::sharedManager().sessionStateChanged(*this);
 }
 
index fd6f08c..d97679d 100644 (file)
@@ -176,6 +176,9 @@ public:
 
     virtual bool allowsNowPlayingControlsVisibility() const { return false; }
 
+    bool hasPlayedSinceLastInterruption() const { return m_hasPlayedSinceLastInterruption; }
+    void clearHasPlayedSinceLastInterruption() { m_hasPlayedSinceLastInterruption = false; }
+
 protected:
     PlatformMediaSessionClient& client() const { return m_client; }
 
@@ -194,6 +197,7 @@ private:
     int m_interruptionCount { 0 };
     bool m_notifyingClient;
     bool m_isPlayingToWirelessPlaybackTarget { false };
+    bool m_hasPlayedSinceLastInterruption { false };
 
 #if !RELEASE_LOG_DISABLED
     Ref<const Logger> m_logger;
index 9531731..89fe550 100644 (file)
@@ -357,12 +357,6 @@ void PlatformMediaSessionManager::sessionCanProduceAudioChanged(PlatformMediaSes
     updateSessionState();
 }
 
-#if !PLATFORM(COCOA)
-void PlatformMediaSessionManager::updateSessionState()
-{
-}
-#endif
-
 void PlatformMediaSessionManager::didReceiveRemoteControlCommand(PlatformMediaSession::RemoteControlCommandType command, const PlatformMediaSession::RemoteCommandArgument* argument)
 {
     PlatformMediaSession* activeSession = currentSession();
index ad36383..4c9fe6e 100644 (file)
@@ -66,7 +66,7 @@ public:
     bool willIgnoreSystemInterruptions() const { return m_willIgnoreSystemInterruptions; }
     void setWillIgnoreSystemInterruptions(bool ignore) { m_willIgnoreSystemInterruptions = ignore; }
 
-    WEBCORE_EXPORT void beginInterruption(PlatformMediaSession::InterruptionType);
+    WEBCORE_EXPORT virtual void beginInterruption(PlatformMediaSession::InterruptionType);
     WEBCORE_EXPORT void endInterruption(PlatformMediaSession::EndInterruptionFlags);
 
     WEBCORE_EXPORT void applicationWillBecomeInactive() const;
@@ -123,10 +123,12 @@ protected:
     PlatformMediaSession* findSession(const Function<bool(PlatformMediaSession&, size_t)>&) const;
     bool anyOfSessions(const Function<bool(PlatformMediaSession&, size_t)>& predicate) const { return findSession(predicate); }
 
+    AudioHardwareListener* audioHardwareListener() { return m_audioHardwareListener.get(); }
+
 private:
     friend class Internals;
 
-    void updateSessionState();
+    virtual void updateSessionState() { }
 
     // RemoteCommandListenerClient
     WEBCORE_EXPORT void didReceiveRemoteControlCommand(PlatformMediaSession::RemoteControlCommandType, const PlatformMediaSession::RemoteCommandArgument*) override;
index b3e1627..5da5127 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "PlatformMediaSessionManager.h"
+#include "MediaSessionManagerCocoa.h"
 
 #if USE(AUDIO_SESSION)
 
@@ -38,7 +38,7 @@ using namespace WebCore;
 static const size_t kWebAudioBufferSize = 128;
 static const size_t kLowPowerVideoBufferSize = 4096;
 
-void PlatformMediaSessionManager::updateSessionState()
+void MediaSessionManagerCocoa::updateSessionState()
 {
     LOG(Media, "PlatformMediaSessionManager::scheduleUpdateSessionState() - types: Video(%d), Audio(%d), WebAudio(%d)", count(PlatformMediaSession::Video), count(PlatformMediaSession::Audio), count(PlatformMediaSession::WebAudio));
 
@@ -53,7 +53,7 @@ void PlatformMediaSessionManager::updateSessionState()
         // causes media LayoutTests to fail on 10.8.
 
         size_t bufferSize;
-        if (m_audioHardwareListener && m_audioHardwareListener->outputDeviceSupportsLowPowerMode())
+        if (audioHardwareListener() && audioHardwareListener()->outputDeviceSupportsLowPowerMode())
             bufferSize = kLowPowerVideoBufferSize;
         else
             bufferSize = kWebAudioBufferSize;
@@ -70,7 +70,7 @@ void PlatformMediaSessionManager::updateSessionState()
         auto type = session.mediaType();
         if (type == PlatformMediaSession::WebAudio)
             hasWebAudioType = true;
-        if ((type == PlatformMediaSession::VideoAudio || type == PlatformMediaSession::Audio) && session.canProduceAudio() && session.state() == PlatformMediaSession::Playing)
+        if ((type == PlatformMediaSession::VideoAudio || type == PlatformMediaSession::Audio) && session.canProduceAudio() && session.hasPlayedSinceLastInterruption())
             hasAudibleAudioOrVideoMediaType = true;
         if (session.isPlayingToWirelessPlaybackTarget())
             hasAudibleAudioOrVideoMediaType = true;
@@ -87,4 +87,15 @@ void PlatformMediaSessionManager::updateSessionState()
         AudioSession::sharedSession().setCategory(AudioSession::None);
 }
 
+void MediaSessionManagerCocoa::beginInterruption(PlatformMediaSession::InterruptionType type)
+{
+    if (type == PlatformMediaSession::InterruptionType::SystemInterruption) {
+        forEachSession([] (PlatformMediaSession& session, size_t) {
+            session.clearHasPlayedSinceLastInterruption();
+        });
+    }
+
+    PlatformMediaSessionManager::beginInterruption(type);
+}
+
 #endif // USE(AUDIO_SESSION)
diff --git a/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h b/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h
new file mode 100644 (file)
index 0000000..41fea14
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+#pragma once
+
+#if PLATFORM(COCOA)
+
+#include "PlatformMediaSessionManager.h"
+
+namespace WebCore {
+
+class MediaSessionManagerCocoa : public PlatformMediaSessionManager {
+public:
+    void updateSessionState() override;
+    void beginInterruption(PlatformMediaSession::InterruptionType) override;
+};
+
+}
+
+#endif // PLATFORM(COCOA)
index ee193f4..b9a8608 100644 (file)
@@ -27,7 +27,7 @@
 
 #if PLATFORM(IOS)
 
-#include "PlatformMediaSessionManager.h"
+#include "MediaSessionManagerCocoa.h"
 #include <wtf/RetainPtr.h>
 
 OBJC_CLASS WebMediaSessionHelper;
@@ -41,7 +41,7 @@ extern NSString* WebUIApplicationDidEnterBackgroundNotification;
 
 namespace WebCore {
 
-class MediaSessionManageriOS : public PlatformMediaSessionManager {
+class MediaSessionManageriOS : public MediaSessionManagerCocoa {
 public:
     virtual ~MediaSessionManageriOS();
 
index ca634b7..1cbfc65 100644 (file)
@@ -144,7 +144,7 @@ PlatformMediaSessionManager* PlatformMediaSessionManager::sharedManagerIfExists(
 }
 
 MediaSessionManageriOS::MediaSessionManageriOS()
-    : PlatformMediaSessionManager()
+    : MediaSessionManagerCocoa()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
     m_objcObserver = adoptNS([[WebMediaSessionHelper alloc] initWithCallback:this]);
index 499f05b..2907695 100644 (file)
 #if PLATFORM(MAC)
 
 #include "GenericTaskQueue.h"
-#include "PlatformMediaSessionManager.h"
+#include "MediaSessionManagerCocoa.h"
 
 namespace WebCore {
 
-class MediaSessionManagerMac : public PlatformMediaSessionManager {
+class MediaSessionManagerMac : public MediaSessionManagerCocoa {
 public:
     virtual ~MediaSessionManagerMac();
 
index 67af08b..cb83304 100644 (file)
@@ -55,7 +55,7 @@ PlatformMediaSessionManager* PlatformMediaSessionManager::sharedManagerIfExists(
 }
 
 MediaSessionManagerMac::MediaSessionManagerMac()
-    : PlatformMediaSessionManager()
+    : MediaSessionManagerCocoa()
 {
     resetRestrictions();
 }