Adopt MediaRemote.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2016 19:29:07 +0000 (19:29 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2016 19:29:07 +0000 (19:29 +0000)
commit167167933979e4780eee5daacadbbcf2de905d25
treefa9968d70c87888109a39865015dfe9d71f7f014
parentf7742bbb51fbfd91bff6a4804f7b915a14042338
Adopt MediaRemote.
https://bugs.webkit.org/show_bug.cgi?id=159250

Reviewed by Eric Carlson.

Source/WebCore:

Adopt MediaRemote and use the framework to implement MediaSessionManageMac
and RemoteCommandListenerMac.

* WebCore.xcodeproj/project.pbxproj:
* platform/RemoteCommandListener.cpp:
* platform/audio/PlatformMediaSessionManager.cpp:
* platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.cpp.
(PlatformMediaSessionManager::updateSessionState):
* platform/audio/mac/MediaSessionManagerMac.h: Added.
* platform/audio/mac/MediaSessionManagerMac.mm: Added.
(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
(WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::~MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::sessionWillBeginPlayback):
(WebCore::MediaSessionManagerMac::removeSession):
(WebCore::MediaSessionManagerMac::sessionWillEndPlayback):
(WebCore::MediaSessionManagerMac::clientCharacteristicsChanged):
(WebCore::MediaSessionManagerMac::nowPlayingEligibleSession):
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
* platform/cocoa/SoftLinking.h:
* platform/mac/MediaRemoteSoftLink.cpp: Added.
* platform/mac/MediaRemoteSoftLink.h: Added.
* platform/mac/RemoteCommandListenerMac.h: Added.
(WebCore::RemoteCommandListenerMac::createWeakPtr):
* platform/mac/RemoteCommandListenerMac.mm: Added.
(WebCore::RemoteCommandListener::create):
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac):
* platform/spi/mac/MediaRemoteSPI.h: Added.

Source/WebKit2:

Add a sandbox exception allowing access to the mediaremoted XPC service.

* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

Add USE_MEDIAREMOTE.

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/RemoteCommandListener.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp [moved from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.cpp with 98% similarity]
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h [new file with mode: 0644]
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm [new file with mode: 0644]
Source/WebCore/platform/cocoa/SoftLinking.h
Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp [new file with mode: 0644]
Source/WebCore/platform/mac/MediaRemoteSoftLink.h [new file with mode: 0644]
Source/WebCore/platform/mac/RemoteCommandListenerMac.h [new file with mode: 0644]
Source/WebCore/platform/mac/RemoteCommandListenerMac.mm [new file with mode: 0644]
Source/WebCore/platform/spi/mac/MediaRemoteSPI.h [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in