Changeset 165255 in webkit


Ignore:
Timestamp:
Mar 7, 2014 3:46:53 AM (10 years ago)
Author:
thiago.lacerda@openbossa.org
Message:

[WebRTC] Adding getConfiguration method to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=129845

Reviewed by Eric Carlson.

Source/WebCore:

Test: fast/mediastream/RTCPeerConnection-getConfiguration.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • GNUmakefile.list.am:
  • Modules/mediastream/RTCConfiguration.idl: Added.
  • Modules/mediastream/RTCIceServer.idl: Added.
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::updateIce):
(WebCore::RTCPeerConnection::getConfiguration):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:

LayoutTests:

  • fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-getConfiguration.html: Added.
Location:
trunk
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r165248 r165255  
     12014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
     2
     3        [WebRTC] Adding getConfiguration method to RTCPeerConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=129845
     5
     6        Reviewed by Eric Carlson.
     7
     8        * fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt: Added.
     9        * fast/mediastream/RTCPeerConnection-getConfiguration.html: Added.
     10
    1112014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
    212
  • trunk/Source/WebCore/CMakeLists.txt

    r165226 r165255  
    218218    Modules/mediastream/NavigatorUserMediaErrorCallback.idl
    219219    Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
     220    Modules/mediastream/RTCConfiguration.idl
    220221    Modules/mediastream/RTCDTMFSender.idl
    221222    Modules/mediastream/RTCDTMFToneChangeEvent.idl
     
    225226    Modules/mediastream/RTCIceCandidate.idl
    226227    Modules/mediastream/RTCIceCandidateEvent.idl
     228    Modules/mediastream/RTCIceServer.idl
    227229    Modules/mediastream/RTCPeerConnection.idl
    228230    Modules/mediastream/RTCSessionDescription.idl
  • trunk/Source/WebCore/ChangeLog

    r165254 r165255  
     12014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
     2
     3        [WebRTC] Adding getConfiguration method to RTCPeerConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=129845
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: fast/mediastream/RTCPeerConnection-getConfiguration.html
     9
     10        * CMakeLists.txt:
     11        * DerivedSources.make:
     12        * GNUmakefile.list.am:
     13        * Modules/mediastream/RTCConfiguration.idl: Added.
     14        * Modules/mediastream/RTCIceServer.idl: Added.
     15        * Modules/mediastream/RTCPeerConnection.cpp:
     16        (WebCore::RTCPeerConnection::RTCPeerConnection):
     17        (WebCore::RTCPeerConnection::updateIce):
     18        (WebCore::RTCPeerConnection::getConfiguration):
     19        * Modules/mediastream/RTCPeerConnection.h:
     20        * Modules/mediastream/RTCPeerConnection.idl:
     21
    1222014-03-07  Jinwoo Song  <jinwoo7.song@samsung.com>
    223
  • trunk/Source/WebCore/DerivedSources.make

    r165199 r165255  
    126126    $(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
    127127    $(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
     128    $(WebCore)/Modules/mediastream/RTCConfiguration.idl \
    128129    $(WebCore)/Modules/mediastream/RTCDTMFSender.idl \
    129130    $(WebCore)/Modules/mediastream/RTCDTMFToneChangeEvent.idl \
     
    132133    $(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
    133134    $(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \
     135    $(WebCore)/Modules/mediastream/RTCIceServer.idl \
    134136    $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
    135137    $(WebCore)/Modules/mediastream/RTCPeerConnectionErrorCallback.idl \
  • trunk/Source/WebCore/GNUmakefile.list.am

    r165226 r165255  
    603603        DerivedSources/WebCore/JSRGBColor.cpp \
    604604        DerivedSources/WebCore/JSRGBColor.h \
     605        DerivedSources/WebCore/JSRTCConfiguration.cpp \
     606        DerivedSources/WebCore/JSRTCConfiguration.h \
    605607        DerivedSources/WebCore/JSRTCDTMFSender.cpp \
    606608        DerivedSources/WebCore/JSRTCDTMFSender.h \
     
    617619        DerivedSources/WebCore/JSRTCIceCandidateEvent.cpp \
    618620        DerivedSources/WebCore/JSRTCIceCandidateEvent.h \
     621        DerivedSources/WebCore/JSRTCIceServer.cpp \
     622        DerivedSources/WebCore/JSRTCIceServer.h \
    619623        DerivedSources/WebCore/JSRTCPeerConnection.cpp \
    620624        DerivedSources/WebCore/JSRTCPeerConnection.h \
     
    12241228        $(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
    12251229        $(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
     1230        $(WebCore)/Modules/mediastream/RTCConfiguration.idl \
    12261231        $(WebCore)/Modules/mediastream/RTCDTMFSender.idl \
    12271232        $(WebCore)/Modules/mediastream/RTCDTMFToneChangeEvent.idl \
     
    12311236        $(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
    12321237        $(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \
     1238        $(WebCore)/Modules/mediastream/RTCIceServer.idl \
    12331239        $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
    12341240        $(WebCore)/Modules/mediastream/RTCSessionDescription.idl \
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

    r165248 r165255  
    176176    , m_iceConnectionState(IceConnectionStateNew)
    177177    , m_scheduledEventTimer(this, &RTCPeerConnection::scheduledEventTimerFired)
     178    , m_configuration(configuration)
    178179    , m_stopped(false)
    179180{
     
    193194    document.frame()->loader().client().dispatchWillStartUsingPeerConnectionHandler(m_peerHandler.get());
    194195
    195     if (!m_peerHandler->initialize(configuration)) {
     196    if (!m_peerHandler->initialize(m_configuration)) {
    196197        ec = NOT_SUPPORTED_ERR;
    197198        return;
     
    362363    }
    363364
    364     RefPtr<RTCConfiguration> configuration = parseConfiguration(rtcConfiguration, ec);
     365    m_configuration = parseConfiguration(rtcConfiguration, ec);
    365366    if (ec)
    366367        return;
    367368
    368     bool valid = m_peerHandler->updateIce(configuration);
     369    bool valid = m_peerHandler->updateIce(m_configuration);
    369370    if (!valid)
    370371        ec = SYNTAX_ERR;
     
    497498}
    498499
     500RTCConfiguration* RTCPeerConnection::getConfiguration() const
     501{
     502    return m_configuration.get();
     503}
     504
    499505MediaStreamVector RTCPeerConnection::getLocalStreams() const
    500506{
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h

    r165248 r165255  
    8484    String iceConnectionState() const;
    8585
     86    RTCConfiguration* getConfiguration() const;
     87
    8688    MediaStreamVector getLocalStreams() const;
    8789
     
    166168    Vector<RefPtr<Event>> m_scheduledEvents;
    167169
     170    RefPtr<RTCConfiguration> m_configuration;
     171
    168172    bool m_stopped;
    169173};
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl

    r165248 r165255  
    6363    MediaStream getStreamById(DOMString streamId);
    6464
     65    RTCConfiguration getConfiguration();
     66
    6567    [StrictTypeChecking, RaisesException] void addStream(MediaStream stream);
    6668    [StrictTypeChecking, RaisesException] void removeStream(MediaStream stream);
Note: See TracChangeset for help on using the changeset viewer.