Title: [115109] trunk
Revision
115109
Author
[email protected]
Date
2012-04-24 14:14:21 -0700 (Tue, 24 Apr 2012)

Log Message

MediaStream API: Create a new flag for PeerConnection
https://bugs.webkit.org/show_bug.cgi?id=84723

Reviewed by Dimitri Glazkov.

To allow Chrome to make the GetUserMedia functionality available by default we
need another flag for the PeerConnection related parts. This new flag is in
addition to the general media stream flag, and both need to be enabled for
PeerConnection object creation.

Source/WebCore:

No code behavior changes.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):

Source/WebKit/chromium:

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enablePeerConnection):
(WebKit):
(WebKit::WebRuntimeFeatures::isPeerConnectionEnabled):

Tools:

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115108 => 115109)


--- trunk/Source/WebCore/ChangeLog	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebCore/ChangeLog	2012-04-24 21:14:21 UTC (rev 115109)
@@ -1,3 +1,26 @@
+2012-04-24  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Create a new flag for PeerConnection
+        https://bugs.webkit.org/show_bug.cgi?id=84723
+
+        Reviewed by Dimitri Glazkov.
+
+        To allow Chrome to make the GetUserMedia functionality available by default we
+        need another flag for the PeerConnection related parts. This new flag is in
+        addition to the general media stream flag, and both need to be enabled for
+        PeerConnection object creation.
+
+        No code behavior changes.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore):
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (RuntimeEnabledFeatures):
+        (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
+        (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
+        (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
+        (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
+
 2012-04-24  Joe Mason  <[email protected]>
 
         [BlackBerry] Revert broken changes to authentication dialog

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (115108 => 115109)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-04-24 21:14:21 UTC (rev 115109)
@@ -62,7 +62,8 @@
 #endif
 
 #if ENABLE(MEDIA_STREAM)
-bool RuntimeEnabledFeatures::isMediaStreamEnabled = true;
+bool RuntimeEnabledFeatures::isMediaStreamEnabled = false;
+bool RuntimeEnabledFeatures::isPeerConnectionEnabled = true;
 #endif
 
 #if ENABLE(GAMEPAD)

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (115108 => 115109)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-04-24 21:14:21 UTC (rev 115109)
@@ -188,9 +188,12 @@
     static bool mediaStreamEnabled() { return isMediaStreamEnabled; }
     static void setMediaStreamEnabled(bool isEnabled) { isMediaStreamEnabled = isEnabled; }
     static bool webkitGetUserMediaEnabled() { return isMediaStreamEnabled; }
-    static bool webkitDeprecatedPeerConnectionEnabled() { return isMediaStreamEnabled; }
     static bool webkitMediaStreamEnabled() { return isMediaStreamEnabled; }
-    static bool webkitPeerConnection00Enabled() { return isMediaStreamEnabled; }
+
+    static bool peerConnectionEnabled() { return isMediaStreamEnabled && isPeerConnectionEnabled; }
+    static void setPeerConnectionEnabled(bool isEnabled) { isPeerConnectionEnabled = isEnabled; }
+    static bool webkitDeprecatedPeerConnectionEnabled() { return peerConnectionEnabled(); }
+    static bool webkitPeerConnection00Enabled() { return peerConnectionEnabled(); }
 #endif
 
 #if ENABLE(GAMEPAD)
@@ -268,6 +271,7 @@
 
 #if ENABLE(MEDIA_STREAM)
     static bool isMediaStreamEnabled;
+    static bool isPeerConnectionEnabled;
 #endif
 
 #if ENABLE(GAMEPAD)

Modified: trunk/Source/WebKit/chromium/ChangeLog (115108 => 115109)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-24 21:14:21 UTC (rev 115109)
@@ -1,3 +1,22 @@
+2012-04-24  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Create a new flag for PeerConnection
+        https://bugs.webkit.org/show_bug.cgi?id=84723
+
+        Reviewed by Dimitri Glazkov.
+
+        To allow Chrome to make the GetUserMedia functionality available by default we
+        need another flag for the PeerConnection related parts. This new flag is in
+        addition to the general media stream flag, and both need to be enabled for
+        PeerConnection object creation.
+
+        * public/WebRuntimeFeatures.h:
+        (WebRuntimeFeatures):
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enablePeerConnection):
+        (WebKit):
+        (WebKit::WebRuntimeFeatures::isPeerConnectionEnabled):
+
 2012-04-24  Sami Kyostila  <[email protected]>
 
         [chromium] Don't keep pointers to released layer tree

Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (115108 => 115109)


--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-04-24 21:14:21 UTC (rev 115109)
@@ -109,6 +109,9 @@
     WEBKIT_EXPORT static void enableMediaStream(bool);
     WEBKIT_EXPORT static bool isMediaStreamEnabled();
 
+    WEBKIT_EXPORT static void enablePeerConnection(bool);
+    WEBKIT_EXPORT static bool isPeerConnectionEnabled();
+
     WEBKIT_EXPORT static void enableFullScreenAPI(bool);
     WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
 

Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (115108 => 115109)


--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-04-24 21:14:21 UTC (rev 115109)
@@ -358,6 +358,24 @@
 #endif
 }
 
+void WebRuntimeFeatures::enablePeerConnection(bool enable)
+{
+#if ENABLE(MEDIA_STREAM)
+    RuntimeEnabledFeatures::setPeerConnectionEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isPeerConnectionEnabled()
+{
+#if ENABLE(MEDIA_STREAM)
+    return RuntimeEnabledFeatures::peerConnectionEnabled();
+#else
+    return false;
+#endif
+}
+
 void WebRuntimeFeatures::enableFullScreenAPI(bool enable)
 {
 #if ENABLE(FULLSCREEN_API)

Modified: trunk/Tools/ChangeLog (115108 => 115109)


--- trunk/Tools/ChangeLog	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Tools/ChangeLog	2012-04-24 21:14:21 UTC (rev 115109)
@@ -1,3 +1,18 @@
+2012-04-24  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Create a new flag for PeerConnection
+        https://bugs.webkit.org/show_bug.cgi?id=84723
+
+        Reviewed by Dimitri Glazkov.
+
+        To allow Chrome to make the GetUserMedia functionality available by default we
+        need another flag for the PeerConnection related parts. This new flag is in
+        addition to the general media stream flag, and both need to be enabled for
+        PeerConnection object creation.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell):
+
 2012-04-24  Joe Mason  <[email protected]>
 
         [BlackBerry] Revert broken changes to authentication dialog

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (115108 => 115109)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-04-24 21:13:59 UTC (rev 115108)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-04-24 21:14:21 UTC (rev 115109)
@@ -126,6 +126,7 @@
     WebRuntimeFeatures::enableMediaSource(true);
     WebRuntimeFeatures::enableEncryptedMedia(true);
     WebRuntimeFeatures::enableMediaStream(true);
+    WebRuntimeFeatures::enablePeerConnection(true);
     WebRuntimeFeatures::enableWebAudio(true); 
     WebRuntimeFeatures::enableVideoTrack(true);
     WebRuntimeFeatures::enableGamepad(true);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to