Title: [216161] trunk/Source/WebKit2
- Revision
- 216161
- Author
- eric.carl...@apple.com
- Date
- 2017-05-03 17:27:17 -0700 (Wed, 03 May 2017)
Log Message
[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>
Unreviewed build fix.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearUserMediaState):
* UIProcess/WebPageProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (216160 => 216161)
--- trunk/Source/WebKit2/ChangeLog 2017-05-04 00:03:29 UTC (rev 216160)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-04 00:27:17 UTC (rev 216161)
@@ -4,6 +4,18 @@
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>
+ Unreviewed build fix.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::clearUserMediaState):
+ * UIProcess/WebPageProxy.h:
+
+2017-05-03 Eric Carlson <eric.carl...@apple.com>
+
+ [MediaStream] Allow host application to enable/disable media capture
+ https://bugs.webkit.org/show_bug.cgi?id=171292
+ <rdar://problem/31821492>
+
Reviewed by Jer Noble.
* UIProcess/API/C/WKPage.cpp:
Modified: trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp (216160 => 216161)
--- trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp 2017-05-04 00:03:29 UTC (rev 216160)
+++ trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp 2017-05-04 00:27:17 UTC (rev 216161)
@@ -130,6 +130,11 @@
m_page.process().send(Messages::WebPage::StopMediaCapture(), m_page.pageID());
}
+void UserMediaPermissionRequestManagerProxy::clearCachedState()
+{
+ invalidatePendingRequests();
+}
+
Ref<UserMediaPermissionRequestProxy> UserMediaPermissionRequestManagerProxy::createRequest(uint64_t userMediaID, uint64_t frameID, const String& userMediaDocumentOriginIdentifier, const String& topLevelDocumentOriginIdentifier, const Vector<String>& audioDeviceUIDs, const Vector<String>& videoDeviceUIDs)
{
auto request = UserMediaPermissionRequestProxy::create(*this, userMediaID, frameID, userMediaDocumentOriginIdentifier, topLevelDocumentOriginIdentifier, audioDeviceUIDs, videoDeviceUIDs);
Modified: trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h (216160 => 216161)
--- trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h 2017-05-04 00:03:29 UTC (rev 216160)
+++ trunk/Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h 2017-05-04 00:27:17 UTC (rev 216161)
@@ -73,6 +73,7 @@
void stopCapture();
void scheduleNextRejection();
void rejectionTimerFired();
+ void clearCachedState();
void startedCaptureSession();
void endedCaptureSession();
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (216160 => 216161)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2017-05-04 00:03:29 UTC (rev 216160)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2017-05-04 00:27:17 UTC (rev 216161)
@@ -5783,6 +5783,13 @@
#endif
}
+void WebPageProxy::clearUserMediaState()
+{
+#if ENABLE(MEDIA_STREAM)
+ userMediaPermissionRequestManager().clearCachedState();
+#endif
+}
+
void WebPageProxy::requestNotificationPermission(uint64_t requestID, const String& originString)
{
if (!isRequestIDValid(requestID))
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (216160 => 216161)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2017-05-04 00:03:29 UTC (rev 216160)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2017-05-04 00:27:17 UTC (rev 216161)
@@ -1195,6 +1195,8 @@
void isLoadingChanged() { activityStateDidChange(WebCore::ActivityState::IsLoading); }
+ void clearUserMediaState();
+
void setShouldSkipWaitingForPaintAfterNextViewDidMoveToWindow(bool shouldSkip) { m_shouldSkipWaitingForPaintAfterNextViewDidMoveToWindow = shouldSkip; }
void setURLSchemeHandlerForScheme(Ref<WebURLSchemeHandler>&&, const String& scheme);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes