Title: [282727] trunk/Source/WebCore
Revision
282727
Author
[email protected]
Date
2021-09-18 09:12:47 -0700 (Sat, 18 Sep 2021)

Log Message

[GTK] Disable MediaSessionManagerGLib when MEDIA_SESSION disabled
https://bugs.webkit.org/show_bug.cgi?id=230420

Reviewed by Philippe Normand.

Previously WebKit would try to own the MPRIS bus names even though
the feature was disabled.

* platform/RemoteCommandListener.cpp:
(WebCore::RemoteCommandListener::resetCreationFunction):
* platform/audio/PlatformMediaSessionManager.cpp:
* platform/audio/glib/MediaSessionManagerGLib.cpp:
* platform/audio/glib/MediaSessionManagerGLib.h:
* platform/glib/RemoteCommandListenerGLib.cpp:
* platform/glib/RemoteCommandListenerGLib.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (282726 => 282727)


--- trunk/Source/WebCore/ChangeLog	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/ChangeLog	2021-09-18 16:12:47 UTC (rev 282727)
@@ -1,3 +1,21 @@
+2021-09-18  Patrick Griffis  <[email protected]>
+
+        [GTK] Disable MediaSessionManagerGLib when MEDIA_SESSION disabled
+        https://bugs.webkit.org/show_bug.cgi?id=230420
+
+        Reviewed by Philippe Normand.
+
+        Previously WebKit would try to own the MPRIS bus names even though
+        the feature was disabled.
+
+        * platform/RemoteCommandListener.cpp:
+        (WebCore::RemoteCommandListener::resetCreationFunction):
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        * platform/audio/glib/MediaSessionManagerGLib.cpp:
+        * platform/audio/glib/MediaSessionManagerGLib.h:
+        * platform/glib/RemoteCommandListenerGLib.cpp:
+        * platform/glib/RemoteCommandListenerGLib.h:
+
 2021-09-18  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Stretch the inline box with glyphs coming from fallback fonts.

Modified: trunk/Source/WebCore/platform/RemoteCommandListener.cpp (282726 => 282727)


--- trunk/Source/WebCore/platform/RemoteCommandListener.cpp	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/RemoteCommandListener.cpp	2021-09-18 16:12:47 UTC (rev 282727)
@@ -52,7 +52,7 @@
     remoteCommandListenerCreationFunction() = [] (RemoteCommandListenerClient& client) {
 #if PLATFORM(COCOA)
         return RemoteCommandListenerCocoa::create(client);
-#elif USE(GLIB)
+#elif USE(GLIB) && ENABLE(MEDIA_SESSION)
         return RemoteCommandListenerGLib::create(client);
 #else
         UNUSED_PARAM(client);

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (282726 => 282727)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2021-09-18 16:12:47 UTC (rev 282727)
@@ -74,12 +74,12 @@
     return sharedPlatformMediaSessionManager().get();
 }
 
-#if !PLATFORM(COCOA) && !USE(GLIB)
+#if !PLATFORM(COCOA) && (!USE(GLIB) || !ENABLE(MEDIA_SESSION))
 std::unique_ptr<PlatformMediaSessionManager> PlatformMediaSessionManager::create()
 {
     return std::unique_ptr<PlatformMediaSessionManager>(new PlatformMediaSessionManager);
 }
-#endif // !PLATFORM(COCOA) && !USE(GLIB)
+#endif // !PLATFORM(COCOA) && (!USE(GLIB) || !ENABLE(MEDIA_SESSION))
 
 void PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary()
 {

Modified: trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp (282726 => 282727)


--- trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp	2021-09-18 16:12:47 UTC (rev 282727)
@@ -19,7 +19,7 @@
 #include "config.h"
 #include "MediaSessionManagerGLib.h"
 
-#if USE(GLIB)
+#if USE(GLIB) && ENABLE(MEDIA_SESSION)
 
 #include "ApplicationGLib.h"
 #include "AudioSession.h"

Modified: trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h (282726 => 282727)


--- trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h	2021-09-18 16:12:47 UTC (rev 282727)
@@ -18,7 +18,7 @@
 
 #pragma once
 
-#if USE(GLIB)
+#if USE(GLIB) && ENABLE(MEDIA_SESSION)
 
 #include "NowPlayingManager.h"
 #include "PlatformMediaSessionManager.h"

Modified: trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.cpp (282726 => 282727)


--- trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.cpp	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.cpp	2021-09-18 16:12:47 UTC (rev 282727)
@@ -19,7 +19,7 @@
 #include "config.h"
 #include "RemoteCommandListenerGLib.h"
 
-#if USE(GLIB)
+#if USE(GLIB) && ENABLE(MEDIA_SESSION)
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.h (282726 => 282727)


--- trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.h	2021-09-18 15:59:14 UTC (rev 282726)
+++ trunk/Source/WebCore/platform/glib/RemoteCommandListenerGLib.h	2021-09-18 16:12:47 UTC (rev 282727)
@@ -20,7 +20,7 @@
 
 #include "RemoteCommandListener.h"
 
-#if USE(GLIB)
+#if USE(GLIB) && ENABLE(MEDIA_SESSION)
 
 namespace WebCore {
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to