Title: [241281] trunk/Source
Revision
241281
Author
jer.no...@apple.com
Date
2019-02-11 14:52:18 -0800 (Mon, 11 Feb 2019)

Log Message

[Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
https://bugs.webkit.org/show_bug.cgi?id=194504

Reviewed by Eric Carlson.

Source/WebCore:

This allows the MediaRemote framework to associate the WebContent process with its host application.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::prepareToSendUserMediaPermissionRequest):
* platform/audio/cocoa/MediaSessionManagerCocoa.h:
* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(MediaSessionManagerCocoa::prepareToSendUserMediaPermissionRequest):
(MediaSessionManagerCocoa::providePresentingApplicationPIDIfNecessary):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/spi/ios/CelestialSPI.h: Renamed from Source/WebKit/Platform/spi/ios/CelestialSPI.h.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
(WebKit::WebUserMediaClient::requestUserMediaAccess):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241280 => 241281)


--- trunk/Source/WebCore/ChangeLog	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/ChangeLog	2019-02-11 22:52:18 UTC (rev 241281)
@@ -1,3 +1,22 @@
+2019-02-11  Jer Noble  <jer.no...@apple.com>
+
+        [Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
+        https://bugs.webkit.org/show_bug.cgi?id=194504
+
+        Reviewed by Eric Carlson.
+
+        This allows the MediaRemote framework to associate the WebContent process with its host application.
+
+        * Modules/mediastream/UserMediaRequest.cpp:
+        (WebCore::UserMediaRequest::start):
+        * platform/audio/PlatformMediaSessionManager.h:
+        (WebCore::PlatformMediaSessionManager::prepareToSendUserMediaPermissionRequest):
+        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
+        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+        (MediaSessionManagerCocoa::prepareToSendUserMediaPermissionRequest):
+        (MediaSessionManagerCocoa::providePresentingApplicationPIDIfNecessary):
+        (MediaSessionManagerCocoa::updateNowPlayingInfo):
+
 2019-02-11  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r241272 and r241276.

Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (241280 => 241281)


--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp	2019-02-11 22:52:18 UTC (rev 241281)
@@ -42,6 +42,7 @@
 #include "JSOverconstrainedError.h"
 #include "Logging.h"
 #include "MediaConstraints.h"
+#include "PlatformMediaSessionManager.h"
 #include "RealtimeMediaSourceCenter.h"
 #include "SchemeRegistry.h"
 #include "Settings.h"
@@ -209,6 +210,7 @@
         return;
     }
 
+    PlatformMediaSessionManager::sharedManager().prepareToSendUserMediaPermissionRequest();
     controller->requestUserMediaAccess(*this);
 }
 

Modified: trunk/Source/WebCore/PAL/ChangeLog (241280 => 241281)


--- trunk/Source/WebCore/PAL/ChangeLog	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/PAL/ChangeLog	2019-02-11 22:52:18 UTC (rev 241281)
@@ -1,3 +1,13 @@
+2019-02-11  Jer Noble  <jer.no...@apple.com>
+
+        [Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
+        https://bugs.webkit.org/show_bug.cgi?id=194504
+
+        Reviewed by Eric Carlson.
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/spi/ios/CelestialSPI.h: Renamed from Source/WebKit/Platform/spi/ios/CelestialSPI.h.
+
 2019-02-11  Truitt Savell  <tsav...@apple.com>
 
         Unreviewed, rolling out r241229.

Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (241280 => 241281)


--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2019-02-11 22:52:18 UTC (rev 241281)
@@ -154,6 +154,7 @@
 		A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */; };
 		A3C66CDC1F462D6A009E6EE9 /* SessionID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */; };
 		A3C66CDD1F462D6A009E6EE9 /* SessionID.h in Headers */ = {isa = PBXBuildFile; fileRef = A3C66CDB1F462D6A009E6EE9 /* SessionID.h */; };
+		CDF91113220E4EEC001EA39E /* CelestialSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF91112220E4EEC001EA39E /* CelestialSPI.h */; };
 		CE5673872151A7B9002F92D7 /* IOKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5673862151A7B9002F92D7 /* IOKitSPI.h */; };
 		E5D45D122106A07400D2B738 /* NSColorWellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D45D112106A07400D2B738 /* NSColorWellSPI.h */; };
 		E5D45D142106A18700D2B738 /* NSPopoverColorWellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D45D132106A18700D2B738 /* NSPopoverColorWellSPI.h */; };
