MediaStream API: Update the tracklists to the latest spec
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 14:55:02 +0000 (14:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 14:55:02 +0000 (14:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64791

Patch by Tommy Widenflycht <tommyw@google.com> on 2011-07-20
Reviewed by Tony Gentilcore.

The test harness will be forthcoming very soon now, introducing tests for this.

* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* dom/DOMAllInOne.cpp:
* dom/EventTarget.cpp:
* dom/EventTarget.h:
* dom/ExclusiveTrackList.cpp: Removed.
* dom/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::create):
(WebCore::LocalMediaStream::LocalMediaStream):
(WebCore::LocalMediaStream::streamEnded):
(WebCore::LocalMediaStream::stop):
* dom/LocalMediaStream.h:
(WebCore::LocalMediaStream::isLocalMediaStream):
* dom/LocalMediaStream.idl:
* dom/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
* dom/MediaStream.h:
(WebCore::MediaStream::tracks):
* dom/MediaStream.idl:
* dom/MediaStreamTrack.cpp: Copied from Source/WebCore/dom/ExclusiveTrackList.h.
(WebCore::MediaStreamTrack::create):
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::~MediaStreamTrack):
(WebCore::MediaStreamTrack::kind):
(WebCore::MediaStreamTrack::label):
(WebCore::MediaStreamTrack::enabled):
(WebCore::MediaStreamTrack::setEnabled):
* dom/MediaStreamTrack.h: Renamed from Source/WebCore/dom/MultipleTrackList.h.
* dom/MediaStreamTrack.idl: Renamed from Source/WebCore/dom/ExclusiveTrackList.idl.
* dom/MediaStreamTrackList.cpp: Renamed from Source/WebCore/dom/ExclusiveTrackList.h.
(WebCore::MediaStreamTrackList::create):
(WebCore::MediaStreamTrackList::MediaStreamTrackList):
(WebCore::MediaStreamTrackList::~MediaStreamTrackList):
(WebCore::MediaStreamTrackList::length):
(WebCore::MediaStreamTrackList::item):
* dom/MediaStreamTrackList.h: Renamed from Source/WebCore/dom/TrackList.idl.
(WebCore::MediaStreamTrackList::associateStream):
* dom/MediaStreamTrackList.idl: Renamed from Source/WebCore/dom/MultipleTrackList.idl.
* dom/MultipleTrackList.cpp: Removed.
* dom/TrackList.cpp: Removed.
* dom/TrackList.h: Removed.
* page/MediaStreamClient.h:
* page/MediaStreamController.cpp:
(WebCore::MediaStreamController::setMediaStreamTrackEnabled):
(WebCore::MediaStreamController::streamGenerated):
* page/MediaStreamController.h:
* page/MediaStreamFrameController.cpp:
(WebCore::MediaStreamFrameController::setMediaStreamTrackEnabled):
(WebCore::MediaStreamFrameController::streamGenerated):
* page/MediaStreamFrameController.h:

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

36 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSEventTarget.cpp
Source/WebCore/bindings/v8/V8DOMWrapper.cpp
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/ExclusiveTrackList.cpp [deleted file]
Source/WebCore/dom/LocalMediaStream.cpp
Source/WebCore/dom/LocalMediaStream.h
Source/WebCore/dom/LocalMediaStream.idl
Source/WebCore/dom/MediaStream.cpp
Source/WebCore/dom/MediaStream.h
Source/WebCore/dom/MediaStream.idl
Source/WebCore/dom/MediaStreamTrack.cpp [new file with mode: 0644]
Source/WebCore/dom/MediaStreamTrack.h [moved from Source/WebCore/dom/MultipleTrackList.h with 63% similarity]
Source/WebCore/dom/MediaStreamTrack.idl [moved from Source/WebCore/dom/ExclusiveTrackList.idl with 74% similarity]
Source/WebCore/dom/MediaStreamTrackList.cpp [moved from Source/WebCore/dom/TrackList.idl with 64% similarity]
Source/WebCore/dom/MediaStreamTrackList.h [moved from Source/WebCore/dom/ExclusiveTrackList.h with 63% similarity]
Source/WebCore/dom/MediaStreamTrackList.idl [moved from Source/WebCore/dom/MultipleTrackList.idl with 80% similarity]
Source/WebCore/dom/MultipleTrackList.cpp [deleted file]
Source/WebCore/dom/TrackList.cpp [deleted file]
Source/WebCore/dom/TrackList.h [deleted file]
Source/WebCore/page/MediaStreamClient.h
Source/WebCore/page/MediaStreamController.cpp
Source/WebCore/page/MediaStreamController.h
Source/WebCore/page/MediaStreamFrameController.cpp
Source/WebCore/page/MediaStreamFrameController.h

