Title: [261110] trunk
Revision
261110
Author
[email protected]
Date
2020-05-04 13:21:43 -0700 (Mon, 04 May 2020)

Log Message

Remove unneeded USE(MEDIAREMOTE)
https://bugs.webkit.org/show_bug.cgi?id=211385

Reviewed by Eric Carlson.

Source/WebCore:

* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE).
* platform/mac/MediaRemoteSoftLink.cpp: Ditto.
* platform/mac/MediaRemoteSoftLink.h: Ditto.
* platform/mac/RemoteCommandListenerMac.mm:
(WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto.
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto.
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto.

Source/WebCore/PAL:

* pal/spi/mac/MediaRemoteSPI.h: Removed check of USE(MEDIAREMOTE).
Also got rid of __has_include for MRNowPlayingTypes.h and moved
it down into the normal sections below.

Source/WTF:

* wtf/PlatformUse.h: Don't set USE_MEDIAREMOTE.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Reverse conditional so it's
consistently listing which platforms we do *not* compile the test on.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (261109 => 261110)


--- trunk/Source/WTF/ChangeLog	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WTF/ChangeLog	2020-05-04 20:21:43 UTC (rev 261110)
@@ -1,5 +1,14 @@
 2020-05-04  Darin Adler  <[email protected]>
 
+        Remove unneeded USE(MEDIAREMOTE)
+        https://bugs.webkit.org/show_bug.cgi?id=211385
+
+        Reviewed by Eric Carlson.
+
+        * wtf/PlatformUse.h: Don't set USE_MEDIAREMOTE.
+
+2020-05-04  Darin Adler  <[email protected]>
+
         Remove now-unneded HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
         https://bugs.webkit.org/show_bug.cgi?id=211380
 

Modified: trunk/Source/WTF/wtf/PlatformUse.h (261109 => 261110)


--- trunk/Source/WTF/wtf/PlatformUse.h	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2020-05-04 20:21:43 UTC (rev 261110)
@@ -270,7 +270,6 @@
 #endif
 
 #if PLATFORM(COCOA)
-#define USE_MEDIAREMOTE 1
 #define USE_DICTATION_ALTERNATIVES 1
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (261109 => 261110)


--- trunk/Source/WebCore/ChangeLog	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/ChangeLog	2020-05-04 20:21:43 UTC (rev 261110)
@@ -1,3 +1,19 @@
+2020-05-04  Darin Adler  <[email protected]>
+
+        Remove unneeded USE(MEDIAREMOTE)
+        https://bugs.webkit.org/show_bug.cgi?id=211385
+
+        Reviewed by Eric Carlson.
+
+        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+        (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE).
+        * platform/mac/MediaRemoteSoftLink.cpp: Ditto.
+        * platform/mac/MediaRemoteSoftLink.h: Ditto.
+        * platform/mac/RemoteCommandListenerMac.mm:
+        (WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto.
+        (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto.
+        (WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto.
+
 2020-05-04  Devin Rousso  <[email protected]>
 
         Web Inspector: Worker: should use the name of the worker if it exists

Modified: trunk/Source/WebCore/PAL/ChangeLog (261109 => 261110)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-05-04 20:21:43 UTC (rev 261110)
@@ -1,3 +1,14 @@
+2020-05-04  Darin Adler  <[email protected]>
+
+        Remove unneeded USE(MEDIAREMOTE)
+        https://bugs.webkit.org/show_bug.cgi?id=211385
+
+        Reviewed by Eric Carlson.
+
+        * pal/spi/mac/MediaRemoteSPI.h: Removed check of USE(MEDIAREMOTE).
+        Also got rid of __has_include for MRNowPlayingTypes.h and moved
+        it down into the normal sections below.
+
 2020-05-01  Don Olmstead  <[email protected]>
 
         Use export macros on all platforms

Modified: trunk/Source/WebCore/PAL/pal/spi/mac/MediaRemoteSPI.h (261109 => 261110)


--- trunk/Source/WebCore/PAL/pal/spi/mac/MediaRemoteSPI.h	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/MediaRemoteSPI.h	2020-05-04 20:21:43 UTC (rev 261110)
@@ -25,26 +25,9 @@
 
 #pragma once
 
-#if USE(MEDIAREMOTE)
+#if USE(APPLE_INTERNAL_SDK)
 
-#if __has_include(<MediaRemote/MRNowPlayingTypes.h>)
-
 #include <MediaRemote/MRNowPlayingTypes.h>
-
-#else
-
-enum {
-    MRNowPlayingClientVisibilityUndefined = 0,
-    MRNowPlayingClientVisibilityAlwaysVisible,
-    MRNowPlayingClientVisibilityVisibleWhenBackgrounded,
-    MRNowPlayingClientVisibilityNeverVisible
-};
-typedef uint32_t MRNowPlayingClientVisibility;
-
-#endif
-
-#if USE(APPLE_INTERNAL_SDK)
-
 #include <MediaRemote/MediaRemote.h>
 
 #else
@@ -100,6 +83,14 @@
 };
 typedef uint32_t MRMediaRemoteCommandHandlerStatus;
 
+enum {
+    MRNowPlayingClientVisibilityUndefined = 0,
+    MRNowPlayingClientVisibilityAlwaysVisible,
+    MRNowPlayingClientVisibilityVisibleWhenBackgrounded,
+    MRNowPlayingClientVisibilityNeverVisible
+};
+typedef uint32_t MRNowPlayingClientVisibility;
+
 typedef uint32_t MRMediaRemoteError;
 typedef struct _MROrigin *MROriginRef;
 typedef struct _MRMediaRemoteCommandInfo *MRMediaRemoteCommandInfoRef;
@@ -139,5 +130,3 @@
 WTF_EXTERN_C_END
 
 #endif // USE(APPLE_INTERNAL_SDK)
-
-#endif // USE(MEDIAREMOTE)

Modified: trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm (261109 => 261110)


--- trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2020-05-04 20:21:43 UTC (rev 261110)
@@ -312,7 +312,6 @@
 
 void MediaSessionManagerCocoa::updateNowPlayingInfo()
 {
-#if USE(MEDIAREMOTE)
     if (!isMediaRemoteFrameworkAvailable())
         return;
 
@@ -361,7 +360,6 @@
     m_nowPlayingActive = nowPlayingInfo->allowsNowPlayingControlsVisibility;
 
     END_BLOCK_OBJC_EXCEPTIONS
-#endif // USE(MEDIAREMOTE)
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp (261109 => 261110)


--- trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp	2020-05-04 20:21:43 UTC (rev 261110)
@@ -30,8 +30,6 @@
 
 SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(WebCore, MediaRemote)
 
-#if USE(MEDIAREMOTE)
-
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteGetLocalOrigin, MROriginRef, (), ())
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteAddAsyncCommandHandlerBlock, void*, (MRMediaRemoteAsyncCommandHandlerBlock block), (block))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteRemoveCommandHandlerBlock, void, (void* observer), (observer))
@@ -52,8 +50,6 @@
 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, MediaRemote, kMRMediaRemoteOptionPlaybackPosition, CFStringRef);
 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, MediaRemote, kMRMediaRemoteNowPlayingInfoUniqueIdentifier, CFStringRef);
 
