Add SPI version of WKPreferences.safeBrowsingEnabled
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 22:19:04 +0000 (22:19 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 22:19:04 +0000 (22:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194718
<rdar://problem/48122993>

Rubber-stamped by Brady Eidson.

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

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

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

index fc4ab70..4d1d051 100644 (file)
@@ -1,3 +1,16 @@
+2019-02-15  Alex Christensen  <achristensen@webkit.org>
+
+        Add SPI version of WKPreferences.safeBrowsingEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=194718
+        <rdar://problem/48122993>
+
+        Rubber-stamped by Brady Eidson.
+
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _isSafeBrowsingEnabled]):
+        (-[WKPreferences _setSafeBrowsingEnabled:]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2019-02-15  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS] WKWebView callout bar is missing Change Writing Direction item
 2019-02-15  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS] WKWebView callout bar is missing Change Writing Direction item
index 461c875..46cba15 100644 (file)
@@ -1336,6 +1336,16 @@ static WebCore::EditableLinkBehavior toEditableLinkBehavior(_WKEditableLinkBehav
 #endif
 }
 
 #endif
 }
 
+- (BOOL)_isSafeBrowsingEnabled
+{
+    return _preferences->safeBrowsingEnabled();
+}
+
+- (void)_setSafeBrowsingEnabled:(BOOL)enabled
+{
+    _preferences->setSafeBrowsingEnabled(enabled);
+}
+
 - (void)_setVideoQualityIncludesDisplayCompositingEnabled:(BOOL)videoQualityIncludesDisplayCompositingEnabled
 {
     _preferences->setVideoQualityIncludesDisplayCompositingEnabled(videoQualityIncludesDisplayCompositingEnabled);
 - (void)_setVideoQualityIncludesDisplayCompositingEnabled:(BOOL)videoQualityIncludesDisplayCompositingEnabled
 {
     _preferences->setVideoQualityIncludesDisplayCompositingEnabled(videoQualityIncludesDisplayCompositingEnabled);
index cb39fa8..14ca756 100644 (file)
@@ -143,6 +143,8 @@ typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) {
 
 @property (nonatomic, setter=_setShouldEnableTextAutosizingBoost:) BOOL _shouldEnableTextAutosizingBoost WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 
 
 @property (nonatomic, setter=_setShouldEnableTextAutosizingBoost:) BOOL _shouldEnableTextAutosizingBoost WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 
+@property (nonatomic, getter=_isSafeBrowsingEnabled, setter=_setSafeBrowsingEnabled:) BOOL _safeBrowsingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
 @property (nonatomic, setter=_setStorageAccessPromptsEnabled:) BOOL _storageAccessPromptsEnabled WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 @property (nonatomic, setter=_setColorFilterEnabled:) BOOL _colorFilterEnabled WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 @property (nonatomic, setter=_setPunchOutWhiteBackgroundsInDarkMode:) BOOL _punchOutWhiteBackgroundsInDarkMode WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 @property (nonatomic, setter=_setStorageAccessPromptsEnabled:) BOOL _storageAccessPromptsEnabled WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 @property (nonatomic, setter=_setColorFilterEnabled:) BOOL _colorFilterEnabled WK_API_AVAILABLE(macosx(10.14), ios(12.0));
 @property (nonatomic, setter=_setPunchOutWhiteBackgroundsInDarkMode:) BOOL _punchOutWhiteBackgroundsInDarkMode WK_API_AVAILABLE(macosx(10.14), ios(12.0));