Title: [211879] trunk/Source/WebKit2
Revision
211879
Author
[email protected]
Date
2017-02-08 09:29:08 -0800 (Wed, 08 Feb 2017)

Log Message

Add WebRTC as an off-by-default experimental feature menu item.
https://bugs.webkit.org/show_bug.cgi?id=167972
<rdar://problem/30293429>

Reviewed by Jon Lee.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
peer connection and media stream preferences at the same time, so special case them.
(WebKit::WebPreferences::setEnabledForFeature):
* UIProcess/WebPreferences.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (211878 => 211879)


--- trunk/Source/WebKit2/ChangeLog	2017-02-08 17:26:23 UTC (rev 211878)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-08 17:29:08 UTC (rev 211879)
@@ -1,3 +1,18 @@
+2017-02-08  Eric Carlson  <[email protected]>
+
+        Add WebRTC as an off-by-default experimental feature menu item.
+        https://bugs.webkit.org/show_bug.cgi?id=167972
+        <rdar://problem/30293429>
+
+        Reviewed by Jon Lee.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/WebPreferences.cpp:
+        (WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
+        peer connection and media stream preferences at the same time, so special case them.
+        (WebKit::WebPreferences::setEnabledForFeature):
+        * UIProcess/WebPreferences.h:
+
 2017-02-08  Chris Dumez  <[email protected]>
 
         Add support for enhanced privacy diagnostic logging

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (211878 => 211879)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-02-08 17:26:23 UTC (rev 211878)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-02-08 17:29:08 UTC (rev 211879)
@@ -213,7 +213,6 @@
     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, "", "") \
@@ -318,6 +317,7 @@
     macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \
     macro(ModernMediaControlsEnabled, modernMediaControlsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Modern Media Controls", "Use modern media controls look") \
     macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Input Events", "Enable InputEvents support") \
+    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, false, "WebRTC", "Enable WebRTC API") \
     macro(SubtleCryptoEnabled, subtleCryptoEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubtleCrypto", "Enable SubtleCrypto support") \
     macro(UserTimingEnabled, userTimingEnabled, Bool, bool, false, "User Timing", "Enable UserTiming API") \
     macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "Web Animations", "Web Animations prototype") \

Modified: trunk/Source/WebKit2/UIProcess/WebPreferences.cpp (211878 => 211879)


--- trunk/Source/WebKit2/UIProcess/WebPreferences.cpp	2017-02-08 17:26:23 UTC (rev 211878)
+++ trunk/Source/WebKit2/UIProcess/WebPreferences.cpp	2017-02-08 17:29:08 UTC (rev 211879)
@@ -259,6 +259,12 @@
     return false;
 }
 
+void WebPreferences::setPeerConnectionAndMediaStreamEnabled(bool value)
+{
+    setPeerConnectionEnabled(value);
+    setMediaStreamEnabled(value);
+}
+
 void WebPreferences::setEnabledForFeature(bool value, const API::ExperimentalFeature& feature)
 {
     struct FeatureSetterMapping {
@@ -279,7 +285,10 @@
     
     for (auto& setter : setters) {
         if (key == setter.name) {
-            (this->*setter.function)(value);
+            if (key == WebPreferencesKey::peerConnectionEnabledKey())
+                setPeerConnectionAndMediaStreamEnabled(value);
+            else
+                (this->*setter.function)(value);
             return;
         }
     }

Modified: trunk/Source/WebKit2/UIProcess/WebPreferences.h (211878 => 211879)


--- trunk/Source/WebKit2/UIProcess/WebPreferences.h	2017-02-08 17:26:23 UTC (rev 211878)
+++ trunk/Source/WebKit2/UIProcess/WebPreferences.h	2017-02-08 17:29:08 UTC (rev 211879)
@@ -93,6 +93,8 @@
 
     void updatePrivateBrowsingValue(bool value);
 
+    void setPeerConnectionAndMediaStreamEnabled(bool value);
+
     void registerDefaultBoolValueForKey(const String&, bool);
     void registerDefaultUInt32ValueForKey(const String&, uint32_t);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to