index 11b44b8..46172a3 100644 (file)
@@ -155,14 +155,12 @@ SET(WebCore_IDL_FILES
     dom/ErrorEvent.idl
     dom/EventException.idl
     dom/Event.idl
-    dom/ExclusiveTrackList.idl
     dom/HashChangeEvent.idl
     dom/KeyboardEvent.idl
     dom/MessageChannel.idl
     dom/MessageEvent.idl
     dom/MessagePort.idl
     dom/MouseEvent.idl
-    dom/MultipleTrackList.idl
     dom/MutationEvent.idl
     dom/NamedNodeMap.idl
     dom/NodeFilter.idl
@@ -182,7 +180,6 @@ SET(WebCore_IDL_FILES
     dom/TouchEvent.idl
     dom/Touch.idl
     dom/TouchList.idl
-    dom/TrackList.idl
     dom/TreeWalker.idl
     dom/UIEvent.idl
     dom/WebKitAnimationEvent.idl
@@ -541,7 +538,6 @@ SET(WebCore_SOURCES
     dom/ExceptionBase.cpp
     dom/ExceptionCode.cpp
     dom/ExceptionCodePlaceholder.cpp
-    dom/ExclusiveTrackList.cpp
     dom/IconURL.cpp
     dom/KeyboardEvent.cpp
     dom/MessageChannel.cpp
@@ -550,7 +546,6 @@ SET(WebCore_SOURCES
     dom/MessagePort.cpp
     dom/MouseEvent.cpp
     dom/MouseRelatedEvent.cpp
-    dom/MultipleTrackList.cpp
     dom/MutationEvent.cpp
     dom/NamedNodeMap.cpp
     dom/NameNodeList.cpp
@@ -594,7 +589,6 @@ SET(WebCore_SOURCES
     dom/Touch.cpp
     dom/TouchEvent.cpp
     dom/TouchList.cpp
-    dom/TrackList.cpp
     dom/TransformSourceLibxslt.cpp
     dom/Traversal.cpp
     dom/TreeScope.cpp
@@ -2022,16 +2016,20 @@ IF (ENABLE_MEDIA_STREAM)
         dom/LocalMediaStream.cpp
         dom/MediaStream.cpp
         dom/MediaStreamList.cpp
+        dom/MediaStreamTrack.cpp
+        dom/MediaStreamTrackList.cpp
         dom/StreamEvent.cpp
         page/MediaStreamController.cpp
         page/MediaStreamFrameController.cpp
     )
 
     LIST(APPEND WebCore_IDL_FILES
-        dom/GeneratedStream.idl
-        dom/Stream.idl
+        dom/LocalMediaStream.idl
+        dom/MediaStream.idl
+        dom/MediaStreamList.idl
+        dom/MediaStreamTrack.idl
+        dom/MediaStreamTrackList.idl
         dom/StreamEvent.idl
-        dom/StreamList.idl
         page/NavigatorUserMediaError.idl
     )
 ENDIF ()
index e981ffa..af0f25d 100644 (file)
@@ -1,3 +1,75 @@
+2011-07-20  Tommy Widenflycht  <tommyw@google.com>
+
+        MediaStream API: Update the tracklists to the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=64791
+
+        Reviewed by Tony Gentilcore.
+
+        The test harness will be forthcoming very soon now, introducing tests for this.
+
+        * CMakeLists.txt:
+        * CodeGenerators.pri:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSEventTarget.cpp:
+        (WebCore::toJS):
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+        * dom/DOMAllInOne.cpp:
+        * dom/EventTarget.cpp:
+        * dom/EventTarget.h:
+        * dom/ExclusiveTrackList.cpp: Removed.
+        * dom/LocalMediaStream.cpp:
+        (WebCore::LocalMediaStream::create):
+        (WebCore::LocalMediaStream::LocalMediaStream):
+        (WebCore::LocalMediaStream::streamEnded):
+        (WebCore::LocalMediaStream::stop):
+        * dom/LocalMediaStream.h:
+        (WebCore::LocalMediaStream::isLocalMediaStream):
+        * dom/LocalMediaStream.idl:
+        * dom/MediaStream.cpp:
+        (WebCore::MediaStream::create):
+        (WebCore::MediaStream::MediaStream):
+        * dom/MediaStream.h:
+        (WebCore::MediaStream::tracks):
+        * dom/MediaStream.idl:
+        * dom/MediaStreamTrack.cpp: Copied from Source/WebCore/dom/ExclusiveTrackList.h.
+        (WebCore::MediaStreamTrack::create):
+        (WebCore::MediaStreamTrack::MediaStreamTrack):
+        (WebCore::MediaStreamTrack::~MediaStreamTrack):
+        (WebCore::MediaStreamTrack::kind):
+        (WebCore::MediaStreamTrack::label):
+        (WebCore::MediaStreamTrack::enabled):
+        (WebCore::MediaStreamTrack::setEnabled):
+        * dom/MediaStreamTrack.h: Renamed from Source/WebCore/dom/MultipleTrackList.h.
+        * dom/MediaStreamTrack.idl: Renamed from Source/WebCore/dom/ExclusiveTrackList.idl.
+        * dom/MediaStreamTrackList.cpp: Renamed from Source/WebCore/dom/ExclusiveTrackList.h.
+        (WebCore::MediaStreamTrackList::create):
+        (WebCore::MediaStreamTrackList::MediaStreamTrackList):
+        (WebCore::MediaStreamTrackList::~MediaStreamTrackList):
+        (WebCore::MediaStreamTrackList::length):
+        (WebCore::MediaStreamTrackList::item):
+        * dom/MediaStreamTrackList.h: Renamed from Source/WebCore/dom/TrackList.idl.
+        (WebCore::MediaStreamTrackList::associateStream):
+        * dom/MediaStreamTrackList.idl: Renamed from Source/WebCore/dom/MultipleTrackList.idl.
+        * dom/MultipleTrackList.cpp: Removed.
+        * dom/TrackList.cpp: Removed.
+        * dom/TrackList.h: Removed.
+        * page/MediaStreamClient.h:
+        * page/MediaStreamController.cpp:
+        (WebCore::MediaStreamController::setMediaStreamTrackEnabled):
+        (WebCore::MediaStreamController::streamGenerated):
+        * page/MediaStreamController.h:
+        * page/MediaStreamFrameController.cpp:
+        (WebCore::MediaStreamFrameController::setMediaStreamTrackEnabled):
+        (WebCore::MediaStreamFrameController::streamGenerated):
+        * page/MediaStreamFrameController.h:
+
 2011-07-20  Andrew Wason  <rectalogic@rectalogic.com>
 
         [Qt] Make OpenGL symbol resolver transparent
index 8cc4e95..f29f4f5 100644 (file)
@@ -139,17 +139,17 @@ IDL_BINDINGS += \
     dom/EventException.idl \
 #    dom/EventListener.idl \
 #    dom/EventTarget.idl \
-    dom/ExclusiveTrackList.idl \
     dom/HashChangeEvent.idl \
     dom/KeyboardEvent.idl \
     dom/LocalMediaStream.idl \
     dom/MediaStream.idl \
     dom/MediaStreamList.idl \
+    dom/MediaStreamTrack.idl \
+    dom/MediaStreamTrackList.idl \
     dom/MouseEvent.idl \
     dom/MessageChannel.idl \
     dom/MessageEvent.idl \
     dom/MessagePort.idl \
-    dom/MultipleTrackList.idl \
     dom/MutationEvent.idl \
     dom/NamedNodeMap.idl \
     dom/Node.idl \
@@ -171,7 +171,6 @@ IDL_BINDINGS += \
     dom/Touch.idl \
     dom/TouchEvent.idl \
     dom/TouchList.idl \
-    dom/TrackList.idl \
     dom/TreeWalker.idl \
     dom/UIEvent.idl \
     dom/WebKitAnimationEvent.idl \
index 9b0ba83..31a3e80 100644 (file)
 #include "JSEvent.cpp"
 #include "JSEventException.cpp"
 #include "JSEventSource.cpp"
-#include "JSExclusiveTrackList.cpp"
 #include "JSFile.cpp"
 #include "JSFileCallback.cpp"
 #include "JSFileEntry.cpp"
 #include "JSMediaList.cpp"
 #include "JSMediaStream.cpp"
 #include "JSMediaStreamList.cpp"
+#include "JSMediaStreamTrack.cpp"
+#include "JSMediaStreamTrackList.cpp"
 #include "JSMediaQueryList.cpp"
 #include "JSMemoryInfo.cpp"
 #include "JSMessageChannel.cpp"
 #include "JSMetadata.cpp"
 #include "JSMetadataCallback.cpp"
 #include "JSMouseEvent.cpp"
-#include "JSMultipleTrackList.cpp"
 #include "JSMutationEvent.cpp"
 #include "JSNamedNodeMap.cpp"
 #include "JSNavigator.cpp"
 #include "JSTouch.cpp"
 #include "JSTouchEvent.cpp"
 #include "JSTouchList.cpp"
-#include "JSTrackList.cpp"
 #include "JSTreeWalker.cpp"
 #include "JSUint16Array.cpp"
 #include "JSUint32Array.cpp"
index 492d12b..61eb7f5 100644 (file)
@@ -188,7 +188,6 @@ DOM_CLASSES = \
     EventListener \
     EventSource \
     EventTarget \
-    ExclusiveTrackList \
     File \
     FileCallback \
     FileEntry \
@@ -304,6 +303,8 @@ DOM_CLASSES = \
     MediaQueryListListener \
     MediaStream \
     MediaStreamList \
+    MediaStreamTrack \
+    MediaStreamTrackList \
     MemoryInfo \
     MessageChannel \
     MessageEvent \
@@ -311,7 +312,6 @@ DOM_CLASSES = \
     Metadata \
     MetadataCallback \
     MouseEvent \
-    MultipleTrackList \
     MutationEvent \
     NamedNodeMap \
     Navigator \
@@ -534,7 +534,6 @@ DOM_CLASSES = \
     Touch \
     TouchEvent \
     TouchList \
-    TrackList \
     TreeWalker \
     UIEvent \
     ValidityState \
index 8985a7a..a0827e1 100644 (file)
@@ -160,8 +160,6 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSEvent.h \
        DerivedSources/WebCore/JSEventSource.cpp \
        DerivedSources/WebCore/JSEventSource.h \
-       DerivedSources/WebCore/JSExclusiveTrackList.cpp \
-       DerivedSources/WebCore/JSExclusiveTrackList.h \
        DerivedSources/WebCore/JSFile.cpp \
        DerivedSources/WebCore/JSFileError.cpp \
        DerivedSources/WebCore/JSFileError.h \
@@ -359,6 +357,10 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSMediaStream.h \
        DerivedSources/WebCore/JSMediaStreamList.cpp \
        DerivedSources/WebCore/JSMediaStreamList.h \
+       DerivedSources/WebCore/JSMediaStreamTrack.cpp \
+       DerivedSources/WebCore/JSMediaStreamTrack.h \
+       DerivedSources/WebCore/JSMediaStreamTrackList.cpp \
+       DerivedSources/WebCore/JSMediaStreamTrackList.h \
        DerivedSources/WebCore/JSMediaQueryList.cpp \
        DerivedSources/WebCore/JSMediaQueryList.h \
        DerivedSources/WebCore/JSMemoryInfo.cpp \
@@ -371,8 +373,6 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSMessagePort.h \
        DerivedSources/WebCore/JSMouseEvent.cpp \
        DerivedSources/WebCore/JSMouseEvent.h \
-       DerivedSources/WebCore/JSMultipleTrackList.cpp \
-       DerivedSources/WebCore/JSMultipleTrackList.h \
        DerivedSources/WebCore/JSMutationEvent.cpp \
        DerivedSources/WebCore/JSMutationEvent.h \
        DerivedSources/WebCore/JSNamedNodeMap.cpp \
@@ -487,8 +487,6 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSTouch.h \
        DerivedSources/WebCore/JSTouchList.cpp \
        DerivedSources/WebCore/JSTouchList.h \
-       DerivedSources/WebCore/JSTrackList.cpp \
-       DerivedSources/WebCore/JSTrackList.h \
        DerivedSources/WebCore/JSTreeWalker.cpp \
        DerivedSources/WebCore/JSTreeWalker.h \
        DerivedSources/WebCore/JSUIEvent.cpp \
@@ -1176,8 +1174,6 @@ webcore_sources += \
        Source/WebCore/dom/ExceptionCode.h \
        Source/WebCore/dom/ExceptionCodePlaceholder.cpp \
        Source/WebCore/dom/ExceptionCodePlaceholder.h \
-       Source/WebCore/dom/ExclusiveTrackList.cpp \
-       Source/WebCore/dom/ExclusiveTrackList.h \
        Source/WebCore/dom/FragmentScriptingPermission.h \
        Source/WebCore/dom/IgnoreDestructiveWriteCountIncrementer.h \
        Source/WebCore/dom/ExceptionCodePlaceholder.h \
@@ -1194,6 +1190,10 @@ webcore_sources += \
        Source/WebCore/dom/MediaStreamContainer.h \
        Source/WebCore/dom/MediaStreamList.cpp \
        Source/WebCore/dom/MediaStreamList.h \
+       Source/WebCore/dom/MediaStreamTrack.cpp \
+       Source/WebCore/dom/MediaStreamTrack.h \
+       Source/WebCore/dom/MediaStreamTrackList.cpp \
+       Source/WebCore/dom/MediaStreamTrackList.h \
        Source/WebCore/dom/MessageChannel.cpp \
        Source/WebCore/dom/MessageChannel.h \
        Source/WebCore/dom/MessageEvent.cpp \
@@ -1206,8 +1206,6 @@ webcore_sources += \
        Source/WebCore/dom/MouseEvent.h \
        Source/WebCore/dom/MouseRelatedEvent.cpp \
        Source/WebCore/dom/MouseRelatedEvent.h \
-       Source/WebCore/dom/MultipleTrackList.cpp \
-       Source/WebCore/dom/MultipleTrackList.h \
        Source/WebCore/dom/MutationEvent.cpp \
        Source/WebCore/dom/MutationEvent.h \
        Source/WebCore/dom/NamedNodeMap.cpp \
@@ -1300,8 +1298,6 @@ webcore_sources += \
        Source/WebCore/dom/TextEventInputType.h \
        Source/WebCore/dom/Text.h \
        Source/WebCore/dom/TouchList.h \
-       Source/WebCore/dom/TrackList.cpp \
-       Source/WebCore/dom/TrackList.h \
        Source/WebCore/dom/TransformSource.h \
        Source/WebCore/dom/TransformSourceLibxslt.cpp \
        Source/WebCore/dom/Traversal.cpp \
index 3c8b0fb..9bec166 100644 (file)
             'dom/EventException.idl',
             'dom/EventListener.idl',
             'dom/EventTarget.idl',
-            'dom/ExclusiveTrackList.idl',
             'dom/HashChangeEvent.idl',
             'dom/KeyboardEvent.idl',
             'dom/LocalMediaStream.idl',
             'dom/MediaStream.idl',
             'dom/MediaStreamList.idl',
+            'dom/MediaStreamTrack.idl',
+            'dom/MediaStreamTrackList.idl',
             'dom/MessageChannel.idl',
             'dom/MessageEvent.idl',
             'dom/MessagePort.idl',
             'dom/MouseEvent.idl',
-            'dom/MultipleTrackList.idl',
             'dom/MutationEvent.idl',
             'dom/NamedNodeMap.idl',
             'dom/Node.idl',
             'dom/Touch.idl',
             'dom/TouchEvent.idl',
             'dom/TouchList.idl',
-            'dom/TrackList.idl',
             'dom/TreeWalker.idl',
             'dom/UIEvent.idl',
             'dom/WebKitAnimationEvent.idl',
             'dom/ExceptionBase.h',
             'dom/ExceptionCode.cpp',
             'dom/ExceptionCodePlaceholder.cpp',
-            'dom/ExclusiveTrackList.cpp',
-            'dom/ExclusiveTrackList.h',
             'dom/HashChangeEvent.h',
             'dom/IgnoreDestructiveWriteCountIncrementer.h',
             'dom/IconURL.cpp',
             'dom/MediaStreamContainer.h',
             'dom/MediaStreamList.cpp',
             'dom/MediaStreamList.h',
+            'dom/MediaStreamTrack.cpp',
+            'dom/MediaStreamTrack.h',
+            'dom/MediaStreamTrackList.cpp',
+            'dom/MediaStreamTrackList.h',
             'dom/MessageChannel.cpp',
             'dom/MessageChannel.h',
             'dom/MessageEvent.cpp',
             'dom/MessagePortChannel.cpp',
             'dom/MouseEvent.cpp',
             'dom/MouseRelatedEvent.cpp',
-            'dom/MultipleTrackList.cpp',
-            'dom/MultipleTrackList.h',
             'dom/MutationEvent.cpp',
             'dom/MutationEvent.h',
             'dom/NameNodeList.cpp',
             'dom/TouchEvent.h',
             'dom/TouchList.cpp',
             'dom/TouchList.h',
-            'dom/TrackList.cpp',
-            'dom/TrackList.h',
             'dom/TransformSource.h',
             'dom/TransformSourceLibxslt.cpp',
             'dom/TransformSourceQt.cpp',
index 1cfa5af..bdd43cf 100644 (file)
@@ -498,7 +498,6 @@ SOURCES += \
     dom/ExceptionBase.cpp \
     dom/ExceptionCode.cpp \
     dom/ExceptionCodePlaceholder.cpp \
-    dom/ExclusiveTrackList.cpp \
     dom/IconURL.cpp \
     dom/KeyboardEvent.cpp \
     dom/MessageChannel.cpp \
@@ -507,7 +506,6 @@ SOURCES += \
     dom/MessagePortChannel.cpp \
     dom/MouseEvent.cpp \
     dom/MouseRelatedEvent.cpp \
-    dom/MultipleTrackList.cpp \
     dom/MutationEvent.cpp \
     dom/NamedNodeMap.cpp \
     dom/NameNodeList.cpp \
@@ -552,7 +550,6 @@ SOURCES += \
     dom/Touch.cpp \
     dom/TouchEvent.cpp \
     dom/TouchList.cpp \
-    dom/TrackList.cpp \
     dom/Traversal.cpp \
     dom/TreeScope.cpp \
     dom/TreeWalker.cpp \
@@ -1488,7 +1485,6 @@ HEADERS += \
     dom/EventTarget.h \
     dom/ExceptionBase.h \
     dom/ExceptionCode.h \
-    dom/ExclusiveTrackList.h \
     dom/FragmentScriptingPermission.h \
     dom/KeyboardEvent.h \
     dom/MessageChannel.h \
@@ -1497,7 +1493,6 @@ HEADERS += \
     dom/MessagePort.h \
     dom/MouseEvent.h \
     dom/MouseRelatedEvent.h \
-    dom/MultipleTrackList.h \
     dom/MutationEvent.h \
     dom/NamedNodeMap.h \
     dom/NameNodeList.h \
@@ -1538,7 +1533,6 @@ HEADERS += \
     dom/Touch.h \
     dom/TouchEvent.h \
     dom/TouchList.h \
-    dom/TrackList.h \
     dom/TransformSource.h \
     dom/Traversal.h \
     dom/TreeDepthLimit.h \
@@ -3230,6 +3224,8 @@ contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
         dom/MediaStream.h \
         dom/MediaStreamContainer.h \
         dom/MediaStreamList.h \
+        dom/MediaStreamTrack.h \
+        dom/MediaStreamTrackList.h \
         dom/StreamEvent.h \
         page/CallbackTask.h \
         page/MediaStreamClient.h \
@@ -3243,6 +3239,8 @@ contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
         dom/LocalMediaStream.cpp \
         dom/MediaStream.cpp \
         dom/MediaStreamList.cpp \
+        dom/MediaStreamTrack.cpp \
+        dom/MediaStreamTrackList.cpp \
         dom/StreamEvent.cpp \
         page/MediaStreamController.cpp \
         page/MediaStreamFrameController.cpp
index 51ba748..5a9ee80 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSExclusiveTrackList.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_All|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Production|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSExclusiveTrackList.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSFile.cpp"
                                >
                                <FileConfiguration
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMemoryInfo.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMediaStreamTrack.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMemoryInfo.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMediaStreamTrack.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageChannel.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMediaStreamTrackList.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageChannel.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMediaStreamTrackList.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageEvent.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMemoryInfo.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageEvent.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMemoryInfo.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessagePort.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageChannel.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessagePort.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageChannel.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadata.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageEvent.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadata.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessageEvent.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadataCallback.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessagePort.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadataCallback.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMessagePort.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMouseEvent.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadata.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMouseEvent.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadata.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadataCallback.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Production|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMetadataCallback.h"
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMultipleTrackList.cpp"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMouseEvent.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMultipleTrackList.h"
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMouseEvent.h"
                                >
                        </File>
                        <File
                                >
                        </File>
                        <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSTrackList.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_All|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Production|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSTrackList.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSTreeWalker.cpp"
                                >
                                <FileConfiguration
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\ExclusiveTrackList.cpp"
+                               RelativePath="..\dom\ExceptionCodePlaceholder.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\ExceptionCodePlaceholder.cpp"
+                               RelativePath="..\dom\ExceptionCodePlaceholder.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dom\HashChangeEvent.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dom\IconURL.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\ExceptionCodePlaceholder.h"
+                               RelativePath="..\dom\IconURL.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\ExclusiveTrackList.cpp"
+                               RelativePath="..\dom\IgnoreDestructiveWriteCountIncrementer.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dom\KeyboardEvent.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\ExclusiveTrackList.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\dom\HashChangeEvent.h"
+                               RelativePath="..\dom\KeyboardEvent.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\IconURL.cpp"
+                               RelativePath="..\dom\LocalMediaStream.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\IconURL.h"
+                               RelativePath="..\dom\LocalMediaStream.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\IgnoreDestructiveWriteCountIncrementer.h"
+                               RelativePath="..\dom\MappedAttributeEntry.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\KeyboardEvent.cpp"
+                               RelativePath="..\dom\MediaStream.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\KeyboardEvent.h"
+                               RelativePath="..\dom\MediaStream.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\LocalMediaStream.cpp"
+                               RelativePath="..\dom\MediaStreamContainer.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dom\MediaStreamList.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\LocalMediaStream.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\dom\MappedAttributeEntry.h"
+                               RelativePath="..\dom\MediaStreamList.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\MediaStream.cpp"
+                               RelativePath="..\dom\MediaStreamTrack.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\MediaStream.h"
+                               RelativePath="..\dom\MediaStreamTrack.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\MediaStreamContainer.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\dom\MediaStreamList.cpp"
+                               RelativePath="..\dom\MediaStreamTrackList.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\MediaStreamList.h"
+                               RelativePath="..\dom\MediaStreamTrackList.h"
                                >
                        </File>
                        <File
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\MultipleTrackList.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_All|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Production|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath="..\dom\MultipleTrackList.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\dom\MutationEvent.cpp"
                                >
                                <FileConfiguration
                                >
                        </File>
                        <File
-                               RelativePath="..\dom\TrackList.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release_Cairo_CFLite|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Debug_All|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Production|Win32"
-                                       ExcludedFromBuild="true"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath="..\dom\TrackList.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\dom\TransformSource.h"
                                >
                        </File>
index 87b75ab..20d095e 100644 (file)
                49C7B9FC1042D3650009D447 /* GraphicsContext3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49C7BA791042EFAE0009D447 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49C7BA781042EFAE0009D447 /* OpenGL.framework */; };
                49C7BA8D1042F5B10009D447 /* JSDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */; };
+               49C9F32313D574F90052600A /* MediaStreamTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C9F31D13D574F80052600A /* MediaStreamTrackList.h */; };
+               49C9F32413D574F90052600A /* MediaStreamTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C9F31E13D574F80052600A /* MediaStreamTrackList.cpp */; };
+               49C9F32613D574F90052600A /* MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C9F32013D574F90052600A /* MediaStreamTrack.h */; };
+               49C9F32713D574F90052600A /* MediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C9F32113D574F90052600A /* MediaStreamTrack.cpp */; };
+               49C9F48E13D57D320052600A /* JSMediaStreamTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C9F48A13D57D320052600A /* JSMediaStreamTrack.cpp */; };
+               49C9F48F13D57D320052600A /* JSMediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C9F48B13D57D320052600A /* JSMediaStreamTrack.h */; };
+               49C9F49013D57D320052600A /* JSMediaStreamTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C9F48C13D57D320052600A /* JSMediaStreamTrackList.cpp */; };
+               49C9F49113D57D320052600A /* JSMediaStreamTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C9F48D13D57D320052600A /* JSMediaStreamTrackList.h */; };
                49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D5DC270F423A73008F20FD /* Matrix3DTransformOperation.cpp */; };
                49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49D5DC2D0F423A73008F20FD /* PerspectiveTransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D5DC290F423A73008F20FD /* PerspectiveTransformOperation.cpp */; };
                ABDDFE790A5C6E7000A3E11D /* RenderMenuList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABDDFE730A5C6E6F00A3E11D /* RenderMenuList.cpp */; };
                ABDDFE7A0A5C6E7000A3E11D /* RenderMenuList.h in Headers */ = {isa = PBXBuildFile; fileRef = ABDDFE740A5C6E7000A3E11D /* RenderMenuList.h */; };
                ADDF1AD71257CD9A0003A759 /* RenderSVGPath.h in Headers */ = {isa = PBXBuildFile; fileRef = ADDF1AD51257CD9A0003A759 /* RenderSVGPath.h */; };
