[MediaStream] User should not be prompted again after denying getDisplayMedia request
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 04:29:02 +0000 (04:29 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2018 04:29:02 +0000 (04:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191227
<rdar://problem/45784512>

Unreviewed build fix of ports not ENABLE(MEDIA_STREAM).

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Define getRequestAction only if ENABLE(MEDIA_STREAM).
* UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h

index dfa2792..4fb852e 100644 (file)
@@ -1,3 +1,14 @@
+2018-11-04  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [MediaStream] User should not be prompted again after denying getDisplayMedia request
+        https://bugs.webkit.org/show_bug.cgi?id=191227
+        <rdar://problem/45784512>
+
+        Unreviewed build fix of ports not ENABLE(MEDIA_STREAM).
+
+        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Define getRequestAction only if ENABLE(MEDIA_STREAM).
+        * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto.
+
 2018-11-04  Zalan Bujtas  <zalan@apple.com>
 
         [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
index af0ccf4..41c8e7c 100644 (file)
@@ -261,6 +261,7 @@ void UserMediaPermissionRequestManagerProxy::scheduleNextRejection()
         m_rejectionTimer.startOneShot(Seconds(mimimumDelayBeforeReplying + randomNumber()));
 }
 
+#if ENABLE(MEDIA_STREAM)
 UserMediaPermissionRequestManagerProxy::RequestAction UserMediaPermissionRequestManagerProxy::getRequestAction(uint64_t frameID, SecurityOrigin& userMediaDocumentOrigin, SecurityOrigin& topLevelDocumentOrigin, const MediaStreamRequest& userRequest, Vector<CaptureDevice>& audioDevices, Vector<CaptureDevice>& videoDevices)
 {
     if (videoDevices.isEmpty() && audioDevices.isEmpty())
@@ -280,6 +281,7 @@ UserMediaPermissionRequestManagerProxy::RequestAction UserMediaPermissionRequest
 
     return searchForGrantedRequest(frameID, userMediaDocumentOrigin, topLevelDocumentOrigin, requestingMicrophone, requestingCamera) ? RequestAction::Grant : RequestAction::Prompt;
 }
+#endif
 
 void UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, Ref<SecurityOrigin>&& userMediaDocumentOrigin, Ref<SecurityOrigin>&& topLevelDocumentOrigin, const MediaStreamRequest& userRequest)
 {
index 8cb8258..1ccefe0 100644 (file)
@@ -74,7 +74,7 @@ private:
 
     const UserMediaPermissionRequestProxy* searchForGrantedRequest(uint64_t frameID, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo) const;
     bool wasRequestDenied(uint64_t mainFrameID, const WebCore::SecurityOrigin& userMediaDocumentOrigin, const WebCore::SecurityOrigin& topLevelDocumentOrigin, bool needsAudio, bool needsVideo, bool needsScreenCapture);
-#endif
+
     void getUserMediaPermissionInfo(uint64_t userMediaID, uint64_t frameID, UserMediaPermissionCheckProxy::CompletionHandler&&, Ref<WebCore::SecurityOrigin>&& userMediaDocumentOrigin, Ref<WebCore::SecurityOrigin>&& topLevelDocumentOrigin);
 
     enum class RequestAction {
@@ -83,6 +83,7 @@ private:
         Prompt        
     };
     RequestAction getRequestAction(uint64_t frameID, WebCore::SecurityOrigin& userMediaDocumentOrigin, WebCore::SecurityOrigin& topLevelDocumentOrigin, const WebCore::MediaStreamRequest&, Vector<WebCore::CaptureDevice>& audioDevices, Vector<WebCore::CaptureDevice>& videoDevices);
+#endif
 
     void watchdogTimerFired();