Add data passing to the GetStats interface of RTCPeerConnection
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 08:01:25 +0000 (08:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 08:01:25 +0000 (08:01 +0000)
commit896ccce8b14ccbab5801d903d8a27daa81b7ba0e
treeb1400f93d30bfa385c4e3c22b49068406ad77f41
parentd519560372e308c564148f331ad51c891e5b68d3
Add data passing to the GetStats interface of RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=98003

Patch by Harald Alvestrand <hta@google.com> on 2012-10-03
Reviewed by Adam Barth.

Source/Platform:

* Platform.gypi:
* chromium/public/WebRTCStatsRequest.h:
(WebKit):
(WebRTCStatsRequest):
* chromium/public/WebRTCStatsResponse.h: Added.
(WebCore):
(WebKit):
(WebRTCStatsResponse):
(WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
(WebKit::WebRTCStatsResponse::~WebRTCStatsResponse):
(WebKit::WebRTCStatsResponse::operator=):

Source/WebCore:

Added an RTCStatsResponseBase interface to platform, and let the
RTCStatsRequestImpl class produce an implementation of it that's returned
to WebCore.

Tested by extension of the RTCPeerConnection-stats.html test.

* Modules/mediastream/RTCStatsElement.cpp:
(WebCore::RTCStatsElement::addStatistic):
(WebCore):
* Modules/mediastream/RTCStatsElement.h:
(RTCStatsElement):
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore):
(WebCore::RTCStatsReport::addElement):
(WebCore::RTCStatsReport::addStatistic):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::createResponse):
(WebCore):
(WebCore::RTCStatsRequestImpl::requestSucceeded):
* Modules/mediastream/RTCStatsRequestImpl.h:
(RTCStatsRequestImpl):
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::create):
(WebCore::RTCStatsResponse::addReport):
(WebCore):
(WebCore::RTCStatsResponse::addElement):
(WebCore::RTCStatsResponse::addStatistic):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* WebCore.gypi:
* platform/chromium/support/WebRTCStatsRequest.cpp:
(WebKit::WebRTCStatsRequest::response):
(WebKit):
(WebKit::WebRTCStatsRequest::requestSucceeded):
* platform/chromium/support/WebRTCStatsResponse.cpp: Added.
(WebKit):
(WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
(WebKit::WebRTCStatsResponse::assign):
(WebKit::WebRTCStatsResponse::reset):
(WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
(WebKit::WebRTCStatsResponse::addReport):
(WebKit::WebRTCStatsResponse::addElement):
(WebKit::WebRTCStatsResponse::addStatistic):
* platform/mediastream/RTCStatsRequest.h:
(WebCore):
(RTCStatsRequest):
* platform/mediastream/RTCStatsResponseBase.h: Added.
(WebCore):
(RTCStatsResponseBase):
(WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):

Tools:

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
(MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::addStream):
(MockWebRTCPeerConnectionHandler::removeStream):
(MockWebRTCPeerConnectionHandler::getStats):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):

LayoutTests:

* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCPeerConnection-stats-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
Source/Platform/ChangeLog
Source/Platform/Platform.gypi
Source/Platform/chromium/public/WebRTCStatsRequest.h
Source/Platform/chromium/public/WebRTCStatsResponse.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCStatsElement.cpp
Source/WebCore/Modules/mediastream/RTCStatsElement.h
Source/WebCore/Modules/mediastream/RTCStatsReport.cpp
Source/WebCore/Modules/mediastream/RTCStatsReport.h
Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h
Source/WebCore/Modules/mediastream/RTCStatsResponse.cpp
Source/WebCore/Modules/mediastream/RTCStatsResponse.h
Source/WebCore/WebCore.gypi
Source/WebCore/platform/chromium/support/WebRTCStatsRequest.cpp
Source/WebCore/platform/chromium/support/WebRTCStatsResponse.cpp [new file with mode: 0644]
Source/WebCore/platform/mediastream/RTCStatsRequest.h
Source/WebCore/platform/mediastream/RTCStatsResponseBase.h [new file with mode: 0644]
Tools/ChangeLog
Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h