@@ -317,6 +318,7 @@
 		A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionID.cpp; sourceTree = "<group>"; };
 		A3C66CDB1F462D6A009E6EE9 /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionID.h; sourceTree = "<group>"; };
 		C2147A4A1EFD0AA600056FA5 /* CopyPALHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyPALHeaders.xcconfig; sourceTree = "<group>"; };
+		CDF91112220E4EEC001EA39E /* CelestialSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CelestialSPI.h; sourceTree = "<group>"; };
 		CE5673862151A7B9002F92D7 /* IOKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOKitSPI.h; sourceTree = "<group>"; };
 		E5D45D112106A07400D2B738 /* NSColorWellSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSColorWellSPI.h; sourceTree = "<group>"; };
 		E5D45D132106A18700D2B738 /* NSPopoverColorWellSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSPopoverColorWellSPI.h; sourceTree = "<group>"; };
@@ -427,6 +429,7 @@
 		0C5AF90D1F43A4A4002EAC02 /* ios */ = {
 			isa = PBXGroup;
 			children = (
+				CDF91112220E4EEC001EA39E /* CelestialSPI.h */,
 				0C5AF90F1F43A4C7002EAC02 /* CoreUISPI.h */,
 				0C5AF9101F43A4C7002EAC02 /* DataDetectorsUISPI.h */,
 				0C5AF9111F43A4C7002EAC02 /* GraphicsServicesSPI.h */,
@@ -671,6 +674,7 @@
 				2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */,
 				0C7785891F45130F00F4EBB6 /* AVFoundationSPI.h in Headers */,
 				0C2DA13E1F3BEB4900DBC317 /* AVKitSPI.h in Headers */,
+				CDF91113220E4EEC001EA39E /* CelestialSPI.h in Headers */,
 				0C2DA06D1F33CA8400DBC317 /* CFLocaleSPI.h in Headers */,
 				0C2DA06E1F33CA8400DBC317 /* CFNetworkConnectionCacheSPI.h in Headers */,
 				0C2DA06F1F33CA8400DBC317 /* CFNetworkSPI.h in Headers */,

Copied: trunk/Source/WebCore/PAL/pal/spi/ios/CelestialSPI.h (from rev 241280, trunk/Source/WebKit/Platform/spi/ios/CelestialSPI.h) (0 => 241281)


--- trunk/Source/WebCore/PAL/pal/spi/ios/CelestialSPI.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/CelestialSPI.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2017 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.
+ */
+
+#if PLATFORM(IOS_FAMILY)
+
+#pragma once
+
+#import <Foundation/Foundation.h>
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <Celestial/AVSystemController.h>
+
+#else
+
+@interface AVSystemController : NSObject
+
++(AVSystemController*)sharedAVSystemController;
+
+- (id)attributeForKey:(NSString *)attributeKey;
+- (BOOL)setAttribute:(id)value forKey:(NSString *)attributeKey error:(NSError **)errorPtr;
+
+@end
+
+#endif
+
+#endif // PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (241280 => 241281)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -64,6 +64,7 @@
     virtual double lastUpdatedNowPlayingElapsedTime() const { return NAN; }
     virtual uint64_t lastUpdatedNowPlayingInfoUniqueIdentifier() const { return 0; }
     virtual bool registeredAsNowPlayingApplication() const { return false; }
+    virtual void prepareToSendUserMediaPermissionRequest() { }
 
     bool willIgnoreSystemInterruptions() const { return m_willIgnoreSystemInterruptions; }
     void setWillIgnoreSystemInterruptions(bool ignore) { m_willIgnoreSystemInterruptions = ignore; }

Modified: trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h (241280 => 241281)


--- trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -45,6 +45,7 @@
     double lastUpdatedNowPlayingElapsedTime() const final { return m_lastUpdatedNowPlayingElapsedTime; }
     uint64_t lastUpdatedNowPlayingInfoUniqueIdentifier() const final { return m_lastUpdatedNowPlayingInfoUniqueIdentifier; }
     bool registeredAsNowPlayingApplication() const final { return m_registeredAsNowPlayingApplication; }
+    void prepareToSendUserMediaPermissionRequest() final;
 
 protected:
     void scheduleUpdateNowPlayingInfo() override;
@@ -57,12 +58,14 @@
     void clientCharacteristicsChanged(PlatformMediaSession&) override;
     void sessionCanProduceAudioChanged(PlatformMediaSession&) override;
 
+    virtual void providePresentingApplicationPIDIfNecessary() { }
+
     PlatformMediaSession* nowPlayingEligibleSession();
 
 private:
     bool m_nowPlayingActive { false };
     bool m_registeredAsNowPlayingApplication { false };
-    
+
     // For testing purposes only.
     String m_lastUpdatedNowPlayingTitle;
     double m_lastUpdatedNowPlayingDuration { NAN };

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


--- trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm	2019-02-11 22:52:18 UTC (rev 241281)
@@ -120,6 +120,11 @@
     PlatformMediaSessionManager::beginInterruption(type);
 }
 
+void MediaSessionManagerCocoa::prepareToSendUserMediaPermissionRequest()
+{
+    providePresentingApplicationPIDIfNecessary();
+}
+
 void MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo()
 {
     if (!m_nowPlayingUpdateTaskQueue.hasPendingTasks())
@@ -216,6 +221,7 @@
 
     if (!m_registeredAsNowPlayingApplication) {
         m_registeredAsNowPlayingApplication = true;
+        providePresentingApplicationPIDIfNecessary();
         MRMediaRemoteSetCanBeNowPlayingApplication(true);
     }
 

Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h (241280 => 241281)


--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -56,8 +56,10 @@
     void resetRestrictions() override;
 
     void configureWireLessTargetMonitoring() override;
+    void providePresentingApplicationPIDIfNecessary() final;
 
     RetainPtr<WebMediaSessionHelper> m_objcObserver;
+    bool m_havePresentedApplicationPID { false };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (241280 => 241281)


--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-02-11 22:52:18 UTC (rev 241281)
@@ -31,6 +31,7 @@
 #import "Logging.h"
 #import "MediaPlayer.h"
 #import "PlatformMediaSession.h"
+#import "RuntimeApplicationChecks.h"
 #import "SystemMemory.h"
 #import "WebCoreThreadRun.h"
 #import <AVFoundation/AVAudioSession.h>
@@ -37,6 +38,7 @@
 #import <AVFoundation/AVRouteDetector.h>
 #import <objc/runtime.h>
 #import <pal/ios/UIKitSoftLink.h>
+#import <pal/spi/ios/CelestialSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/MainThread.h>
@@ -50,6 +52,10 @@
 SOFT_LINK_CONSTANT(AVFoundation, AVAudioSessionInterruptionOptionKey, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVRouteDetectorMultipleRoutesDetectedDidChangeNotification, NSString *)
 
+SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Celestial)
+SOFT_LINK_CLASS_OPTIONAL(Celestial, AVSystemController)
+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString *)
+
 #if HAVE(MEDIA_PLAYER) && !PLATFORM(WATCHOS)
 SOFT_LINK_CLASS(AVFoundation, AVRouteDetector)
 #endif