-               B12D233E13560282002A28D4 /* ExclusiveTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D233513560282002A28D4 /* ExclusiveTrackList.cpp */; };
-               B12D233F13560282002A28D4 /* ExclusiveTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D233613560282002A28D4 /* ExclusiveTrackList.h */; };
-               B12D234113560282002A28D4 /* MultipleTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D233813560282002A28D4 /* MultipleTrackList.cpp */; };
-               B12D234213560282002A28D4 /* MultipleTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D233913560282002A28D4 /* MultipleTrackList.h */; };
-               B12D234413560282002A28D4 /* TrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D233B13560282002A28D4 /* TrackList.cpp */; };
-               B12D234513560282002A28D4 /* TrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D233C13560282002A28D4 /* TrackList.h */; };
-               B12D236513560330002A28D4 /* JSTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D23631356032F002A28D4 /* JSTrackList.cpp */; };
-               B12D236613560330002A28D4 /* JSTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D236413560330002A28D4 /* JSTrackList.h */; };
-               B12D23691356033F002A28D4 /* JSExclusiveTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D23671356033F002A28D4 /* JSExclusiveTrackList.cpp */; };
-               B12D236A1356033F002A28D4 /* JSExclusiveTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D23681356033F002A28D4 /* JSExclusiveTrackList.h */; };
-               B12D236D1356034D002A28D4 /* JSMultipleTrackList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B12D236B1356034D002A28D4 /* JSMultipleTrackList.cpp */; };
-               B12D236E1356034D002A28D4 /* JSMultipleTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = B12D236C1356034D002A28D4 /* JSMultipleTrackList.h */; };
                B14353D4138EA8ED00D53276 /* MediaStreamContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = B14353D0138EA8ED00D53276 /* MediaStreamContainer.h */; };
                B14353D5138EA8ED00D53276 /* MediaStreamList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B14353D1138EA8ED00D53276 /* MediaStreamList.cpp */; };
                B14353D6138EA8ED00D53276 /* MediaStreamList.h in Headers */ = {isa = PBXBuildFile; fileRef = B14353D2138EA8ED00D53276 /* MediaStreamList.h */; };
                49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3D.h; sourceTree = "<group>"; };
                49C7BA781042EFAE0009D447 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
                49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentCustom.cpp; sourceTree = "<group>"; };
+               49C9F31C13D574F80052600A /* MediaStreamTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamTrackList.idl; sourceTree = "<group>"; };
+               49C9F31D13D574F80052600A /* MediaStreamTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamTrackList.h; sourceTree = "<group>"; };
+               49C9F31E13D574F80052600A /* MediaStreamTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrackList.cpp; sourceTree = "<group>"; };
+               49C9F31F13D574F80052600A /* MediaStreamTrack.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamTrack.idl; sourceTree = "<group>"; };
+               49C9F32013D574F90052600A /* MediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamTrack.h; sourceTree = "<group>"; };
+               49C9F32113D574F90052600A /* MediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamTrack.cpp; sourceTree = "<group>"; };
+               49C9F48A13D57D320052600A /* JSMediaStreamTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrack.cpp; sourceTree = "<group>"; };
+               49C9F48B13D57D320052600A /* JSMediaStreamTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamTrack.h; sourceTree = "<group>"; };
+               49C9F48C13D57D320052600A /* JSMediaStreamTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrackList.cpp; sourceTree = "<group>"; };
+               49C9F48D13D57D320052600A /* JSMediaStreamTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamTrackList.h; sourceTree = "<group>"; };
                49D5DC270F423A73008F20FD /* Matrix3DTransformOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Matrix3DTransformOperation.cpp; path = transforms/Matrix3DTransformOperation.cpp; sourceTree = "<group>"; };
                49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Matrix3DTransformOperation.h; path = transforms/Matrix3DTransformOperation.h; sourceTree = "<group>"; };
                49D5DC290F423A73008F20FD /* PerspectiveTransformOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerspectiveTransformOperation.cpp; path = transforms/PerspectiveTransformOperation.cpp; sourceTree = "<group>"; };
                ABDDFE740A5C6E7000A3E11D /* RenderMenuList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderMenuList.h; sourceTree = "<group>"; };
                ADDF1AD41257CD9A0003A759 /* RenderSVGPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGPath.cpp; sourceTree = "<group>"; };
                ADDF1AD51257CD9A0003A759 /* RenderSVGPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGPath.h; sourceTree = "<group>"; };
-               B12D233513560282002A28D4 /* ExclusiveTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExclusiveTrackList.cpp; sourceTree = "<group>"; };
-               B12D233613560282002A28D4 /* ExclusiveTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExclusiveTrackList.h; sourceTree = "<group>"; };
-               B12D233713560282002A28D4 /* ExclusiveTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ExclusiveTrackList.idl; sourceTree = "<group>"; };
-               B12D233813560282002A28D4 /* MultipleTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MultipleTrackList.cpp; sourceTree = "<group>"; };
-               B12D233913560282002A28D4 /* MultipleTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultipleTrackList.h; sourceTree = "<group>"; };
-               B12D233A13560282002A28D4 /* MultipleTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MultipleTrackList.idl; sourceTree = "<group>"; };
-               B12D233B13560282002A28D4 /* TrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrackList.cpp; sourceTree = "<group>"; };
-               B12D233C13560282002A28D4 /* TrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackList.h; sourceTree = "<group>"; };
-               B12D233D13560282002A28D4 /* TrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TrackList.idl; sourceTree = "<group>"; };
-               B12D23631356032F002A28D4 /* JSTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTrackList.cpp; sourceTree = "<group>"; };
-               B12D236413560330002A28D4 /* JSTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTrackList.h; sourceTree = "<group>"; };
-               B12D23671356033F002A28D4 /* JSExclusiveTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSExclusiveTrackList.cpp; sourceTree = "<group>"; };
-               B12D23681356033F002A28D4 /* JSExclusiveTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExclusiveTrackList.h; sourceTree = "<group>"; };
-               B12D236B1356034D002A28D4 /* JSMultipleTrackList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMultipleTrackList.cpp; sourceTree = "<group>"; };
-               B12D236C1356034D002A28D4 /* JSMultipleTrackList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMultipleTrackList.h; sourceTree = "<group>"; };
                B14353D0138EA8ED00D53276 /* MediaStreamContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamContainer.h; sourceTree = "<group>"; };
                B14353D1138EA8ED00D53276 /* MediaStreamList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamList.cpp; sourceTree = "<group>"; };
                B14353D2138EA8ED00D53276 /* MediaStreamList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamList.h; sourceTree = "<group>"; };
                                65DF322E09D1DDBC000BE325 /* JSEntity.h */,
                                93F9B7720BA5FDDC00854064 /* JSEntityReference.cpp */,
                                93F9B7730BA5FDDC00854064 /* JSEntityReference.h */,