-#endif // USE(MEDIAREMOTE)
-
 #if PLATFORM(IOS_FAMILY)
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteCopyPickableRoutes, CFArrayRef, (), ());
 #endif

Modified: trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.h (261109 => 261110)


--- trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.h	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/platform/mac/MediaRemoteSoftLink.h	2020-05-04 20:21:43 UTC (rev 261110)
@@ -30,8 +30,6 @@
 
 SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, MediaRemote)
 
-#if USE(MEDIAREMOTE)
-
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteGetLocalOrigin, MROriginRef, (), ())
 #define MRMediaRemoteGetLocalOrigin softLink_MediaRemote_MRMediaRemoteGetLocalOrigin
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteAddAsyncCommandHandlerBlock, void*, (MRMediaRemoteAsyncCommandHandlerBlock block), (block))
@@ -71,8 +69,6 @@
 SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, MediaRemote, kMRMediaRemoteNowPlayingInfoUniqueIdentifier, CFStringRef);
 #define kMRMediaRemoteNowPlayingInfoUniqueIdentifier get_MediaRemote_kMRMediaRemoteNowPlayingInfoUniqueIdentifier()
 
-#endif // USE(MEDIAREMOTE)
-
 #if PLATFORM(IOS_FAMILY)
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteCopyPickableRoutes, CFArrayRef, (), ())
 #define MRMediaRemoteCopyPickableRoutes softLink_MediaRemote_MRMediaRemoteCopyPickableRoutes

