Changeset 115109 in webkit


Ignore:
Timestamp:
Apr 24, 2012 2:14:21 PM (12 years ago)
Author:
tommyw@google.com
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):

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r115104 r115109  
     12012-04-24  Tommy Widenflycht  <tommyw@google.com>
     2
     3        MediaStream API: Create a new flag for PeerConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=84723
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        To allow Chrome to make the GetUserMedia functionality available by default we
     9        need another flag for the PeerConnection related parts. This new flag is in
     10        addition to the general media stream flag, and both need to be enabled for
     11        PeerConnection object creation.
     12
     13        No code behavior changes.
     14
     15        * bindings/generic/RuntimeEnabledFeatures.cpp:
     16        (WebCore):
     17        * bindings/generic/RuntimeEnabledFeatures.h:
     18        (RuntimeEnabledFeatures):
     19        (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
     20        (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
     21        (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
     22        (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
     23
    1242012-04-24  Joe Mason  <jmason@rim.com>
    225
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r114101 r115109  
    6363
    6464#if ENABLE(MEDIA_STREAM)
    65 bool RuntimeEnabledFeatures::isMediaStreamEnabled = true;
     65bool RuntimeEnabledFeatures::isMediaStreamEnabled = false;
     66bool RuntimeEnabledFeatures::isPeerConnectionEnabled = true;
    6667#endif
    6768
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r114101 r115109  
    189189    static void setMediaStreamEnabled(bool isEnabled) { isMediaStreamEnabled = isEnabled; }
    190190    static bool webkitGetUserMediaEnabled() { return isMediaStreamEnabled; }
    191     static bool webkitDeprecatedPeerConnectionEnabled() { return isMediaStreamEnabled; }
    192191    static bool webkitMediaStreamEnabled() { return isMediaStreamEnabled; }
    193     static bool webkitPeerConnection00Enabled() { return isMediaStreamEnabled; }
     192
     193    static bool peerConnectionEnabled() { return isMediaStreamEnabled && isPeerConnectionEnabled; }
     194    static void setPeerConnectionEnabled(bool isEnabled) { isPeerConnectionEnabled = isEnabled; }
     195    static bool webkitDeprecatedPeerConnectionEnabled() { return peerConnectionEnabled(); }
     196    static bool webkitPeerConnection00Enabled() { return peerConnectionEnabled(); }
    194197#endif
    195198
     
    269272#if ENABLE(MEDIA_STREAM)
    270273    static bool isMediaStreamEnabled;
     274    static bool isPeerConnectionEnabled;
    271275#endif
    272276
  • trunk/Source/WebKit/chromium/ChangeLog

    r115080 r115109  
     12012-04-24  Tommy Widenflycht  <tommyw@google.com>
     2
     3        MediaStream API: Create a new flag for PeerConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=84723
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        To allow Chrome to make the GetUserMedia functionality available by default we
     9        need another flag for the PeerConnection related parts. This new flag is in
     10        addition to the general media stream flag, and both need to be enabled for
     11        PeerConnection object creation.
     12
     13        * public/WebRuntimeFeatures.h:
     14        (WebRuntimeFeatures):
     15        * src/WebRuntimeFeatures.cpp:
     16        (WebKit::WebRuntimeFeatures::enablePeerConnection):
     17        (WebKit):
     18        (WebKit::WebRuntimeFeatures::isPeerConnectionEnabled):
     19
    1202012-04-24  Sami Kyostila  <skyostil@chromium.org>
    221
  • trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h

    r114101 r115109  
    110110    WEBKIT_EXPORT static bool isMediaStreamEnabled();
    111111
     112    WEBKIT_EXPORT static void enablePeerConnection(bool);
     113    WEBKIT_EXPORT static bool isPeerConnectionEnabled();
     114
    112115    WEBKIT_EXPORT static void enableFullScreenAPI(bool);
    113116    WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
  • trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp

    r114101 r115109  
    359359}
    360360
     361void WebRuntimeFeatures::enablePeerConnection(bool enable)
     362{
     363#if ENABLE(MEDIA_STREAM)
     364    RuntimeEnabledFeatures::setPeerConnectionEnabled(enable);
     365#else
     366    UNUSED_PARAM(enable);
     367#endif
     368}
     369
     370bool WebRuntimeFeatures::isPeerConnectionEnabled()
     371{
     372#if ENABLE(MEDIA_STREAM)
     373    return RuntimeEnabledFeatures::peerConnectionEnabled();
     374#else
     375    return false;
     376#endif
     377}
     378
    361379void WebRuntimeFeatures::enableFullScreenAPI(bool enable)
    362380{
  • trunk/Tools/ChangeLog

    r115104 r115109  
     12012-04-24  Tommy Widenflycht  <tommyw@google.com>
     2
     3        MediaStream API: Create a new flag for PeerConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=84723
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        To allow Chrome to make the GetUserMedia functionality available by default we
     9        need another flag for the PeerConnection related parts. This new flag is in
     10        addition to the general media stream flag, and both need to be enabled for
     11        PeerConnection object creation.
     12
     13        * DumpRenderTree/chromium/TestShell.cpp:
     14        (TestShell::TestShell):
     15
    1162012-04-24  Joe Mason  <jmason@rim.com>
    217
  • trunk/Tools/DumpRenderTree/chromium/TestShell.cpp

    r114166 r115109  
    127127    WebRuntimeFeatures::enableEncryptedMedia(true);
    128128    WebRuntimeFeatures::enableMediaStream(true);
     129    WebRuntimeFeatures::enablePeerConnection(true);
    129130    WebRuntimeFeatures::enableWebAudio(true);
    130131    WebRuntimeFeatures::enableVideoTrack(true);
Note: See TracChangeset for help on using the changeset viewer.