Update peer connection preference
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 15:12:17 +0000 (15:12 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 15:12:17 +0000 (15:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169016
rdar://problem/30773889

Reviewed by Eric Carlson.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setEnabledForFeature):
(WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): Deleted.
* UIProcess/WebPreferences.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/WebPreferences.cpp
Source/WebKit2/UIProcess/WebPreferences.h

index dea962f..f629c1b 100644 (file)
@@ -1,3 +1,17 @@
+2017-03-01  Jon Lee  <jonlee@apple.com>
+
+        Update peer connection preference
+        https://bugs.webkit.org/show_bug.cgi?id=169016
+        rdar://problem/30773889
+
+        Reviewed by Eric Carlson.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/WebPreferences.cpp:
+        (WebKit::WebPreferences::setEnabledForFeature):
+        (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): Deleted.
+        * UIProcess/WebPreferences.h:
+
 2017-03-01  Tomas Popela  <tpopela@redhat.com>
 
         [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
index d16134d..bc719ee 100644 (file)
     macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false, "", "") \
     macro(UseGiantTiles, useGiantTiles, Bool, bool, false, "", "") \
     macro(MediaStreamEnabled, mediaStreamEnabled, Bool, bool, false, "", "") \
+    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, false, "", "") \
     macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false, "", "") \
     macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false, "", "") \
     macro(MediaSourceEnabled, mediaSourceEnabled, Bool, bool, true, "", "") \
     macro(UserTimingEnabled, userTimingEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "User Timing", "Enable UserTiming API") \
     macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "Web Animations", "Web Animations prototype") \
     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "WebGL 2.0", "WebGL 2 prototype") \
-    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, WebCore::LibWebRTCProvider::webRTCAvailable(), "WebRTC", "Enable WebRTC API") \
     \
 
 #if PLATFORM(COCOA)
index 3a3df81..c307225 100644 (file)
@@ -260,12 +260,6 @@ bool WebPreferences::isEnabledForFeature(const API::ExperimentalFeature& feature
     return false;
 }
 
-void WebPreferences::setPeerConnectionAndMediaStreamEnabled(bool value)
-{
-    setPeerConnectionEnabled(value);
-    setMediaStreamEnabled(value);
-}
-
 void WebPreferences::setEnabledForFeature(bool value, const API::ExperimentalFeature& feature)
 {
     struct FeatureSetterMapping {
@@ -286,10 +280,7 @@ void WebPreferences::setEnabledForFeature(bool value, const API::ExperimentalFea
     
     for (auto& setter : setters) {
         if (key == setter.name) {
-            if (key == WebPreferencesKey::peerConnectionEnabledKey())
-                setPeerConnectionAndMediaStreamEnabled(value);
-            else
-                (this->*setter.function)(value);
+            (this->*setter.function)(value);
             return;
         }
     }
index 54435b8..c4c4217 100644 (file)
@@ -93,8 +93,6 @@ private:
 
     void updatePrivateBrowsingValue(bool value);
 
-    void setPeerConnectionAndMediaStreamEnabled(bool value);
-
     void registerDefaultBoolValueForKey(const String&, bool);
     void registerDefaultUInt32ValueForKey(const String&, uint32_t);