-                               B12D23671356033F002A28D4 /* JSExclusiveTrackList.cpp */,
-                               B12D23681356033F002A28D4 /* JSExclusiveTrackList.h */,
                                FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */,
                                FE80DA600E9C4703000D6F75 /* JSGeolocation.h */,
                                FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */,
                                B1E545D813462B0B0092A545 /* JSMediaStream.h */,
                                B14353F6138EA95B00D53276 /* JSMediaStreamList.cpp */,
                                B14353F7138EA95B00D53276 /* JSMediaStreamList.h */,
-                               B12D236B1356034D002A28D4 /* JSMultipleTrackList.cpp */,
-                               B12D236C1356034D002A28D4 /* JSMultipleTrackList.h */,
+                               49C9F48A13D57D320052600A /* JSMediaStreamTrack.cpp */,
+                               49C9F48B13D57D320052600A /* JSMediaStreamTrack.h */,
+                               49C9F48C13D57D320052600A /* JSMediaStreamTrackList.cpp */,
+                               49C9F48D13D57D320052600A /* JSMediaStreamTrackList.h */,
                                BCD9C2BC0C17B69E005C90A2 /* JSNamedNodeMap.cpp */,
                                BCD9C2BD0C17B69E005C90A2 /* JSNamedNodeMap.h */,
                                14DC0D3509FED073007B0235 /* JSNode.cpp */,
                                49A85B76138D58EE00ECB7B3 /* JSStreamEvent.h */,
                                65DF31EF09D1CC60000BE325 /* JSText.cpp */,
                                65DF31F009D1CC60000BE325 /* JSText.h */,
-                               B12D23631356032F002A28D4 /* JSTrackList.cpp */,
-                               B12D236413560330002A28D4 /* JSTrackList.h */,
                        );
                        name = Core;
                        sourceTree = "<group>";
                                935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
                                A7CACDB013CE875B00BBBE3F /* ExceptionCodePlaceholder.cpp */,
                                A74BB76A13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h */,
-                               B12D233513560282002A28D4 /* ExclusiveTrackList.cpp */,
-                               B12D233613560282002A28D4 /* ExclusiveTrackList.h */,
-                               B12D233713560282002A28D4 /* ExclusiveTrackList.idl */,
                                A853123C11D0471B00D4D077 /* FragmentScriptingPermission.h */,
                                2442BBF81194C9D300D49469 /* HashChangeEvent.h */,
                                8482B7441198C32E00BFB005 /* HashChangeEvent.idl */,
                                B14353D1138EA8ED00D53276 /* MediaStreamList.cpp */,
                                B14353D2138EA8ED00D53276 /* MediaStreamList.h */,
                                B14353D3138EA8ED00D53276 /* MediaStreamList.idl */,
+                               49C9F31F13D574F80052600A /* MediaStreamTrack.idl */,
+                               49C9F32013D574F90052600A /* MediaStreamTrack.h */,
+                               49C9F32113D574F90052600A /* MediaStreamTrack.cpp */,
+                               49C9F31C13D574F80052600A /* MediaStreamTrackList.idl */,
+                               49C9F31D13D574F80052600A /* MediaStreamTrackList.h */,
+                               49C9F31E13D574F80052600A /* MediaStreamTrackList.cpp */,
                                E1ADECCD0E76AD8B004A1A5E /* MessageChannel.cpp */,
                                E1ADECCC0E76AD8B004A1A5E /* MessageChannel.h */,
                                E1ADECD00E76ADAB004A1A5E /* MessageChannel.idl */,
                                141B94E509EC4223000E9413 /* MouseEvent.idl */,
                                85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */,
                                85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */,
-                               B12D233813560282002A28D4 /* MultipleTrackList.cpp */,
-                               B12D233913560282002A28D4 /* MultipleTrackList.h */,
-                               B12D233A13560282002A28D4 /* MultipleTrackList.idl */,
                                85031B330A44EFC700F992E0 /* MutationEvent.cpp */,
                                85031B340A44EFC700F992E0 /* MutationEvent.h */,
                                93EEC1F309C2877700C515D1 /* MutationEvent.idl */,
                                933A142D0B7D188600A53FFD /* TextEvent.h */,
                                933A142C0B7D188600A53FFD /* TextEvent.idl */,
                                A77B419F12E675A90054343D /* TextEventInputType.h */,
-                               B12D233B13560282002A28D4 /* TrackList.cpp */,
-                               B12D233C13560282002A28D4 /* TrackList.h */,
-                               B12D233D13560282002A28D4 /* TrackList.idl */,
                                5DB1BC6810715A6400EFAA49 /* TransformSource.h */,
                                5DB1BC6910715A6400EFAA49 /* TransformSourceLibxslt.cpp */,
                                854FE72C0A2297BE0058D7AD /* Traversal.cpp */,
                                935FBCF209BA143B00E230B1 /* ExceptionCode.h in Headers */,
                                A74BB76B13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h in Headers */,
                                148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */,
-                               B12D233F13560282002A28D4 /* ExclusiveTrackList.h in Headers */,
                                6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
                                6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
                                A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
                                E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */,
                                BC60901F0E91B8EC000C68B5 /* JSEventTarget.h in Headers */,
                                3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
-                               B12D236A1356033F002A28D4 /* JSExclusiveTrackList.h in Headers */,
                                BC00F0150E0A189500FD04E3 /* JSFile.h in Headers */,
                                893C47B81238A099002B3D86 /* JSFileCallback.h in Headers */,
                                898785B1122CA2A7003AABDA /* JSFileEntry.h in Headers */,
                                898785B7122CA2A7003AABDA /* JSMetadata.h in Headers */,
                                898785B9122CA2A7003AABDA /* JSMetadataCallback.h in Headers */,
                                A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
-                               B12D236E1356034D002A28D4 /* JSMultipleTrackList.h in Headers */,
                                65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
                                BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */,
                                A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
                                933A14B90B7D1D5200A53FFD /* JSTextEvent.h in Headers */,
                                BCEF45F60E687B5C001C1287 /* JSTextMetrics.h in Headers */,
                                E446141B0CD6826900FADA75 /* JSTimeRanges.h in Headers */,
-                               B12D236613560330002A28D4 /* JSTrackList.h in Headers */,
                                1A750D5D0A90DEE1000FF215 /* JSTreeWalker.h in Headers */,
                                A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */,
                                49EECF0D105070C400099FAB /* JSUint16Array.h in Headers */,
                                935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */,
                                85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */,
                                93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */,
-                               B12D234213560282002A28D4 /* MultipleTrackList.h in Headers */,
                                B1AD4E6313A12A0B00846B27 /* MutableTextTrack.h in Headers */,
                                85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
                                A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
                                9305B24D098F1B6B00C28855 /* Timer.h in Headers */,
                                E44613B00CD6331000FADA75 /* TimeRanges.h in Headers */,
                                49E912AE0EFAC906009D0CAF /* TimingFunction.h in Headers */,
-                               B12D234513560282002A28D4 /* TrackList.h in Headers */,
                                49E911C40EF86D47009D0CAF /* TransformationMatrix.h in Headers */,
                                49E911CE0EF86D47009D0CAF /* TransformOperation.h in Headers */,
                                49E911D00EF86D47009D0CAF /* TransformOperations.h in Headers */,
                                FD7F299713D4C0CB00AD9535 /* WaveShaperProcessor.h in Headers */,
                                FD82D7F813D4C8BD004E4372 /* JSWaveShaperNode.h in Headers */,
                                5913A24213D49EBA00F5B05C /* IdentifiersFactory.h in Headers */,
+                               49C9F32313D574F90052600A /* MediaStreamTrackList.h in Headers */,
+                               49C9F32613D574F90052600A /* MediaStreamTrack.h in Headers */,
+                               49C9F48F13D57D320052600A /* JSMediaStreamTrack.h in Headers */,
+                               49C9F49113D57D320052600A /* JSMediaStreamTrackList.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                93831B570D087D6000E5C984 /* ExceptionCode.cpp in Sources */,
                                A7CACDB113CE875C00BBBE3F /* ExceptionCodePlaceholder.cpp in Sources */,
                                148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */,
-                               B12D233E13560282002A28D4 /* ExclusiveTrackList.cpp in Sources */,
                                6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
                                A75E8B880E1DE2D6007F2481 /* FEBlend.cpp in Sources */,
                                A75E8B8A0E1DE2D6007F2481 /* FEColorMatrix.cpp in Sources */,
                                BC275B8111C5D2B400C9206C /* JSEventSourceCustom.cpp in Sources */,
                                BC6090200E91B8EC000C68B5 /* JSEventTarget.cpp in Sources */,
                                3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
-                               B12D23691356033F002A28D4 /* JSExclusiveTrackList.cpp in Sources */,
                                BC00F0140E0A189500FD04E3 /* JSFile.cpp in Sources */,
                                893C47B71238A099002B3D86 /* JSFileCallback.cpp in Sources */,
                                898785B0122CA2A7003AABDA /* JSFileEntry.cpp in Sources */,
                                898785B6122CA2A7003AABDA /* JSMetadata.cpp in Sources */,
                                898785B8122CA2A7003AABDA /* JSMetadataCallback.cpp in Sources */,
                                A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */,
-                               B12D236D1356034D002A28D4 /* JSMultipleTrackList.cpp in Sources */,
                                65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */,
                                BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */,
                                BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
                                933A14B80B7D1D5200A53FFD /* JSTextEvent.cpp in Sources */,
                                BCEF45F50E687B5C001C1287 /* JSTextMetrics.cpp in Sources */,
                                E446141A0CD6826900FADA75 /* JSTimeRanges.cpp in Sources */,
-                               B12D236513560330002A28D4 /* JSTrackList.cpp in Sources */,
                                1A750D5C0A90DEE1000FF215 /* JSTreeWalker.cpp in Sources */,
                                516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */,
                                A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */,
                                93EB355F09E37FD600F43799 /* MouseEventWithHitTestResults.cpp in Sources */,
                                85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */,
                                93309DFB099E64920056E581 /* MoveSelectionCommand.cpp in Sources */,
-                               B12D234113560282002A28D4 /* MultipleTrackList.cpp in Sources */,
                                B1AD4E6213A12A0B00846B27 /* MutableTextTrack.cpp in Sources */,
                                85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */,
                                BCF34A3711A231CD00C71804 /* NamedNodeMap.cpp in Sources */,
                                7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */,
                                93309EA4099EB78C0056E581 /* Timer.cpp in Sources */,
                                E44613AF0CD6331000FADA75 /* TimeRanges.cpp in Sources */,
