MediaStream API: Add the getStreamById method on RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=111311

Reviewed by Adam Barth.

Source/Platform:

Added an initial initialize method which doesn't take an id;
the id will be generated for you.

* chromium/public/WebMediaStream.h:
(WebMediaStream):

Source/WebCore:

Adding the missing method on RTCPeerConnection defined here:
http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCPeerConnection-getStreamById-MediaStream-DOMString-streamId

Existing tests have been extended to cover patch.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStreamById):
(WebCore):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* platform/chromium/support/WebMediaStream.cpp:
(WebKit::WebMediaStream::initialize):
(WebKit):
* platform/mediastream/MediaStreamSource.cpp:
(WebCore::MediaStreamSource::setReadyState):

Tools:

Changing mocks to be more realistic.

* DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp:
(WebTestRunner::MockWebRTCPeerConnectionHandler::addStream):
(WebTestRunner::MockWebRTCPeerConnectionHandler::removeStream):
* DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp:
(WebTestRunner::WebUserMediaClientMock::requestUserMedia):

LayoutTests:

* fast/mediastream/MediaStream-add-remove-tracks.html:
* fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt:
* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:


git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@144748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed
tree: 16bae5e2a7339ca3c42dbf7b6dc66119c6e20cd9
  1. android/
  2. default/
  3. linux/
  4. mac/
  5. win/
  6. Platform.h
  7. WebAnimation.h
  8. WebAnimationCurve.h
  9. WebAnimationDelegate.h
  10. WebAudioBus.h
  11. WebAudioDestinationConsumer.h
  12. WebAudioDevice.h
  13. WebBlobData.h
  14. WebBlobRegistry.h
  15. WebCanvas.h
  16. WebClipboard.h
  17. WebColor.h
  18. WebCommon.h
  19. WebCompositorOutputSurface.h
  20. WebCompositorSupport.h
  21. WebContentLayer.h
  22. WebContentLayerClient.h
  23. WebCookie.h
  24. WebCookieJar.h
  25. WebCString.h
  26. WebData.h
  27. WebDiscardableMemory.h
  28. WebDragData.h
  29. WebExternalTextureLayer.h
  30. WebExternalTextureLayerClient.h
  31. WebFileInfo.h
  32. WebFileSystem.h
  33. WebFileUtilities.h
  34. WebFilterOperation.h
  35. WebFilterOperations.h
  36. WebFlingAnimator.h
  37. WebFloatAnimationCurve.h
  38. WebFloatKeyframe.h
  39. WebFloatPoint.h
  40. WebFloatQuad.h
  41. WebFloatRect.h
  42. WebGamepad.h
  43. WebGamepads.h
  44. WebGestureCurve.h
  45. WebGestureCurveTarget.h
  46. WebGraphicsContext3D.h
  47. WebGraphicsMemoryAllocation.h
  48. WebGraphicsMemoryStats.h
  49. WebHTTPBody.h
  50. WebHTTPHeaderVisitor.h
  51. WebHTTPLoadInfo.h
  52. WebHyphenator.h
  53. WebImage.h
  54. WebImageLayer.h
  55. WebInputHandler.h
  56. WebInputHandlerClient.h
  57. WebIOSurfaceLayer.h
  58. WebLayer.h
  59. WebLayerScrollClient.h
  60. WebLayerTreeView.h
  61. WebLayerTreeViewClient.h
  62. WebLocalizedString.h
  63. WebMediaConstraints.h
  64. WebMediaStream.h
  65. WebMediaStreamCenter.h
  66. WebMediaStreamCenterClient.h
  67. WebMediaStreamSource.h
  68. WebMediaStreamSourcesRequest.h
  69. WebMediaStreamTrack.h
  70. WebMessagePortChannel.h
  71. WebMessagePortChannelClient.h
  72. WebMimeRegistry.h
  73. WebNonCopyable.h
  74. WebPluginListBuilder.h
  75. WebPoint.h
  76. WebPrerender.h
  77. WebPrerenderingSupport.h
  78. WebPrivateOwnPtr.h
  79. WebPrivatePtr.h
  80. WebRect.h
  81. WebReferrerPolicy.h
  82. WebRenderingStats.h
  83. WebRTCConfiguration.h
  84. WebRTCDataChannelHandler.h
  85. WebRTCDataChannelHandlerClient.h
  86. WebRTCDTMFSenderHandler.h
  87. WebRTCDTMFSenderHandlerClient.h
  88. WebRTCICECandidate.h
  89. WebRTCPeerConnectionHandler.h
  90. WebRTCPeerConnectionHandlerClient.h
  91. WebRTCSessionDescription.h
  92. WebRTCSessionDescriptionRequest.h
  93. WebRTCStatsRequest.h
  94. WebRTCStatsResponse.h
  95. WebRTCVoidRequest.h
  96. WebScreenInfo.h
  97. WebScrollbar.h
  98. WebScrollbarLayer.h
  99. WebScrollbarThemeGeometry.h
  100. WebScrollbarThemePainter.h
  101. WebSharedGraphicsContext3D.h
  102. WebSize.h
  103. WebSocketStreamError.h
  104. WebSocketStreamHandle.h
  105. WebSocketStreamHandleClient.h
  106. WebSolidColorLayer.h
  107. WebStorageArea.h
  108. WebStorageNamespace.h
  109. WebString.h
  110. WebThread.h
  111. WebThreadSafeData.h
  112. WebTransformAnimationCurve.h
  113. WebTransformationMatrix.h
  114. WebTransformKeyframe.h
  115. WebTransformOperations.h
  116. WebUnitTestSupport.h
  117. WebURL.h
  118. WebURLError.h
  119. WebURLLoader.h
  120. WebURLLoaderClient.h
  121. WebURLLoadTiming.h
  122. WebURLRequest.h
  123. WebURLResponse.h
  124. WebVector.h
  125. WebVideoFrame.h
  126. WebVideoFrameProvider.h
  127. WebVideoLayer.h
  128. WebWorkerRunLoop.h