Skip to content

Commit

Permalink
Promote WKWebView getUserMedia SPI to API
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=223806

Reviewed by Eric Carlson.

Source/WebKit:

Move SPI to API.
Update delegate to take an enumeration instead of two booleans.
Make setters completion handlers nullable.
Covered by API tests.

* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView cameraCaptureState]):
(-[WKWebView microphoneCaptureState]):
(-[WKWebView setMicrophoneCaptureState:completionHandler:]):
(-[WKWebView setCameraCaptureState:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

Tools:

* TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(-[UserMediaCaptureUIDelegateForParameters webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:
(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:
* TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
(-[DeviceOrientationPermissionUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
(-[DeviceOrientationPermissionValidationDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:
(-[SpeechRecognitionUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[GeolocationDelegateNew _webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:
(-[UserMediaUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
(-[SimulateFailedSandboxUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesDeviceOrientationUIDelegate _webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:]):
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
* TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setAudioDecision:]):
(-[UserMediaCaptureUIDelegate setVideoDecision:]):
(-[UserMediaCaptureUIDelegate webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:]):


Canonical link: https://commits.webkit.org/235865@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf committed Mar 29, 2021
1 parent 70fa8b8 commit e7aafb3
Show file tree
Hide file tree
Showing 20 changed files with 262 additions and 160 deletions.
26 changes: 26 additions & 0 deletions Source/WebKit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
2021-03-29 Youenn Fablet <youenn@apple.com>

Promote WKWebView getUserMedia SPI to API
https://bugs.webkit.org/show_bug.cgi?id=223806

Reviewed by Eric Carlson.

Move SPI to API.
Update delegate to take an enumeration instead of two booleans.
Make setters completion handlers nullable.
Covered by API tests.

* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView cameraCaptureState]):
(-[WKWebView microphoneCaptureState]):
(-[WKWebView setMicrophoneCaptureState:completionHandler:]):
(-[WKWebView setCameraCaptureState:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

2021-03-28 Said Abou-Hallawa <said@apple.com>

[GPU Process] Don't ever replay DisplayList items of a RemoteImageBuffer in WebProcess
Expand Down
23 changes: 23 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ NS_ASSUME_NONNULL_BEGIN
@protocol UIContextMenuInteractionCommitAnimating;
#endif

typedef NS_ENUM(NSInteger, WKPermissionDecision) {
WKPermissionDecisionPrompt,
WKPermissionDecisionGrant,
WKPermissionDecisionDeny,
} WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

typedef NS_ENUM(NSInteger, WKMediaCaptureType) {
WKMediaCaptureTypeCamera,
WKMediaCaptureTypeMicrophone,
WKMediaCaptureTypeCameraAndMicrophone,
} WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! A class conforming to the WKUIDelegate protocol provides methods for
presenting native UI on behalf of a webpage.
*/
Expand Down Expand Up @@ -123,6 +135,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * _Nullable result))completionHandler;


/*! @abstract A delegate to request permission for microphone audio and camera video access.
@param webView The web view invoking the delegate method.
@param origin The origin of the page.
@param frame Information about the frame whose JavaScript initiated this call.
@param type The type of capture (camera, microphone).
@param decisionHandler The completion handler to call once the decision is made
@discussion If not implemented, the result is the same as calling the decisionHandler with WKPermissionDecisionPrompt.
*/
- (void)webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

#if TARGET_OS_IPHONE

/*! @abstract Allows your app to determine whether or not the given element should show a preview.
Expand Down
5 changes: 2 additions & 3 deletions Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,14 @@ struct UIEdgeInsets;

- (void)_webView:(WKWebView *)webView imageOrMediaDocumentSizeChanged:(CGSize)size WK_API_AVAILABLE(macos(10.12), ios(10.0));
- (NSDictionary *)_dataDetectionContextForWebView:(WKWebView *)webView WK_API_AVAILABLE(macos(10.12), ios(10.0));
- (void)_webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame audio:(BOOL)audio video:(BOOL)video decisionHandler:(void (^)(_WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(macos(12.00), ios(15.0));
- (void)_webView:(WKWebView *)webView includeSensitiveMediaDeviceDetails:(void (^)(BOOL includeSensitiveDetails))decisionHandler WK_API_AVAILABLE(macos(10.15), ios(13.0));
- (void)_webView:(WKWebView *)webView requestUserMediaAuthorizationForDevices:(_WKCaptureDevices)devices url:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL decisionHandler:(void (^)(BOOL authorized))decisionHandler WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (void)_webView:(WKWebView *)webView checkUserMediaPermissionForURL:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL frameIdentifier:(NSUInteger)frameIdentifier decisionHandler:(void (^)(NSString *salt, BOOL authorized))decisionHandler WK_API_AVAILABLE(macos(10.12.3), ios(10.3));
- (void)_webView:(WKWebView *)webView mediaCaptureStateDidChange:(_WKMediaCaptureStateDeprecated)state WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (WKDragDestinationAction)_webView:(WKWebView *)webView dragDestinationActionMaskForDraggingInfo:(id)draggingInfo WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (void)_webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures completionHandler:(void (^)(WKWebView *webView))completionHandler WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (void)_webView:(WKWebView *)webView requestGeolocationPermissionForFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(BOOL allowed))decisionHandler WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
- (void)_webView:(WKWebView *)webView requestGeolocationPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(_WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
- (void)_webView:(WKWebView *)webView requestGeolocationPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

- (void)_webView:(WKWebView *)webView runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler WK_API_AVAILABLE(macos(10.13), ios(11.0));
- (void)_webView:(WKWebView *)webView editorStateDidChange:(NSDictionary *)editorState WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
Expand Down Expand Up @@ -223,7 +222,7 @@ struct UIEdgeInsets;
@param frame The frame that initiated the request.
@param decisionHandler The decision handler to call once the app has made its decision.
*/
- (void)_webView:(WKWebView *)webView requestDeviceOrientationAndMotionPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(_WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
- (void)_webView:(WKWebView *)webView requestDeviceOrientationAndMotionPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));

#else // !TARGET_OS_IPHONE

Expand Down
39 changes: 39 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ typedef NS_ENUM(NSInteger, WKMediaPlaybackState) {
WKMediaPlaybackStateSuspended
} WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

typedef NS_ENUM(NSInteger, WKMediaCaptureState) {
WKMediaCaptureStateNone,
WKMediaCaptureStateActive,
WKMediaCaptureStateMuted,
} WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! @abstract A copy of the configuration with which the web view was
initialized. */
@property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
Expand Down Expand Up @@ -354,6 +360,39 @@ typedef NS_ENUM(NSInteger, WKMediaPlaybackState) {
*/
- (void)requestMediaPlaybackStateWithCompletionHandler:(void (^)(WKMediaPlaybackState))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));


/*! @abstract The state of camera capture on a web page.
@discussion @link WKWebView @/link is key-value observing (KVO) compliant
for this property.
*/
@property (nonatomic, readonly) WKMediaCaptureState cameraCaptureState WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! @abstract The state of microphone capture on a web page.
@discussion @link WKWebView @/link is key-value observing (KVO) compliant
for this property.
*/
@property (nonatomic, readonly) WKMediaCaptureState microphoneCaptureState WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! @abstract Set camera capture state of a WKWebView.
@param state State to apply for capture.
@param completionHandler A block to invoke after the camera state has been changed.
@discussion
If value is WKMediaCaptureStateNone, this will stop any camera capture.
If value is WKMediaCaptureStateMuted, any active camera capture will become muted.
If value is WKMediaCaptureStateActive, any muted camera capture will become active.
*/
- (void)setCameraCaptureState:(WKMediaCaptureState)state completionHandler:(void (^_Nullable)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! @abstract Set microphone capture state of a WKWebView.
@param state state to apply for capture.
@param completionHandler A block to invoke after the camera state has been changed.
@discussion
If value is WKMediaCaptureStateNone, this will stop any microphone capture.
If value is WKMediaCaptureStateMuted, any active microphone capture will become muted.
If value is WKMediaCaptureStateActive, any muted microphone capture will become active.
*/
- (void)setMicrophoneCaptureState:(WKMediaCaptureState)state completionHandler:(void (^_Nullable)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

/*! @abstract Get a snapshot for the visible viewport of WKWebView.
@param snapshotConfiguration An object that specifies how the snapshot is configured.
@param completionHandler A block to invoke when the snapshot is ready.
Expand Down
118 changes: 62 additions & 56 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,68 @@ - (void)requestMediaPlaybackStateWithCompletionHandler:(void (^)(WKMediaPlayback
});
}

- (WKMediaCaptureState)cameraCaptureState
{
auto state = _page->reportedMediaState();
if (state & WebCore::MediaProducer::HasActiveVideoCaptureDevice)
return WKMediaCaptureStateActive;
if (state & WebCore::MediaProducer::HasMutedVideoCaptureDevice)
return WKMediaCaptureStateMuted;
return WKMediaCaptureStateNone;
}

- (WKMediaCaptureState)microphoneCaptureState
{
auto state = _page->reportedMediaState();
if (state & WebCore::MediaProducer::HasActiveAudioCaptureDevice)
return WKMediaCaptureStateActive;
if (state & WebCore::MediaProducer::HasMutedAudioCaptureDevice)
return WKMediaCaptureStateMuted;
return WKMediaCaptureStateNone;
}

- (void)setMicrophoneCaptureState:(WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
{
if (!completionHandler)
completionHandler = [] { };

if (state == WKMediaCaptureStateNone) {
_page->stopMediaCapture(WebCore::MediaProducer::MediaCaptureKind::Audio, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
return;
}
auto mutedState = _page->mutedStateFlags();
if (state == WKMediaCaptureStateActive && mutedState & WebCore::MediaProducer::AudioCaptureIsMuted)
mutedState ^= WebCore::MediaProducer::AudioCaptureIsMuted;
else if (state == WKMediaCaptureStateMuted)
mutedState = WebCore::MediaProducer::AudioCaptureIsMuted;
_page->setMuted(mutedState, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
}

- (void)setCameraCaptureState:(WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
{
if (!completionHandler)
completionHandler = [] { };

if (state == WKMediaCaptureStateNone) {
_page->stopMediaCapture(WebCore::MediaProducer::MediaCaptureKind::Video, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
return;
}
auto mutedState = _page->mutedStateFlags();
if (state == WKMediaCaptureStateActive && mutedState & WebCore::MediaProducer::VideoCaptureIsMuted)
mutedState ^= WebCore::MediaProducer::VideoCaptureIsMuted;
else if (state == WKMediaCaptureStateMuted)
mutedState = WebCore::MediaProducer::VideoCaptureIsMuted;
_page->setMuted(mutedState, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
}

- (void)_evaluateJavaScript:(NSString *)javaScriptString asAsyncFunction:(BOOL)asAsyncFunction withSourceURL:(NSURL *)sourceURL withArguments:(NSDictionary<NSString *, id> *)arguments forceUserGesture:(BOOL)forceUserGesture inFrame:(WKFrameInfo *)frame inWorld:(WKContentWorld *)world completionHandler:(void (^)(id, NSError *))completionHandler
{
auto handler = adoptNS([completionHandler copy]);
Expand Down Expand Up @@ -1755,62 +1817,6 @@ - (BOOL)_negotiatedLegacyTLS
return _page->pageLoadState().hasNegotiatedLegacyTLS();
}

- (_WKMediaCaptureState)_cameraCaptureState
{
auto state = _page->reportedMediaState();
if (state & WebCore::MediaProducer::HasActiveVideoCaptureDevice)
return _WKMediaCaptureStateActive;
if (state & WebCore::MediaProducer::HasMutedVideoCaptureDevice)
return _WKMediaCaptureStateMuted;
return _WKMediaCaptureStateNone;
}

- (_WKMediaCaptureState)_microphoneCaptureState
{
auto state = _page->reportedMediaState();
if (state & WebCore::MediaProducer::HasActiveAudioCaptureDevice)
return _WKMediaCaptureStateActive;
if (state & WebCore::MediaProducer::HasMutedAudioCaptureDevice)
return _WKMediaCaptureStateMuted;
return _WKMediaCaptureStateNone;
}

- (void)setMicrophoneCaptureState:(_WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
{
if (state == _WKMediaCaptureStateNone) {
_page->stopMediaCapture(WebCore::MediaProducer::MediaCaptureKind::Audio, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
return;
}
auto mutedState = _page->mutedStateFlags();
if (state == _WKMediaCaptureStateActive && mutedState & WebCore::MediaProducer::AudioCaptureIsMuted)
mutedState ^= WebCore::MediaProducer::AudioCaptureIsMuted;
else if (state == _WKMediaCaptureStateMuted)
mutedState = WebCore::MediaProducer::AudioCaptureIsMuted;
_page->setMuted(mutedState, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
}

- (void)setCameraCaptureState:(_WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
{
if (state == _WKMediaCaptureStateNone) {
_page->stopMediaCapture(WebCore::MediaProducer::MediaCaptureKind::Video, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
return;
}
auto mutedState = _page->mutedStateFlags();
if (state == _WKMediaCaptureStateActive && mutedState & WebCore::MediaProducer::VideoCaptureIsMuted)
mutedState ^= WebCore::MediaProducer::VideoCaptureIsMuted;
else if (state == _WKMediaCaptureStateMuted)
mutedState = WebCore::MediaProducer::VideoCaptureIsMuted;
_page->setMuted(mutedState, [completionHandler = makeBlockPtr(completionHandler)] {
completionHandler();
});
}

- (void)_frames:(void (^)(_WKFrameTreeNode *))completionHandler
{
_page->getAllFrames([completionHandler = makeBlockPtr(completionHandler), page = makeRef(*_page.get())] (WebKit::FrameTreeNodeData&& data) {
Expand Down
22 changes: 0 additions & 22 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ typedef NS_OPTIONS(NSUInteger, _WKMediaCaptureStateDeprecated) {
_WKMediaCaptureStateDeprecatedMutedCamera = 1 << 3,
} WK_API_AVAILABLE(macos(10.13), ios(11.0));

typedef NS_OPTIONS(NSUInteger, _WKMediaCaptureState) {
_WKMediaCaptureStateNone = 0,
_WKMediaCaptureStateActive = 1 << 0,
_WKMediaCaptureStateMuted = 1 << 1,
} WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

typedef NS_OPTIONS(NSUInteger, _WKMediaMutedState) {
_WKMediaNoneMuted = 0,
_WKMediaAudioMuted = 1 << 0,
Expand All @@ -67,12 +61,6 @@ typedef NS_OPTIONS(NSUInteger, _WKCaptureDevices) {
_WKCaptureDeviceDisplay = 1 << 2,
} WK_API_AVAILABLE(macos(10.13), ios(11.0));

typedef NS_OPTIONS(NSUInteger, _WKPermissionDecision) {
_WKPermissionDecisionPrompt = 1 << 0,
_WKPermissionDecisionGrant = 1 << 1,
_WKPermissionDecisionDeny = 1 << 2,
} WK_API_AVAILABLE(macos(12.00), ios(15.0));

typedef NS_OPTIONS(NSUInteger, _WKSelectionAttributes) {
_WKSelectionAttributeNoSelection = 0,
_WKSelectionAttributeIsCaret = 1 << 0,
Expand Down Expand Up @@ -193,16 +181,6 @@ for this property.
*/
@property (nonatomic, readonly) BOOL _negotiatedLegacyTLS WK_API_AVAILABLE(macos(10.15.4), ios(13.4));

/*! @abstract The state of media capture on a web page.
@discussion @link WKWebView @/link is key-value observing (KVO) compliant
for this property.
*/
@property (nonatomic, readonly) _WKMediaCaptureState _cameraCaptureState WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, readonly) _WKMediaCaptureState _microphoneCaptureState WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

- (void)setMicrophoneCaptureState:(_WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
- (void)setCameraCaptureState:(_WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

- (void)_frames:(void (^)(_WKFrameTreeNode *))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));

// FIXME: Remove these once nobody is using them.
Expand Down
Loading

0 comments on commit e7aafb3

Please sign in to comment.