@@ -169,6 +175,21 @@
 #endif
 }
 
+void MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary()
+{
+    if (m_havePresentedApplicationPID)
+        return;
+    m_havePresentedApplicationPID = true;
+
+    if (!canLoadAVSystemController_PIDToInheritApplicationStateFrom())
+        return;
+
+    NSError *error = nil;
+    [[getAVSystemControllerClass() sharedAVSystemController] setAttribute:@(presentingApplicationPID()) forKey:getAVSystemController_PIDToInheritApplicationStateFrom() error:&error];
+    if (error)
+        WTFLogAlways("Failed to set up PID proxying: %s", error.localizedDescription.UTF8String);
+}
+
 void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS

Modified: trunk/Source/WebKit/ChangeLog (241280 => 241281)


--- trunk/Source/WebKit/ChangeLog	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/ChangeLog	2019-02-11 22:52:18 UTC (rev 241281)
@@ -1,3 +1,20 @@
+2019-02-11  Jer Noble  <jer.no...@apple.com>
+
+        [Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
+        https://bugs.webkit.org/show_bug.cgi?id=194504
+
+        Reviewed by Eric Carlson.
+
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
+        (WebKit::WebUserMediaClient::requestUserMediaAccess):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::userMediaPermissionRequestManager):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
+
 2019-02-11  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r241272 and r241276.

Deleted: trunk/Source/WebKit/Platform/spi/ios/CelestialSPI.h (241280 => 241281)


--- trunk/Source/WebKit/Platform/spi/ios/CelestialSPI.h	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/Platform/spi/ios/CelestialSPI.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#if PLATFORM(IOS_FAMILY)
-
-#pragma once
-
-#import <Foundation/Foundation.h>
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <Celestial/AVSystemController.h>
-
-#else
-
-@interface AVSystemController : NSObject
-
-+(AVSystemController*)sharedAVSystemController;
-
-- (id)attributeForKey:(NSString *)attributeKey;
-- (BOOL)setAttribute:(id)value forKey:(NSString *)attributeKey error:(NSError **)errorPtr;
-
-@end
-
-#endif
-
-#endif // PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (241280 => 241281)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-02-11 22:52:18 UTC (rev 241281)
@@ -1863,7 +1863,6 @@
 		076E884F1A13CBC6005E90FC /* APIInjectedBundlePageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundlePageContextMenuClient.h; sourceTree = "<group>"; };
 		07A5EBB91C7BA43E00B9CA69 /* WKFrameHandleRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKFrameHandleRef.cpp; sourceTree = "<group>"; };
 		07A5EBBA1C7BA43E00B9CA69 /* WKFrameHandleRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameHandleRef.h; sourceTree = "<group>"; };
-		07A8F3861E64A8F900B668E8 /* CelestialSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CelestialSPI.h; sourceTree = "<group>"; };
 		0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
 		089C1667FE841158C02AAC07 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		0E97D74C200E8FF300BF6643 /* SafeBrowsingSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SafeBrowsingSPI.h; sourceTree = "<group>"; };
@@ -8689,7 +8688,6 @@
 				2DB7667021B5E48A0045DDB1 /* AccessibilitySupportSPI.h */,
 				CE1A0BCC1A48E6C60054EF74 /* AssertionServicesSPI.h */,
 				CDA041F31ACE2105004A13EC /* BackBoardServicesSPI.h */,
-				07A8F3861E64A8F900B668E8 /* CelestialSPI.h */,
 				CE1A0BCD1A48E6C60054EF74 /* CorePDFSPI.h */,
 				2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */,
 				CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */,

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebUserMediaClient.cpp (241280 => 241281)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebUserMediaClient.cpp	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebUserMediaClient.cpp	2019-02-11 22:52:18 UTC (rev 241281)
@@ -42,7 +42,6 @@
 
 void WebUserMediaClient::requestUserMediaAccess(UserMediaRequest& request)
 {
-    m_page.prepareToSendUserMediaPermissionRequest();
     m_page.userMediaPermissionRequestManager().startUserMediaRequest(request);
 }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (241280 => 241281)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-02-11 22:52:18 UTC (rev 241281)
@@ -4028,12 +4028,6 @@
 
 #if ENABLE(MEDIA_STREAM)
 
-#if !PLATFORM(IOS_FAMILY)
-void WebPage::prepareToSendUserMediaPermissionRequest()
-{
-}
-#endif
-
 void WebPage::userMediaAccessWasGranted(uint64_t userMediaID, WebCore::CaptureDevice&& audioDevice, WebCore::CaptureDevice&& videoDevice, String&& mediaDeviceIdentifierHashSalt)
 {
     m_userMediaPermissionRequestManager->userMediaAccessWasGranted(userMediaID, WTFMove(audioDevice), WTFMove(videoDevice), WTFMove(mediaDeviceIdentifierHashSalt));

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (241280 => 241281)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-02-11 22:52:18 UTC (rev 241281)
@@ -584,7 +584,6 @@
 
 #if ENABLE(MEDIA_STREAM)
     UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
-    void prepareToSendUserMediaPermissionRequest();
     void captureDevicesChanged();
 #endif
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (241280 => 241281)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-02-11 22:44:17 UTC (rev 241280)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-02-11 22:52:18 UTC (rev 241281)
@@ -122,13 +122,6 @@
 #import <wtf/cocoa/Entitlements.h>
 #import <wtf/text/TextStream.h>
 
-#if ENABLE(MEDIA_STREAM)
-#import "CelestialSPI.h"
-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Celestial)
-SOFT_LINK_CLASS_OPTIONAL(Celestial, AVSystemController)
-SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString *)
-#endif
-
 namespace WebKit {
 using namespace WebCore;
 
@@ -3155,22 +3148,6 @@
 #endif
 }
 
-#if ENABLE(MEDIA_STREAM)
-void WebPage::prepareToSendUserMediaPermissionRequest()
-{
-    static std::once_flag once;
-    std::call_once(once, [] {
-        if (!canLoadAVSystemController_PIDToInheritApplicationStateFrom())
-            return;
-
-        NSError *error = nil;
-        [[getAVSystemControllerClass() sharedAVSystemController] setAttribute:@(WebCore::presentingApplicationPID()) forKey:getAVSystemController_PIDToInheritApplicationStateFrom() error:&error];
-        if (error)
-            WTFLogAlways("Failed to set up PID proxying: %s", error.localizedDescription.UTF8String);
-    });
-}
-#endif
-
 } // namespace WebKit
 
 #endif // PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to