Modified: trunk/Source/WebCore/platform/mac/RemoteCommandListenerMac.mm (261109 => 261110)


--- trunk/Source/WebCore/platform/mac/RemoteCommandListenerMac.mm	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Source/WebCore/platform/mac/RemoteCommandListenerMac.mm	2020-05-04 20:21:43 UTC (rev 261110)
@@ -42,7 +42,6 @@
 
 void RemoteCommandListenerMac::updateSupportedCommands()
 {
-#if USE(MEDIAREMOTE)
     if (!isMediaRemoteFrameworkAvailable())
         return;
 
@@ -72,13 +71,11 @@
     CFArrayAppendValue(commandInfoArray.get(), seekCommandInfo.get());
 
     MRMediaRemoteSetSupportedCommands(commandInfoArray.get(), MRMediaRemoteGetLocalOrigin(), nullptr, nullptr);
-#endif // USE(MEDIAREMOTE)
 }
 
 RemoteCommandListenerMac::RemoteCommandListenerMac(RemoteCommandListenerClient& client)
     : RemoteCommandListener(client)
 {
-#if USE(MEDIAREMOTE)
     if (!isMediaRemoteFrameworkAvailable())
         return;
 
@@ -144,15 +141,12 @@
 
         completion((__bridge CFArrayRef)@[@(status)]);
     });
-#endif // USE(MEDIAREMOTE)
 }
 
 RemoteCommandListenerMac::~RemoteCommandListenerMac()
 {
-#if USE(MEDIAREMOTE)
     if (m_commandHandler)
         MRMediaRemoteRemoveCommandHandlerBlock(m_commandHandler);
-#endif
 }
 
 }

Modified: trunk/Tools/ChangeLog (261109 => 261110)


--- trunk/Tools/ChangeLog	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Tools/ChangeLog	2020-05-04 20:21:43 UTC (rev 261110)
@@ -1,3 +1,13 @@
+2020-05-04  Darin Adler  <[email protected]>
+
+        Remove unneeded USE(MEDIAREMOTE)
+        https://bugs.webkit.org/show_bug.cgi?id=211385
+
+        Reviewed by Eric Carlson.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Reverse conditional so it's
+        consistently listing which platforms we do *not* compile the test on.
+
 2020-05-04  Alex Christensen  <[email protected]>
 
         [Catalina] ASSERTION FAILED: Unsafe to ref/deref from different threads seen with TestWebKitAPI.MultipleClientCertificateConnections.Failure

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm (261109 => 261110)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm	2020-05-04 20:14:10 UTC (rev 261109)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm	2020-05-04 20:21:43 UTC (rev 261110)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if USE(MEDIAREMOTE) && !PLATFORM(IOS_FAMILY_SIMULATOR) && (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304))
+#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101304)
 
 #import "PlatformUtilities.h"
 #import "TestWKWebView.h"
@@ -276,4 +276,4 @@
     ASSERT_NE(webViewPid(), getNowPlayingClientPid());
 }
 
-#endif // USE(MEDIAREMOTE) && (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304))
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to