-                               B12D234413560282002A28D4 /* TrackList.cpp in Sources */,
                                49E911C30EF86D47009D0CAF /* TransformationMatrix.cpp in Sources */,
                                494BC40D12AEDD9E00743BD2 /* TransformationMatrixCA.cpp in Sources */,
                                B27535580B053814002CE64F /* TransformationMatrixCG.cpp in Sources */,
                                24D912B013CA9A1F00D21915 /* SVGAltGlyphDefElement.cpp in Sources */,
                                24D912B713CA9A6900D21915 /* SVGAltGlyphItemElement.cpp in Sources */,
                                24D912BD13CA9A9700D21915 /* SVGGlyphRefElement.cpp in Sources */,
+                               49C9F32413D574F90052600A /* MediaStreamTrackList.cpp in Sources */,
+                               49C9F32713D574F90052600A /* MediaStreamTrack.cpp in Sources */,
+                               49C9F48E13D57D320052600A /* JSMediaStreamTrack.cpp in Sources */,
+                               49C9F49013D57D320052600A /* JSMediaStreamTrackList.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index e8163e2..2f3f61b 100644 (file)
 #include "MediaStream.h"
 #endif
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-#include "ExclusiveTrackList.h"
-#include "MultipleTrackList.h"
-#include "TrackList.h"
-#endif
-
 using namespace JSC;
 
 namespace WebCore {
@@ -208,17 +202,6 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
         return toJS(exec, globalObject, stream);
 #endif
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-    if (MultipleTrackList* multipleTrackList = target->toMultipleTrackList())
-        return toJS(exec, globalObject, multipleTrackList);
-
-    if (ExclusiveTrackList* exclusiveTrackList = target->toExclusiveTrackList())
-        return toJS(exec, globalObject, exclusiveTrackList);
-
-    if (TrackList* trackList = target->toTrackList())
-        return toJS(exec, globalObject, trackList);
-#endif
-
     ASSERT_NOT_REACHED();
     return jsNull();
 }
index 46cfbed..034d547 100644 (file)
@@ -47,7 +47,6 @@
 #include "V8EventListener.h"
 #include "V8EventListenerList.h"
 #include "V8EventSource.h"
-#include "V8ExclusiveTrackList.h"
 #include "V8FileReader.h"
 #include "V8FileWriter.h"
 #include "V8HTMLCollection.h"
@@ -61,7 +60,6 @@
 #include "V8Location.h"
 #include "V8MediaStream.h"
 #include "V8MessageChannel.h"
-#include "V8MultipleTrackList.h"
 #include "V8NamedNodeMap.h"
 #include "V8Node.h"
 #include "V8NodeFilterCondition.h"
@@ -71,7 +69,6 @@
 #include "V8SharedWorker.h"
 #include "V8SharedWorkerContext.h"
 #include "V8StyleSheet.h"
-#include "V8TrackList.h"
 #include "V8WebSocket.h"
 #include "V8Worker.h"
 #include "V8WorkerContext.h"
@@ -459,17 +456,6 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventTargetToV8Object(EventTarget* ta
         return toV8(stream);
 #endif
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-    if (MultipleTrackList* multipleTrackList = target->toMultipleTrackList())
-        return toV8(multipleTrackList);
-
-    if (ExclusiveTrackList* exclusiveTrackList = target->toExclusiveTrackList())
-        return toV8(exclusiveTrackList);
-
-    if (TrackList* trackList = target->toTrackList())
-        return toV8(trackList);
-#endif
-
     ASSERT(0);
     return notHandledByInterceptor();
 }
index 9cb098e..f293989 100644 (file)
 #include "ExceptionBase.cpp"
 #include "ExceptionCode.cpp"
 #include "ExceptionCodePlaceholder.cpp"
-#include "ExclusiveTrackList.cpp"
 #include "IconURL.cpp"
 #include "KeyboardEvent.cpp"
 #include "LocalMediaStream.cpp"
 #include "MediaStream.cpp"
+#include "MediaStreamTrack.cpp"
+#include "MediaStreamTrackList.cpp"
 #include "MessageChannel.cpp"
 #include "MessageEvent.cpp"
 #include "MessagePort.cpp"
 #include "MessagePortChannel.cpp"
 #include "MouseEvent.cpp"
 #include "MouseRelatedEvent.cpp"
-#include "MultipleTrackList.cpp"
 #include "MutationEvent.cpp"
 #include "NameNodeList.cpp"
 #include "NodeFilter.cpp"
 #include "Touch.cpp"
 #include "TouchEvent.cpp"
 #include "TouchList.cpp"
-#include "TrackList.cpp"
 #include "TransformSourceLibxslt.cpp"
 #include "Traversal.cpp"
 #include "TreeScope.cpp"
index 15f3821..a28bdb1 100644 (file)
@@ -217,23 +217,6 @@ LocalMediaStream* EventTarget::toLocalMediaStream()
 }
 #endif
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-TrackList* EventTarget::toTrackList()
-{
-    return 0;
-}
-
-MultipleTrackList* EventTarget::toMultipleTrackList()
-{
-    return 0;
-}
-
-ExclusiveTrackList* EventTarget::toExclusiveTrackList()
-{
-    return 0;
-}
-#endif
-
 bool EventTarget::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
 {
     EventTargetData* d = ensureEventTargetData();
index ae2a64e..bcc758c 100644 (file)
@@ -47,7 +47,6 @@ namespace WebCore {
     class Event;
     class EventListener;
     class EventSource;
-    class ExclusiveTrackList;
     class FileReader;
     class FileWriter;
     class IDBDatabase;
@@ -58,14 +57,12 @@ namespace WebCore {
     class LocalMediaStream;
     class MediaStream;
     class MessagePort;
-    class MultipleTrackList;
     class Node;
     class Notification;
     class SVGElementInstance;
     class ScriptExecutionContext;
     class SharedWorker;
     class SharedWorkerContext;
-    class TrackList;
     class WebSocket;
     class Worker;
     class XMLHttpRequest;
@@ -157,12 +154,6 @@ namespace WebCore {
         virtual LocalMediaStream* toLocalMediaStream();
 #endif
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-        virtual TrackList* toTrackList();
-        virtual MultipleTrackList* toMultipleTrackList();
-        virtual ExclusiveTrackList* toExclusiveTrackList();
-#endif
-
         virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
 
         virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
diff --git a/Source/WebCore/dom/ExclusiveTrackList.cpp b/Source/WebCore/dom/ExclusiveTrackList.cpp
deleted file mode 100644 (file)
index f96d228..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ExclusiveTrackList.h"
-
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-
-#include "Event.h"
-#include "EventNames.h"
-
-namespace WebCore {
-
-PassRefPtr<ExclusiveTrackList> ExclusiveTrackList::create(const TrackVector& tracks, long selectedIndex)
-{
-    return adoptRef(new ExclusiveTrackList(tracks, selectedIndex));
-}
-
-ExclusiveTrackList::ExclusiveTrackList(const TrackVector& tracks, long selectedIndex)
-    : TrackList(tracks)
-    , m_selectedIndex(selectedIndex)
-{
-    ASSERT(m_selectedIndex >= NoSelection && m_selectedIndex < static_cast<long>(length()));
-}
-
-ExclusiveTrackList::~ExclusiveTrackList()
-{
-}
-
-void ExclusiveTrackList::clear()
-{
-    m_selectedIndex = NoSelection;
-    TrackList::clear();
-}
-
-void ExclusiveTrackList::select(long index, ExceptionCode& ec)
-{
-    if (!checkIndex(index, ec, NoSelection))
-        return;
-
-    m_selectedIndex = index;
-
-#if ENABLE(MEDIA_STREAM)
-    if (mediaStreamFrameController())
-        mediaStreamFrameController()->selectVideoTrack(associatedStreamLabel(), index);
-#endif
-
-    postChangeEvent();
-}
-
-#if ENABLE(MEDIA_STREAM)
-void ExclusiveTrackList::trackFailed(unsigned long index)
-{
-    if (m_selectedIndex == static_cast<long>(index))
-        m_selectedIndex = NoSelection;
-
-    TrackList::trackFailed(index);
-}
-#endif
-
-ExclusiveTrackList* ExclusiveTrackList::toExclusiveTrackList()
-{
-    return this;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
index 1d0bf54..df37227 100644 (file)
@@ -29,9 +29,7 @@
 
 #include "Event.h"
 #include "EventNames.h"
-#include "ExclusiveTrackList.h"
 #include "MediaStreamFrameController.h"
-#include "MultipleTrackList.h"
 #include "ScriptExecutionContext.h"
 
 namespace WebCore {
@@ -59,20 +57,14 @@ public:
     Callback m_callback;
 };
 
-PassRefPtr<LocalMediaStream> LocalMediaStream::create(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
+PassRefPtr<LocalMediaStream> LocalMediaStream::create(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MediaStreamTrackList> tracks)
 {
-    return adoptRef(new LocalMediaStream(frameController, label, audioTracks, videoTracks));
+    return adoptRef(new LocalMediaStream(frameController, label, tracks));
 }
 
-LocalMediaStream::LocalMediaStream(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
-    : MediaStream(frameController, label, true)
-    , m_audioTracks(audioTracks)
-    , m_videoTracks(videoTracks)
+LocalMediaStream::LocalMediaStream(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MediaStreamTrackList> tracks)
+    : MediaStream(frameController, label, tracks, true)
 {
-    ASSERT(m_audioTracks);
-    ASSERT(m_videoTracks);
-    m_audioTracks->associateStream(label);
-    m_videoTracks->associateStream(label);
 }
 
 LocalMediaStream::~LocalMediaStream()
@@ -94,30 +86,15 @@ void LocalMediaStream::detachEmbedder()
 
 void LocalMediaStream::streamEnded()
 {
-    m_audioTracks->clear();
-    m_videoTracks->clear();
-
     MediaStream::streamEnded();
 }
 
-PassRefPtr<MultipleTrackList> LocalMediaStream::audioTracks() const
-{
-    return m_audioTracks;
-}
-
-PassRefPtr<ExclusiveTrackList> LocalMediaStream::videoTracks() const
-{
-    return m_videoTracks;
-}
-
 void LocalMediaStream::stop()
 {
     if (!mediaStreamFrameController() || m_readyState == ENDED)
         return;
 
     mediaStreamFrameController()->stopGeneratedStream(label());
-    m_audioTracks->clear();
-    m_videoTracks->clear();
 
     m_readyState = ENDED;
 
index cab477e..6c85408 100644 (file)
 
 namespace WebCore {
 
-class ExclusiveTrackList;
-class MultipleTrackList;
-
 class LocalMediaStream : public MediaStream {
 public:
-    static PassRefPtr<LocalMediaStream> create(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
+    static PassRefPtr<LocalMediaStream> create(MediaStreamFrameController*, const String& label, PassRefPtr<MediaStreamTrackList> tracks);
     virtual ~LocalMediaStream();
 
     void stop();
 
-    PassRefPtr<MultipleTrackList> audioTracks() const;
-    PassRefPtr<ExclusiveTrackList> videoTracks() const;
-
     // MediaStreamFrameController::StreamClient implementation.
     virtual void detachEmbedder();
     virtual void streamEnded();
@@ -52,15 +46,15 @@ public:
     // EventTarget.
     virtual LocalMediaStream* toLocalMediaStream();
 
+protected:
+    virtual bool isLocalMediaStream() const { return true; }
+
 private:
-    LocalMediaStream(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
+    LocalMediaStream(MediaStreamFrameController*, const String& label, PassRefPtr<MediaStreamTrackList> tracks);
     class DispatchUpdateTask;
     friend class DispatchUpdateTask;
 
     void onStop();
-
-    RefPtr<MultipleTrackList> m_audioTracks;
-    RefPtr<ExclusiveTrackList> m_videoTracks;
 };
 
 } // namespace WebCore
index 1f8fe26..e4725a0 100644 (file)
  */
 
 module core {
+
     interface [
         Conditional=MEDIA_STREAM,
         GenerateNativeConverter,
         EventTarget
     ] LocalMediaStream : MediaStream {
         void stop();
-
-        // Track control.
-        readonly attribute MultipleTrackList audioTracks;
-        readonly attribute ExclusiveTrackList videoTracks;
     };
 
 }
