MediaStream API: Changing the device enumeration to be async
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 20:36:26 +0000 (20:36 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 20:36:26 +0000 (20:36 +0000)
commit215741aae83f0238b547c035542c516803aa5298
tree483d882b092502b3696c06e6f1589b5e6d9dcea4
parent0ac9af784035ade2e57bd265d9eca3a8d9b8941d
MediaStream API: Changing the device enumeration to be async
https://bugs.webkit.org/show_bug.cgi?id=120883

Reviewed by Darin Adler.

Source/WebCore:

Parts merged from https://chromium.googlesource.com/chromium/blink/+/40a96080a1531e50de4eb84571c7dc9fb321ece5
and https://chromium.googlesource.com/chromium/blink/+/ff783a23bb1add588971a8187048a305cf485121
by Tommy Widenflycht.

Test: fast/mediastream/MediaStreamTrack-getSources.html

* CMakeLists.txt: Added new files.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::kind): ASCIILiteral -> NeverDestroyed<AtomicString>.
(WebCore::MediaStreamTrack::readyState): Ditto.
(WebCore::MediaStreamTrack::getSources): New.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

* Modules/mediastream/MediaStreamTrackSourcesCallback.h: Added.
* Modules/mediastream/MediaStreamTrackSourcesCallback.idl: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h: Added.

* Modules/mediastream/SourceInfo.cpp: Added.
* Modules/mediastream/SourceInfo.h: Added.
* Modules/mediastream/SourceInfo.idl: Added.

* WebCore.xcodeproj/project.pbxproj: Add new files.

* bindings/js/JSDOMBinding.h: Add toJS templates for Vector<T> and Vector<RefPtr<T>>.

* platform/mediastream/MediaStreamCenter.h: Add prototype for getMediaStreamTrackSources.

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Added.

* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:

* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/mac/MediaStreamCenterMac.h:

LayoutTests:

* fast/mediastream/MediaStreamTrack-getSources-expected.txt: Added.
* fast/mediastream/MediaStreamTrack-getSources.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/MediaStreamTrack-getSources-expected.txt [new file with mode: 0644]
LayoutTests/fast/mediastream/MediaStreamTrack-getSources.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.h
Source/WebCore/Modules/mediastream/MediaStreamTrack.idl
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesCallback.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/SourceInfo.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediastream/SourceInfo.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/SourceInfo.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/platform/mediastream/MediaStreamCenter.h
Source/WebCore/platform/mediastream/MediaStreamTrackSourcesRequestClient.h [new file with mode: 0644]
Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp
Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h
Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h
Source/WebCore/platform/mediastream/mac/MediaStreamCenterMac.cpp
Source/WebCore/platform/mediastream/mac/MediaStreamCenterMac.h