Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2018 00:00:32 +0000 (00:00 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Mar 2018 00:00:32 +0000 (00:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183954
<rdar://problem/38808858>

Reviewed by Dan Bernstein.

* wtf/Platform.h:

* WebView/WebPreferences.mm:
(-[WebPreferences setAudioSessionCategoryOverride:]):

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

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferences.mm

index 148978b99352aef5d6bad796e9d97591200fbd62..7c06a7d8d77efb51cb2efea2d579016d20c69f7d 100644 (file)
@@ -1,3 +1,13 @@
+2018-03-23  Tim Horton  <timothy_horton@apple.com>
+
+        Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
+        https://bugs.webkit.org/show_bug.cgi?id=183954
+        <rdar://problem/38808858>
+
+        Reviewed by Dan Bernstein.
+
+        * wtf/Platform.h:
+
 2018-03-23  David Kilzer  <ddkilzer@apple.com>
 
         Stop using dispatch_set_target_queue()
index da4b90a6fcf0cf58895367ae310c9424652b9ce6..84bc44c74505c328b0e6dd884df3f1b0a073d93d 100644 (file)
 #define HAVE_APP_LINKS 1
 #endif
 #if !ENABLE(MINIMAL_SIMULATOR)
+#define HAVE_AUDIO_TOOLBOX_AUDIO_SESSION 1
 #define HAVE_CELESTIAL 1
 #endif
 #endif
index 662e3acd9d0328d6e229f252b589dfa27c3c6188..d16bb60c7ae8c45129ddc6fce9f2237e03716ddb 100644 (file)
@@ -1,3 +1,14 @@
+2018-03-23  Tim Horton  <timothy_horton@apple.com>
+
+        Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
+        https://bugs.webkit.org/show_bug.cgi?id=183954
+        <rdar://problem/38808858>
+
+        Reviewed by Dan Bernstein.
+
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences setAudioSessionCategoryOverride:]):
+
 2018-03-23  Tim Horton  <timothy_horton@apple.com>
 
         Adopt WK_PLATFORM_NAME in WebKitLegacy
index c30b6f0513a8f92919361d18441b55d9d7b86b55..344bad56d83cab31a576b97d31b86b3e33468fd7 100644 (file)
 
 using namespace WebCore;
 
-#if PLATFORM(IOS)
+#if HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
 #import <AudioToolbox/AudioSession.h>
+#endif
+
+#if PLATFORM(IOS)
 #import <WebCore/Device.h>
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/WebCoreThreadMessage.h>
@@ -2322,6 +2325,7 @@ static NSString *classIBCreatorID = nil;
 
 - (void)setAudioSessionCategoryOverride:(unsigned)override
 {
+#if HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
     if (override > AudioSession::AudioProcessing) {
         // Clients are passing us OSTypes values from AudioToolbox/AudioSession.h,
         // which need to be translated into AudioSession::CategoryType:
@@ -2349,6 +2353,7 @@ static NSString *classIBCreatorID = nil;
             break;
         }
     }
+#endif
 
     [self _setUnsignedIntValue:override forKey:WebKitAudioSessionCategoryOverride];
 }