MediaStream API: Update the RTCPeerConnection states to match the latest specification
https://bugs.webkit.org/show_bug.cgi?id=107120

Reviewed by Adam Barth.

Source/Platform:

Updating the chromium WebKit API for the new states.

* chromium/public/WebRTCPeerConnectionHandlerClient.h:
(WebKit::WebRTCPeerConnectionHandlerClient::~WebRTCPeerConnectionHandlerClient):
(WebRTCPeerConnectionHandlerClient):
(WebKit::WebRTCPeerConnectionHandlerClient::didChangeSignalingState):
(WebKit::WebRTCPeerConnectionHandlerClient::didChangeICEGatheringState):
(WebKit::WebRTCPeerConnectionHandlerClient::didChangeICEConnectionState):
(WebKit::WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel):
(WebKit::WebRTCPeerConnectionHandlerClient::didChangeReadyState):
(WebKit::WebRTCPeerConnectionHandlerClient::didChangeICEState):

Source/WebCore:

http://dev.w3.org/2011/webrtc/editor/webrtc.html#interface-definition

RTCPeerConnection::readyState and iceState are history and instead signalingState,
iceConnectionState and iceGatheringState have been introduced.

Existing tests updated to cover this patch.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::createOffer):
(WebCore::RTCPeerConnection::createAnswer):
(WebCore::RTCPeerConnection::setLocalDescription):
(WebCore::RTCPeerConnection::localDescription):
(WebCore::RTCPeerConnection::setRemoteDescription):
(WebCore::RTCPeerConnection::remoteDescription):
(WebCore::RTCPeerConnection::updateIce):
(WebCore::RTCPeerConnection::addIceCandidate):
(WebCore::RTCPeerConnection::readyState):
(WebCore):
(WebCore::RTCPeerConnection::signalingState):
(WebCore::RTCPeerConnection::iceConnectionState):
(WebCore::RTCPeerConnection::addStream):
(WebCore::RTCPeerConnection::removeStream):
(WebCore::RTCPeerConnection::createDataChannel):
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::didChangeSignalingState):
(WebCore::RTCPeerConnection::didChangeIceGatheringState):
(WebCore::RTCPeerConnection::didChangeIceConnectionState):
(WebCore::RTCPeerConnection::didAddRemoteStream):
(WebCore::RTCPeerConnection::didRemoveRemoteStream):
(WebCore::RTCPeerConnection::didAddRemoteDataChannel):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::changeSignalingState):
(WebCore::RTCPeerConnection::changeIceGatheringState):
(WebCore::RTCPeerConnection::changeIceConnectionState):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
(RTCPeerConnectionHandlerClient):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::didChangeSignalingState):
(WebCore::RTCPeerConnectionHandlerChromium::didChangeICEConnectionState):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:

Tools:

Updating mock to use the new states.

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(RTCPeerConnectionStateTask::RTCPeerConnectionStateTask):
(MockWebRTCPeerConnectionHandler::initialize):
(MockWebRTCPeerConnectionHandler::updateICE):

LayoutTests:

* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:
* fast/mediastream/RTCPeerConnection-ice-expected.txt:
* fast/mediastream/RTCPeerConnection-ice.html:
* fast/mediastream/RTCPeerConnection-state-expected.txt:
* fast/mediastream/RTCPeerConnection-state.html:


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