index 8297204..b09fba2 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<MediaStream> MediaStream::create(MediaStreamFrameController* frameController, const String& label)
+PassRefPtr<MediaStream> MediaStream::create(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MediaStreamTrackList> tracks, bool isLocalMediaStream)
 {
-    return adoptRef(new MediaStream(frameController, label));
+    return adoptRef(new MediaStream(frameController, label, tracks, isLocalMediaStream));
 }
 
-MediaStream::MediaStream(MediaStreamFrameController* frameController, const String& label, bool isLocalMediaStream)
+MediaStream::MediaStream(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MediaStreamTrackList> tracks, bool isLocalMediaStream)
     : MediaStreamClient(frameController, label, isLocalMediaStream)
     , m_readyState(LIVE)
+    , m_tracks(tracks)
 {
 }
 
index ef520d3..a619560 100644 (file)
@@ -30,6 +30,7 @@
 #include "EventNames.h"
 #include "EventTarget.h"
 #include "MediaStreamFrameController.h"
+#include "MediaStreamTrackList.h"
 #include "ScriptExecutionContext.h"
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
@@ -47,16 +48,16 @@ public:
         ENDED = 2
     };
 
-    static PassRefPtr<MediaStream> create(MediaStreamFrameController*, const String& label);
+    static PassRefPtr<MediaStream> create(MediaStreamFrameController*, const String& label, PassRefPtr<MediaStreamTrackList> tracks, bool isLocalMediaStream = false);
     virtual ~MediaStream();
 
-    // FIXME: implement the record method when MediaStreamRecorder is available.
-
     DEFINE_ATTRIBUTE_EVENT_LISTENER(ended);
 
     unsigned short readyState() const { return m_readyState; }
     const String& label() const { return clientId(); }
 
+    PassRefPtr<MediaStreamTrackList> tracks() { return m_tracks; }
+
     // MediaStreamFrameController::MediaStreamClient implementation.
     virtual void streamEnded();
 
@@ -68,7 +69,7 @@ public:
     using RefCounted<MediaStream>::deref;
 
 protected:
-    MediaStream(MediaStreamFrameController*, const String& label, bool isLocalMediaStream = false);
+    MediaStream(MediaStreamFrameController*, const String& label, PassRefPtr<MediaStreamTrackList> tracks, bool isLocalMediaStream);
 
     // EventTarget implementation.
     virtual EventTargetData* eventTargetData();
@@ -84,6 +85,8 @@ private:
     virtual void derefEventTarget() { deref(); }
 
     EventTargetData m_eventTargetData;
+
+    RefPtr<MediaStreamTrackList> m_tracks;
 };
 
 } // namespace WebCore
