Expose WKPreferences SPI for toggling mock capture devices prompt
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Aug 2017 02:14:16 +0000 (02:14 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Aug 2017 02:14:16 +0000 (02:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175227
<rdar://problem/33734528>

Reviewed by Youenn Fablet.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _mockCaptureDevicesPromptEnabled]):
(-[WKPreferences _setMockCaptureDevicesPromptEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h

index 1a77357..3a39c94 100644 (file)
@@ -1,5 +1,18 @@
 2017-08-04  Brian Burg  <bburg@apple.com>
 
+        Expose WKPreferences SPI for toggling mock capture devices prompt
+        https://bugs.webkit.org/show_bug.cgi?id=175227
+        <rdar://problem/33734528>
+
+        Reviewed by Youenn Fablet.
+
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _mockCaptureDevicesPromptEnabled]):
+        (-[WKPreferences _setMockCaptureDevicesPromptEnabled:]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
+2017-08-04  Brian Burg  <bburg@apple.com>
+
         Fix typo in WKPreferences _iceCandidateFiltertingEnabled property
         https://bugs.webkit.org/show_bug.cgi?id=175224
 
index 1ddfba2..c71ca2a 100644 (file)
@@ -577,6 +577,16 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setMockCaptureDevicesEnabled(enabled);
 }
 
+- (BOOL)_mockCaptureDevicesPromptEnabled
+{
+    return _preferences->mockCaptureDevicesPromptEnabled();
+}
+
+- (void)_setMockCaptureDevicesPromptEnabled:(BOOL)enabled
+{
+    _preferences->setMockCaptureDevicesPromptEnabled(enabled);
+}
+
 - (BOOL)_mediaCaptureRequiresSecureConnection
 {
     return _preferences->mediaCaptureRequiresSecureConnection();
index d4ebe72..70d9da4 100644 (file)
@@ -101,6 +101,7 @@ typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {
 
 @property (nonatomic, setter=_setMediaDevicesEnabled:) BOOL _mediaDevicesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setMockCaptureDevicesEnabled:) BOOL _mockCaptureDevicesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setMockCaptureDevicesPromptEnabled:) BOOL _mockCaptureDevicesPromptEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setEnumeratingAllNetworkInterfacesEnabled:) BOOL _enumeratingAllNetworkInterfacesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));