index e8f8415..e3212ce 100644 (file)
  */
 
 module core {
+
     interface [
         LegacyDefaultOptionalArguments,
         Conditional=MEDIA_STREAM,
         EventTarget
     ] MediaStream {
         readonly attribute DOMString label;
+        readonly attribute MediaStreamTrackList tracks;
+
         // FIXME: implement the record method when MediaStreamRecorder is available.
 
         const unsigned short LIVE = 1;
diff --git a/Source/WebCore/dom/MediaStreamTrack.cpp b/Source/WebCore/dom/MediaStreamTrack.cpp
new file mode 100644 (file)
index 0000000..be4cbf7
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MediaStreamTrack.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+namespace WebCore {
+
+PassRefPtr<MediaStreamTrack> MediaStreamTrack::create(const String& id, const String& kind, const String& label)
+{
+    return adoptRef(new MediaStreamTrack(id, kind, label));
+}
+
+MediaStreamTrack::MediaStreamTrack(const String& id, const String& kind, const String& label)
+    : m_id(id)
+    , m_kind(kind)
+    , m_label(label)
+    , m_enabled(true)
+{
+}
+
+MediaStreamTrack::~MediaStreamTrack()
+{
+}
+
+const String& MediaStreamTrack::kind() const
+{
+    return m_kind;
+}
+
+const String& MediaStreamTrack::label() const
+{
+    return m_label;
+}
+
+bool MediaStreamTrack::enabled() const
+{
+    return m_enabled;
+}
+
+void MediaStreamTrack::setEnabled(bool enabled)
+{
+    m_enabled = enabled;
+
+    if (mediaStreamFrameController())
+        mediaStreamFrameController()->setMediaStreamTrackEnabled(m_id, enabled);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
similarity index 63%
rename from Source/WebCore/dom/MultipleTrackList.h
rename to Source/WebCore/dom/MediaStreamTrack.h
index 2db029b..3222dc7 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef MultipleTrackList_h
-#define MultipleTrackList_h
+#ifndef MediaStreamTrack_h
+#define MediaStreamTrack_h
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
+#if ENABLE(MEDIA_STREAM)
 
-#include "TrackList.h"
+#include "PlatformString.h"
+#include "MediaStreamFrameController.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
 
-typedef Vector<bool> EnabledTracks;
-
-class MultipleTrackList : public TrackList {
+class MediaStreamTrack : public RefCounted<MediaStreamTrack>,
+                         public MediaStreamFrameController::GenericClient {
 public:
-    static PassRefPtr<MultipleTrackList> create(const TrackVector&, const EnabledTracks&);
-    virtual ~MultipleTrackList();
-
-    bool isEnabled(unsigned long index, ExceptionCode&) const;
-    void enable(unsigned long index, ExceptionCode&);
-    void disable(unsigned long index, ExceptionCode&);
+    static PassRefPtr<MediaStreamTrack> create(const String& id, const String& kind, const String& label);
+    virtual ~MediaStreamTrack();
 
-    virtual void clear();
+    const String& kind() const;
+    const String& label() const;
 
-#if ENABLE(MEDIA_STREAM)
-    virtual void trackFailed(unsigned long index);
-#endif
-
-    // EventTarget implementation.
-    virtual MultipleTrackList* toMultipleTrackList();
+    bool enabled() const;
+    void setEnabled(bool enabled);
 
 private:
-    MultipleTrackList(const TrackVector&, const EnabledTracks&);
+    MediaStreamTrack(const String& id, const String& kind, const String& label);
 
-    Vector<bool> m_isEnabled;
+    String m_id;
+    String m_kind;
+    String m_label;
+    bool m_enabled;
 };
 
+typedef Vector<RefPtr<MediaStreamTrack> > TrackVector;
+
 } // namespace WebCore
 
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
+#endif // ENABLE(MEDIA_STREAM)
 
-#endif // MultipleTrackList_h
+#endif // MediaStreamTrack_h
similarity index 74%
rename from Source/WebCore/dom/ExclusiveTrackList.idl
rename to Source/WebCore/dom/MediaStreamTrack.idl
index 9689b98..29875aa 100644 (file)
 module core {
 
     interface [
-        Conditional=MEDIA_STREAM|VIDEO_TRACK,
-        LegacyDefaultOptionalArguments,
-        GenerateNativeConverter,
-    ] ExclusiveTrackList : TrackList {
-        // FIXME: the spec says unsigned long, but -1 is used when nothing is selected.
-        // A bug has been already submitted to the spec draft.
-        // http://www.w3.org/Bugs/Public/show_bug.cgi?id=12600
-        readonly attribute long selectedIndex;
-        void select(in long index)
-            raises(DOMException);
+        Conditional=MEDIA_STREAM,
+    ] MediaStreamTrack {
+      readonly attribute DOMString kind;
+      readonly attribute DOMString label;
+               attribute boolean enabled;
     };
 
 }
similarity index 64%
rename from Source/WebCore/dom/TrackList.idl
rename to Source/WebCore/dom/MediaStreamTrackList.cpp
index 5160dae..6fcc67c 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-module core {
-
-    interface [
-        LegacyDefaultOptionalArguments,
-        Conditional=MEDIA_STREAM|VIDEO_TRACK,
-        EventTarget
-    ] TrackList {
-        readonly attribute unsigned long length;
-        DOMString getID(in unsigned long index)
-            raises(DOMException);
-        DOMString getKind(in unsigned long index)
-            raises(DOMException);
-        DOMString getLabel(in unsigned long index)
-            raises(DOMException);
-        DOMString getLanguage(in unsigned long index)
-            raises(DOMException);
-
-        attribute EventListener onchange;
-    };
+#include "config.h"
+#include "MediaStreamTrackList.h"
 
+#if ENABLE(MEDIA_STREAM)
+
+namespace WebCore {
+
+PassRefPtr<MediaStreamTrackList> MediaStreamTrackList::create(const TrackVector& tracks)
+{
+    return adoptRef(new MediaStreamTrackList(tracks));
+}
+
+MediaStreamTrackList::MediaStreamTrackList(const TrackVector& tracks)
+    : m_tracks(tracks)
+{
+}
+
+MediaStreamTrackList::~MediaStreamTrackList()
+{
 }
+
+unsigned MediaStreamTrackList::length() const
+{
+    return m_tracks.size();
+}
+
+PassRefPtr<MediaStreamTrack> MediaStreamTrackList::item(unsigned index) const
+{
+    if (index < m_tracks.size())
+        return m_tracks.at(index);
+    else
+        return PassRefPtr<MediaStreamTrack>();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
similarity index 63%
rename from Source/WebCore/dom/ExclusiveTrackList.h
rename to Source/WebCore/dom/MediaStreamTrackList.h
index 9c37d1e..1efe6ae 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ExclusiveTrackList_h
-#define ExclusiveTrackList_h
+#ifndef MediaStreamTrackList_h
+#define MediaStreamTrackList_h
 
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
+#if ENABLE(MEDIA_STREAM)
 
-#include "TrackList.h"
-#include <wtf/Vector.h>
+#include "MediaStreamTrack.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
 
 namespace WebCore {
 
-class ExclusiveTrackList : public TrackList {
+class MediaStreamTrackList : public RefCounted<MediaStreamTrackList> {
 public:
-    static const long NoSelection = -1;
-
-    static PassRefPtr<ExclusiveTrackList> create(const TrackVector&, long selectedIndex = NoSelection);
-    virtual ~ExclusiveTrackList();
-
-    int selectedIndex() const { return m_selectedIndex; }
-    void select(long index, ExceptionCode&);
+    static PassRefPtr<MediaStreamTrackList> create(const TrackVector& m_tracks);
+    virtual ~MediaStreamTrackList();
 
-    virtual void clear();
-
-#if ENABLE(MEDIA_STREAM)
-    virtual void trackFailed(unsigned long index);
-#endif
+    // DOM methods & attributes for MediaStreamTrackList
+    unsigned length() const;
+    PassRefPtr<MediaStreamTrack> item(unsigned index) const;
 
-    // EventTarget implementation.
-    virtual ExclusiveTrackList* toExclusiveTrackList();
+    void associateStream(const String& label) { m_associatedStreamLabel = label; }
 
 private:
-    ExclusiveTrackList(const TrackVector&, long selectedIndex);
+    MediaStreamTrackList(const TrackVector& m_tracks);
 
-    long m_selectedIndex;
+    TrackVector m_tracks;
+    String m_associatedStreamLabel;
 };
 
 } // namespace WebCore
 
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
+#endif // ENABLE(MEDIA_STREAM)
 
-#endif // ExclusiveTrackList_h
+#endif // MediaStreamTrackList_h
similarity index 80%
rename from Source/WebCore/dom/MultipleTrackList.idl
rename to Source/WebCore/dom/MediaStreamTrackList.idl
index 6b46a8b..e3496ec 100644 (file)
 module core {
 
     interface [
-        Conditional=MEDIA_STREAM|VIDEO_TRACK,
         LegacyDefaultOptionalArguments,
-        GenerateNativeConverter,
-    ] MultipleTrackList : TrackList {
-        boolean isEnabled(in unsigned long index)
-            raises(DOMException);
-        void enable(in unsigned long index)
-            raises(DOMException);
-        void disable(in unsigned long index)
-            raises(DOMException);
+        Conditional=MEDIA_STREAM,
+        HasIndexGetter
+    ] MediaStreamTrackList {
+        MediaStreamTrack item(in [IsIndex] unsigned long index);
+
+        readonly attribute unsigned long length;
     };
 
 }
diff --git a/Source/WebCore/dom/MultipleTrackList.cpp b/Source/WebCore/dom/MultipleTrackList.cpp
deleted file mode 100644 (file)
index e8e3719..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MultipleTrackList.h"
-
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-
-#include "Event.h"
-#include "EventNames.h"
-
-namespace WebCore {
-
-PassRefPtr<MultipleTrackList> MultipleTrackList::create(const TrackVector& tracks, const EnabledTracks& enabledTracks)
-{
-    return adoptRef(new MultipleTrackList(tracks, enabledTracks));
-}
-
-MultipleTrackList::MultipleTrackList(const TrackVector& tracks, const EnabledTracks& enabledTracks)
-    : TrackList(tracks)
-    , m_isEnabled(enabledTracks)
-{
-    ASSERT(m_isEnabled.size() == length());
-}
-
-MultipleTrackList::~MultipleTrackList()
-{
-}
-
-void MultipleTrackList::clear()
-{
-    m_isEnabled.clear();
-    TrackList::clear();
-}
-
-#if ENABLE(MEDIA_STREAM)
-void MultipleTrackList::trackFailed(unsigned long index)
-{
-    TrackList::trackFailed(index);
-    m_isEnabled.remove(index);
-}
-#endif
-
-bool MultipleTrackList::isEnabled(unsigned long index, ExceptionCode& ec) const
-{
-    return checkIndex(index, ec) ? m_isEnabled[index] : false;
-}
-
-void MultipleTrackList::enable(unsigned long index, ExceptionCode& ec)
-{
-    if (!checkIndex(index, ec))
-        return;
-
-    m_isEnabled[index] = true;
-
-#if ENABLE(MEDIA_STREAM)
-    if (mediaStreamFrameController())
-        mediaStreamFrameController()->enableAudioTrack(associatedStreamLabel(), index);
-#endif
-
-    postChangeEvent();
-}
-
-void MultipleTrackList::disable(unsigned long index, ExceptionCode& ec)
-{
-    if (!checkIndex(index, ec))
-        return;
-
-    m_isEnabled[index] = false;
-
-#if ENABLE(MEDIA_STREAM)
-    if (mediaStreamFrameController())
-        mediaStreamFrameController()->disableAudioTrack(associatedStreamLabel(), index);
-#endif
-
-    postChangeEvent();
-}
-
-MultipleTrackList* MultipleTrackList::toMultipleTrackList()
-{
-    return this;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
diff --git a/Source/WebCore/dom/TrackList.cpp b/Source/WebCore/dom/TrackList.cpp
deleted file mode 100644 (file)
index 9b8d1c4..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TrackList.h"
-
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-
-#include "Event.h"
-#include "EventNames.h"
-#include "ExceptionCode.h"
-#include "ScriptExecutionContext.h"
-
-namespace WebCore {
-
-PassRefPtr<Track> Track::create(const String& id, const AtomicString& kind, const String& label, const String& language)
-{
-    return adoptRef(new Track(id, kind, label, language));
-}
-
-Track::Track(const String& id, const AtomicString& kind, const String& label, const String& language)
-    : m_id(id)
-    , m_kind(kind)
-    , m_label(label)
-    , m_language(language)
-{
-}
-
-PassRefPtr<TrackList> TrackList::create(const TrackVector& tracks)
-{
-    return adoptRef(new TrackList(tracks));
-}
-
-TrackList::TrackList(const TrackVector& tracks)
-    : m_tracks(tracks)
-{
-}
-
-TrackList::~TrackList()
-{
-}
-
-unsigned long TrackList::length() const
-{
-    return m_tracks.size();
-}
-
-bool TrackList::checkIndex(long index, ExceptionCode& ec, long allowed) const
-{
-    if (index >= static_cast<long>(length()) || (index < 0 && index != allowed)) {
-        ec = INDEX_SIZE_ERR;
-        return false;
-    }
-
-    ec = 0;
-    return true;
-}
-
-const String& TrackList::getID(unsigned long index, ExceptionCode& ec) const
-{
-    DEFINE_STATIC_LOCAL(String, nullString, ());
-    return checkIndex(index, ec) ? m_tracks[index]->id() : nullString;
-}
-
-const AtomicString& TrackList::getKind(unsigned long index, ExceptionCode& ec) const
-{
-    DEFINE_STATIC_LOCAL(AtomicString, nullString, ());
-    return checkIndex(index, ec) ? m_tracks[index]->kind() : nullString;
-}
-
-const String& TrackList::getLabel(unsigned long index, ExceptionCode& ec) const
-{
-    DEFINE_STATIC_LOCAL(String, nullString, ());
-    return checkIndex(index, ec) ? m_tracks[index]->label() : nullString;
-}
-
-const String& TrackList::getLanguage(unsigned long index, ExceptionCode& ec) const
-{
-    DEFINE_STATIC_LOCAL(String, nullString, ());
-    return checkIndex(index, ec) ? m_tracks[index]->language() : nullString;
-}
-
-void TrackList::clear()
-{
-#if ENABLE(MEDIA_STREAM)
-    m_associatedStreamLabel = String();
-#endif
-
-    if (m_tracks.isEmpty())
-        return;
-
-    m_tracks.clear();
-
-    postChangeEvent();
-}
-
-void TrackList::postChangeEvent()
-{
-    // Dispatch a change event asynchronously. Don't assert since this may be called during shutdown,
-    // and the ScriptExecutionContext may be not available in the Media Stream case.
-    if (!scriptExecutionContext())
-        return;
-
-    ASSERT(scriptExecutionContext()->isContextThread());
-    scriptExecutionContext()->postTask(DispatchTask<TrackList, int>::create(this, &TrackList::dispatchChangeEvent, 0));
-}
-
-void TrackList::dispatchChangeEvent(int)
-{
-    dispatchEvent(Event::create(eventNames().changeEvent, false, false));
-}
-
-#if ENABLE(MEDIA_STREAM)
-void TrackList::associateStream(const String& label)
-{
-    ASSERT(m_associatedStreamLabel.isNull());
-    m_associatedStreamLabel = label;
-}
-
-const String& TrackList::associatedStreamLabel() const
-{
-    return m_associatedStreamLabel;
-}
-
-void TrackList::trackFailed(unsigned long index)
-{
-    ASSERT(index < length());
-    m_tracks.remove(index);
-    postChangeEvent();
-}
-#endif
-
-TrackList* TrackList::toTrackList()
-{
-    return this;
-}
-
-ScriptExecutionContext* TrackList::scriptExecutionContext() const
-{
-#if ENABLE(MEDIA_STREAM)
-    if (mediaStreamFrameController())
-        return mediaStreamFrameController()->scriptExecutionContext();
-#endif
-
-    // FIXME: provide an script execution context for HTML Media Element use case.
-    // https://bugs.webkit.org/show_bug.cgi?id=61127
-    return 0;
-}
-
-EventTargetData* TrackList::eventTargetData()
-{
-    return &m_eventTargetData;
-}
-
-EventTargetData* TrackList::ensureEventTargetData()
-{
-    return &m_eventTargetData;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
diff --git a/Source/WebCore/dom/TrackList.h b/Source/WebCore/dom/TrackList.h
deleted file mode 100644 (file)
index 8f6799b..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TrackList_h
-#define TrackList_h
-
-#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-
-#include "EventNames.h"
-#include "EventTarget.h"
-#include "MediaStreamFrameController.h"
-#include "ScriptExecutionContext.h"
-#include <wtf/Forward.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class Track : public RefCounted<Track> {
-public:
-    static PassRefPtr<Track> create(const String& id, const AtomicString& kind, const String& label, const String& language);
-
-    const String& id() const { return m_id; }
-    const AtomicString& kind() const { return m_kind; }
-    const String& label() const { return m_label; }
-    const String& language() const { return m_language; }
-
-private:
-    Track(const String& id, const AtomicString& kind, const String& label, const String& language);
-
-    String m_id;
-    AtomicString m_kind;
-    String m_label;
-    String m_language;
-};
-
-typedef Vector<RefPtr<Track> > TrackVector;
-
-class TrackList : public RefCounted<TrackList>,
-#if ENABLE(MEDIA_STREAM)
-                  public MediaStreamFrameController::GenericClient,
-#endif
-                  public EventTarget {
-public:
-    static PassRefPtr<TrackList> create(const TrackVector&);
-    virtual ~TrackList();
-
-    unsigned long length() const;
-    const String& getID(unsigned long index, ExceptionCode&) const;
-    const AtomicString& getKind(unsigned long index, ExceptionCode&) const;
-    const String& getLabel(unsigned long index, ExceptionCode&) const;
-    const String& getLanguage(unsigned long index, ExceptionCode&) const;
-
-    DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
-
-    virtual void clear();
-
-#if ENABLE(MEDIA_STREAM)
-    void associateStream(const String& streamLabel);
-    const String& associatedStreamLabel() const;
-    virtual void trackFailed(unsigned long index);
-#endif
-
-    // EventTarget implementation.
-    virtual TrackList* toTrackList();
-    virtual ScriptExecutionContext* scriptExecutionContext() const;
-
-    using RefCounted<TrackList>::ref;
-    using RefCounted<TrackList>::deref;
-
-    template <typename T, typename U>
-    class DispatchTask : public ScriptExecutionContext::Task {
-    public:
-        typedef void (T::*Callback)(U);
-
-        static PassOwnPtr<DispatchTask> create(PassRefPtr<T> object, Callback callback, U args)
-        {
-            return adoptPtr(new DispatchTask(object, callback, args));
-        }
-
-        virtual void performTask(ScriptExecutionContext*)
-        {
-            (m_object.get()->*m_callback)(m_args);
-        }
-
-    public:
-        DispatchTask(PassRefPtr<T> object, Callback callback, U args)
-            : m_object(object)
-            , m_callback(callback)
-            , m_args(args) { }
-
-        RefPtr<T> m_object;
-        Callback m_callback;
-        U m_args;
-    };
-
-protected:
-    TrackList(const TrackVector&);
-    bool checkIndex(long index, ExceptionCode&, long allowed = 0) const;
-    void postChangeEvent();
-
-    // EventTarget implementation.
-    virtual EventTargetData* eventTargetData();
-    virtual EventTargetData* ensureEventTargetData();
-
-private:
-    // EventTarget implementation.
-    virtual void refEventTarget() { ref(); }
-    virtual void derefEventTarget() { deref(); }
-
-    void dispatchChangeEvent(int);
-
-    EventTargetData m_eventTargetData;
-    TrackVector m_tracks;
-
-#if ENABLE(MEDIA_STREAM)
-    String m_associatedStreamLabel;
-#endif
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
-
-#endif // TrackList_h
index b3ef740..03dedfd 100644 (file)
@@ -52,12 +52,8 @@ public:
     // Stop a generated stream.
     virtual void stopGeneratedStream(const String& streamLabel) = 0;
 
-    // Enable/disable an audio track in a generated stream.
-    virtual void enableAudioTrack(const String& streamLabel, unsigned long index) = 0;
-    virtual void disableAudioTrack(const String& streamLabel, unsigned long index) = 0;
-
-    // Select a video track in a generated stream.
-    virtual void selectVideoTrack(const String& streamLabel, long index) = 0;
+    // Enable/disable an track.
+    virtual void setMediaStreamTrackEnabled(const String& trackId, bool enabled) = 0;
 
 protected:
     virtual ~MediaStreamClient() { }
index 04322e8..aadcf60 100644 (file)
@@ -27,9 +27,8 @@
 
 #if ENABLE(MEDIA_STREAM)
 
-#include "ExclusiveTrackList.h"
 #include "MediaStreamFrameController.h"
-#include "MultipleTrackList.h"
+#include "MediaStreamTrackList.h"
 #include "SecurityOrigin.h"
 #include <wtf/Vector.h>
 
@@ -119,22 +118,12 @@ void MediaStreamController::stopGeneratedStream(const String& streamLabel)
     m_client->stopGeneratedStream(streamLabel);
 }
 
-void MediaStreamController::enableAudioTrack(const String& streamLabel, unsigned long index)
+void MediaStreamController::setMediaStreamTrackEnabled(const String& trackId, bool enabled)
 {
-    m_client->enableAudioTrack(streamLabel, index);
+    m_client->setMediaStreamTrackEnabled(trackId, enabled);
 }
 
-void MediaStreamController::disableAudioTrack(const String& streamLabel, unsigned long index)
-{
-    m_client->disableAudioTrack(streamLabel, index);
-}
-
-void MediaStreamController::selectVideoTrack(const String& streamLabel, long index)
-{
-    m_client->selectVideoTrack(streamLabel, index);
-}
-
-void MediaStreamController::streamGenerated(int controllerRequestId, const String& streamLabel, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
+void MediaStreamController::streamGenerated(int controllerRequestId, const String& streamLabel, PassRefPtr<MediaStreamTrackList> tracks)
 {
     // Don't assert since the frame controller can have been destroyed while the request reply was coming back.
     if (m_requests.contains(controllerRequestId)) {
@@ -142,7 +131,7 @@ void MediaStreamController::streamGenerated(int controllerRequestId, const Strin
         registerStream(streamLabel, request.frameController());
         m_requests.remove(controllerRequestId);
         ASSERT(request.frameController());
-        request.frameController()->streamGenerated(request.localId(), streamLabel, audioTracks, videoTracks);
+        request.frameController()->streamGenerated(request.localId(), streamLabel, tracks);
     }
 }
 
@@ -163,20 +152,6 @@ void MediaStreamController::streamFailed(const String& streamLabel)
         m_streams.get(streamLabel)->streamFailed(streamLabel);
 }
 
-void MediaStreamController::audioTrackFailed(const String& streamLabel, unsigned long index)
-{
-    // Don't assert since the frame controller can have been destroyed by the time this is called.
-    if (m_streams.contains(streamLabel))
-        m_streams.get(streamLabel)->audioTrackFailed(streamLabel, index);
-}
-
-void MediaStreamController::videoTrackFailed(const String& streamLabel, unsigned long index)
-{
-    // Don't assert since the frame controller can have been destroyed by the time this is called.
-    if (m_streams.contains(streamLabel))
-        m_streams.get(streamLabel)->videoTrackFailed(streamLabel, index);
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(MEDIA_STREAM)
index b2d56c2..10ac4ce 100644 (file)
 
 namespace WebCore {
 
-class ExclusiveTrackList;
 class MediaStreamClient;
 class MediaStreamFrameController;
-class MultipleTrackList;
+class MediaStreamTrackList;
 class SecurityOrigin;
 
 class MediaStreamController {
@@ -53,15 +52,13 @@ public:
 
     void generateStream(MediaStreamFrameController*, int requestId, GenerateStreamOptionFlags, PassRefPtr<SecurityOrigin>);
     void stopGeneratedStream(const String& streamLabel);
-    void enableAudioTrack(const String& streamLabel, unsigned long index);
-    void disableAudioTrack(const String& streamLabel, unsigned long index);
-    void selectVideoTrack(const String& streamLabel, long index);
 
-    void streamGenerated(int requestId, const String& streamLabel, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
+    // Enable/disable an track.
+    void setMediaStreamTrackEnabled(const String& trackId, bool enabled);
+
+    void streamGenerated(int requestId, const String& streamLabel, PassRefPtr<MediaStreamTrackList> tracks);
     void streamGenerationFailed(int requestId, NavigatorUserMediaError::ErrorCode);
     void streamFailed(const String& streamLabel);
-    void audioTrackFailed(const String& streamLabel, unsigned long index);
-    void videoTrackFailed(const String& streamLabel, unsigned long index);
 
 private:
     int registerRequest(int localRequestId, MediaStreamFrameController*);
index 5e94b82..9205338 100644 (file)
 
 #include "DOMWindow.h"
 #include "Document.h"
-#include "ExclusiveTrackList.h"
 #include "Frame.h"
 #include "LocalMediaStream.h"
 #include "MediaStreamController.h"
-#include "MultipleTrackList.h"
+#include "MediaStreamTrackList.h"
 #include "NavigatorUserMediaErrorCallback.h"
 #include "NavigatorUserMediaSuccessCallback.h"
 #include "Page.h"
@@ -307,37 +306,13 @@ void MediaStreamFrameController::stopGeneratedStream(const String& streamLabel)
         pageController()->stopGeneratedStream(streamLabel);
 }
 
-void MediaStreamFrameController::enableAudioTrack(const String& streamLabel, unsigned long index)
+void MediaStreamFrameController::setMediaStreamTrackEnabled(const String& trackId, bool enabled)
 {
-    // Don't assert since the audio tracks don't necessarily keep alive their associated generated stream object.
-    if (!m_streams.contains(streamLabel))
-        return;
-
-    if (isClientAvailable())
-        pageController()->enableAudioTrack(streamLabel, index);
-}
-
-void MediaStreamFrameController::disableAudioTrack(const String& streamLabel, unsigned long index)
-{
-    // Don't assert since the audio tracks don't necessarily keep alive their associated generated stream object.
-    if (!m_streams.contains(streamLabel))
-        return;
-
-    if (isClientAvailable())
-        pageController()->disableAudioTrack(streamLabel, index);
-}
-
-void MediaStreamFrameController::selectVideoTrack(const String& streamLabel, long index)
-{
-    // Don't assert since the audio tracks don't necessarily keep alive their associated generated stream object.
-    if (!m_streams.contains(streamLabel))
-        return;
-
     if (isClientAvailable())
-        pageController()->selectVideoTrack(streamLabel, index);
+        pageController()->setMediaStreamTrackEnabled(trackId, enabled);
 }
 
-void MediaStreamFrameController::streamGenerated(int requestId, const String& label, PassRefPtr<MultipleTrackList> audioTracksParam, PassRefPtr<ExclusiveTrackList> videoTracksParam)
+void MediaStreamFrameController::streamGenerated(int requestId, const String& label, PassRefPtr<MediaStreamTrackList> tracksParam)
 {
     // Don't assert since the request can have been aborted as a result of embedder detachment.
     if (!m_requests.contains(requestId))
@@ -345,22 +320,19 @@ void MediaStreamFrameController::streamGenerated(int requestId, const String& la
 
     ASSERT(m_requests.get(requestId)->isGenerateStreamRequest());
     ASSERT(!label.isNull());
-    ASSERT(audioTracksParam);
-    ASSERT(videoTracksParam);
+    ASSERT(tracksParam);
 
-    RefPtr<MultipleTrackList> audioTracks = audioTracksParam;
-    RefPtr<ExclusiveTrackList> videoTracks = videoTracksParam;
+    RefPtr<MediaStreamTrackList> tracks = tracksParam;
 
-    int audioTracksClientId = m_clients.getNextId();
-    audioTracks->associateFrameController(this, audioTracksClientId);
-    m_clients.add(audioTracksClientId, audioTracks.get());
-
-    int videoTracksClientId = m_clients.getNextId();
-    videoTracks->associateFrameController(this, videoTracksClientId);
-    m_clients.add(videoTracksClientId, videoTracks.get());
+    for (unsigned i = 0; i < tracks->length(); ++i) {
+        int trackClientId = m_clients.getNextId();
+        RefPtr<MediaStreamTrack> track = tracks->item(i);
+        track->associateFrameController(this, trackClientId);
+        m_clients.add(trackClientId, track.get());
+    }
 
     RefPtr<GenerateStreamRequest> streamRequest = static_cast<GenerateStreamRequest*>(m_requests.get(requestId).get());
-    RefPtr<LocalMediaStream> generatedStream = LocalMediaStream::create(this, label, audioTracks.release(), videoTracks.release());
+    RefPtr<LocalMediaStream> generatedStream = LocalMediaStream::create(this, label, tracks.release());
     m_streams.add(label, generatedStream.get());
     m_requests.remove(requestId);
     streamRequest->successCallback()->handleEvent(generatedStream.get());
@@ -388,20 +360,6 @@ void MediaStreamFrameController::streamFailed(const String& label)
     getStreamFromLabel(label)->streamEnded();
 }
 
-void MediaStreamFrameController::audioTrackFailed(const String& label, unsigned long index)
-{
-    MediaStream* stream = getStreamFromLabel(label);
-    ASSERT(stream->isLocalMediaStream());
-    static_cast<LocalMediaStream*>(stream)->audioTracks()->trackFailed(index);
-}
-
-void MediaStreamFrameController::videoTrackFailed(const String& label, unsigned long index)
-{
-    MediaStream* stream = getStreamFromLabel(label);
-    ASSERT(stream->isLocalMediaStream());
-    static_cast<LocalMediaStream*>(stream)->videoTracks()->trackFailed(index);
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(MEDIA_STREAM)
index 7502eed..b55e0d0 100644 (file)
 
 namespace WebCore {
 
-class ExclusiveTrackList;
 class Frame;
 class LocalMediaStream;
 class MediaStream;
 class MediaStreamController;
-class MultipleTrackList;
+class MediaStreamTrackList;
 class NavigatorUserMediaErrorCallback;
 class NavigatorUserMediaSuccessCallback;
 class Page;
@@ -76,7 +75,7 @@ public:
         virtual void detachEmbedder() { }
 
     protected:
-        // Used for objects that are optionally associated to the frame controller after construction, like the track lists.
+        // Used for objects that are optionally associated to the frame controller after construction, like the MediaStreamTracks.
         void associateFrameController(MediaStreamFrameController* frameController, const IdType& id)
         {
             ASSERT(!m_frameController && !m_clientId);
@@ -155,20 +154,16 @@ public:
     // Create a new generated stream asynchronously with the provided options.
     void generateStream(const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
 
-    // Stop a generated stream.
+    // Stop a local media stream.
     void stopGeneratedStream(const String& streamLabel);
 
-    // Enable/disable an audio track in a generated stream.
-    void enableAudioTrack(const String& streamLabel, unsigned long index);
-    void disableAudioTrack(const String& streamLabel, unsigned long index);
-
-    // Select a video track in a generated stream.
-    void selectVideoTrack(const String& streamLabel, long index);
+    // Enable/disable an track.
+    void setMediaStreamTrackEnabled(const String& trackId, bool enabled);
 
     // --- Calls coming back from the controller. --- //
 
     // Report the generation of a new local stream.
-    void streamGenerated(int requestId, const String& streamLabel, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
+    void streamGenerated(int requestId, const String& streamLabel, PassRefPtr<MediaStreamTrackList> tracks);
 
     // Report a failure in the generation of a new stream.
     void streamGenerationFailed(int requestId, NavigatorUserMediaError::ErrorCode);
@@ -176,10 +171,6 @@ public:
     // Report the end of a stream for external reasons.
     void streamFailed(const String& streamLabel);
 
-    // Report the unexpected unavailability of a live media track.
-    void audioTrackFailed(const String& streamLabel, unsigned long index);
-    void videoTrackFailed(const String& streamLabel, unsigned long index);
-
 private:
     class Request;
     class GenerateStreamRequest;