2011-05-24 Leandro Gracia Gil <leandrogracia@chromium.org>

        Reviewed by Tony Gentilcore.

        Media Stream API: adding Stream and GeneratedStream classes.
        https://bugs.webkit.org/show_bug.cgi?id=56666

        Add the code for the Stream and GeneratedStream classes and integrate it
        with the existing stream generation requests.

        Tests for the Media Stream API will be provided by the bug 56587.

        * 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:
        (WebCore::EventTarget::toStream):
        (WebCore::EventTarget::toGeneratedStream):
        * dom/EventTarget.h:
        * dom/GeneratedStream.cpp: Added.
        (WebCore::GeneratedStream::DispatchUpdateTask::create):
        (WebCore::GeneratedStream::DispatchUpdateTask::performTask):
        (WebCore::GeneratedStream::DispatchUpdateTask::DispatchUpdateTask):
        (WebCore::GeneratedStream::create):
        (WebCore::GeneratedStream::GeneratedStream):
        (WebCore::GeneratedStream::~GeneratedStream):
        (WebCore::GeneratedStream::toGeneratedStream):
        (WebCore::GeneratedStream::detachEmbedder):
        (WebCore::GeneratedStream::stop):
        (WebCore::GeneratedStream::onStop):
        * dom/GeneratedStream.h: Added.
        * dom/GeneratedStream.idl: Added.
        * dom/Stream.cpp: Added.
        (WebCore::Stream::create):
        (WebCore::Stream::Stream):
        (WebCore::Stream::~Stream):
        (WebCore::Stream::toStream):
        (WebCore::Stream::streamEnded):
        (WebCore::Stream::scriptExecutionContext):
        (WebCore::Stream::eventTargetData):
        (WebCore::Stream::ensureEventTargetData):
        * dom/Stream.h: Added.
        (WebCore::Stream::readyState):
        (WebCore::Stream::label):
        (WebCore::Stream::refEventTarget):
        (WebCore::Stream::derefEventTarget):
        * dom/Stream.idl: Added.
        * page/CallbackTask.h:
        (WebCore::CallbackTask1::Scheduler::~Scheduler):
        * page/MediaStreamClient.h:
        * page/MediaStreamController.cpp:
        (WebCore::MediaStreamController::stopGeneratedStream):
        (WebCore::MediaStreamController::streamFailed):
        * page/MediaStreamController.h:
        * page/MediaStreamFrameController.cpp:
        (WebCore::MediaStreamFrameController::Request::Request):
        (WebCore::MediaStreamFrameController::GenerateStreamRequest::create):
        (WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
        (WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
        (WebCore::MediaStreamFrameController::unregister):
        (WebCore::MediaStreamFrameController::getStreamFromLabel):
        (WebCore::MediaStreamFrameController::generateStream):
        (WebCore::MediaStreamFrameController::stopGeneratedStream):
        (WebCore::MediaStreamFrameController::streamGenerated):
        (WebCore::MediaStreamFrameController::streamGenerationFailed):
        (WebCore::MediaStreamFrameController::streamFailed):
        * page/MediaStreamFrameController.h:
        (WebCore::MediaStreamFrameController::StreamClient::StreamClient):
        (WebCore::MediaStreamFrameController::StreamClient::isGeneratedStream):
        * page/NavigatorUserMediaError.h:
        (WebCore::NavigatorUserMediaError::create):
        (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
        * page/NavigatorUserMediaSuccessCallback.h:
        * page/NavigatorUserMediaSuccessCallback.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eaab214b
......@@ -1940,11 +1940,15 @@ ENDIF ()
IF (ENABLE_MEDIA_STREAM)
LIST(APPEND WebCore_SOURCES
bindings/js/JSNavigatorCustom.cpp
dom/GeneratedStream.cpp
dom/Stream.cpp
page/MediaStreamController.cpp
page/MediaStreamFrameController.cpp
)
LIST(APPEND WebCore_IDL_FILES
dom/GeneratedStream.idl
dom/Stream.idl
page/NavigatorUserMediaError.idl
)
ENDIF ()
......
2011-05-24 Leandro Gracia Gil <leandrogracia@chromium.org>
Reviewed by Tony Gentilcore.
Media Stream API: adding Stream and GeneratedStream classes.
https://bugs.webkit.org/show_bug.cgi?id=56666
Add the code for the Stream and GeneratedStream classes and integrate it
with the existing stream generation requests.
Tests for the Media Stream API will be provided by the bug 56587.
* 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:
(WebCore::EventTarget::toStream):
(WebCore::EventTarget::toGeneratedStream):
* dom/EventTarget.h:
* dom/GeneratedStream.cpp: Added.
(WebCore::GeneratedStream::DispatchUpdateTask::create):
(WebCore::GeneratedStream::DispatchUpdateTask::performTask):
(WebCore::GeneratedStream::DispatchUpdateTask::DispatchUpdateTask):
(WebCore::GeneratedStream::create):
(WebCore::GeneratedStream::GeneratedStream):
(WebCore::GeneratedStream::~GeneratedStream):
(WebCore::GeneratedStream::toGeneratedStream):
(WebCore::GeneratedStream::detachEmbedder):
(WebCore::GeneratedStream::stop):
(WebCore::GeneratedStream::onStop):
* dom/GeneratedStream.h: Added.
* dom/GeneratedStream.idl: Added.
* dom/Stream.cpp: Added.
(WebCore::Stream::create):
(WebCore::Stream::Stream):
(WebCore::Stream::~Stream):
(WebCore::Stream::toStream):
(WebCore::Stream::streamEnded):
(WebCore::Stream::scriptExecutionContext):
(WebCore::Stream::eventTargetData):
(WebCore::Stream::ensureEventTargetData):
* dom/Stream.h: Added.
(WebCore::Stream::readyState):
(WebCore::Stream::label):
(WebCore::Stream::refEventTarget):
(WebCore::Stream::derefEventTarget):
* dom/Stream.idl: Added.
* page/CallbackTask.h:
(WebCore::CallbackTask1::Scheduler::~Scheduler):
* page/MediaStreamClient.h:
* page/MediaStreamController.cpp:
(WebCore::MediaStreamController::stopGeneratedStream):
(WebCore::MediaStreamController::streamFailed):
* page/MediaStreamController.h:
* page/MediaStreamFrameController.cpp:
(WebCore::MediaStreamFrameController::Request::Request):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::create):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
(WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
(WebCore::MediaStreamFrameController::unregister):
(WebCore::MediaStreamFrameController::getStreamFromLabel):
(WebCore::MediaStreamFrameController::generateStream):
(WebCore::MediaStreamFrameController::stopGeneratedStream):
(WebCore::MediaStreamFrameController::streamGenerated):
(WebCore::MediaStreamFrameController::streamGenerationFailed):
(WebCore::MediaStreamFrameController::streamFailed):
* page/MediaStreamFrameController.h:
(WebCore::MediaStreamFrameController::StreamClient::StreamClient):
(WebCore::MediaStreamFrameController::StreamClient::isGeneratedStream):
* page/NavigatorUserMediaError.h:
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* page/NavigatorUserMediaSuccessCallback.h:
* page/NavigatorUserMediaSuccessCallback.idl:
2011-05-23 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
......@@ -132,6 +132,7 @@ IDL_BINDINGS += \
dom/EventException.idl \
# dom/EventListener.idl \
# dom/EventTarget.idl \
dom/GeneratedStream.idl \
dom/HashChangeEvent.idl \
dom/KeyboardEvent.idl \
dom/MouseEvent.idl \
......@@ -152,6 +153,7 @@ IDL_BINDINGS += \
dom/ProgressEvent.idl \
dom/RangeException.idl \
dom/Range.idl \
dom/Stream.idl \
dom/StringCallback.idl \
dom/Text.idl \
dom/TextEvent.idl \
......
......@@ -129,6 +129,7 @@
#include "JSFileWriterSync.cpp"
#include "JSWebKitFlags.cpp"
#include "JSFloat32Array.cpp"
#include "JSGeneratedStream.cpp"
#include "JSGeolocation.cpp"
#include "JSGeoposition.cpp"
#include "JSHashChangeEvent.cpp"
......@@ -286,6 +287,7 @@
#include "JSStorageInfoErrorCallback.cpp"
#include "JSStorageInfoQuotaCallback.cpp"
#include "JSStorageInfoUsageCallback.cpp"
#include "JSStream.cpp"
#include "JSStringCallback.cpp"
#include "JSStyleMedia.cpp"
#include "JSStyleSheet.cpp"
......
......@@ -197,6 +197,7 @@ DOM_CLASSES = \
FileWriterSync \
FileSystemCallback \
WebKitFlags \
GeneratedStream \
Geolocation \
Geoposition \
HashChangeEvent \
......@@ -357,6 +358,7 @@ DOM_CLASSES = \
StorageInfoErrorCallback \
StorageInfoQuotaCallback \
StorageInfoUsageCallback \
Stream \
StringCallback \
SVGAElement \
SVGAltGlyphElement \
......
......@@ -174,6 +174,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSFileReaderSync.h \
DerivedSources/WebCore/JSFloat32Array.cpp \
DerivedSources/WebCore/JSFloat32Array.h \
DerivedSources/WebCore/JSGeneratedStream.cpp \
DerivedSources/WebCore/JSGeneratedStream.h \
DerivedSources/WebCore/JSGeolocation.cpp \
DerivedSources/WebCore/JSGeolocation.h \
DerivedSources/WebCore/JSGeoposition.cpp \
......@@ -449,6 +451,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSStorageInfoErrorCallback.h \
DerivedSources/WebCore/JSStorageInfoQuotaCallback.h \
DerivedSources/WebCore/JSStorageInfoUsageCallback.h \
DerivedSources/WebCore/JSStream.cpp \
DerivedSources/WebCore/JSStream.h \
DerivedSources/WebCore/JSStyleMedia.cpp \
DerivedSources/WebCore/JSStyleMedia.h \
DerivedSources/WebCore/JSStyleSheet.cpp \
......@@ -1152,6 +1156,8 @@ webcore_sources += \
Source/WebCore/dom/ExceptionCode.cpp \
Source/WebCore/dom/ExceptionCode.h \
Source/WebCore/dom/FragmentScriptingPermission.h \
Source/WebCore/dom/GeneratedStream.cpp \
Source/WebCore/dom/GeneratedStream.h \
Source/WebCore/dom/IgnoreDestructiveWriteCountIncrementer.h \
Source/WebCore/dom/IconURL.cpp \
Source/WebCore/dom/IconURL.h \
......@@ -1249,6 +1255,8 @@ webcore_sources += \
Source/WebCore/dom/StaticHashSetNodeList.h \
Source/WebCore/dom/StaticNodeList.cpp \
Source/WebCore/dom/StaticNodeList.h \
Source/WebCore/dom/Stream.cpp \
Source/WebCore/dom/Stream.h \
Source/WebCore/dom/StyledElement.cpp \
Source/WebCore/dom/StyledElement.h \
Source/WebCore/dom/StyleElement.cpp \
......
......@@ -1140,6 +1140,7 @@
'dom/EventException.idl',
'dom/EventListener.idl',
'dom/EventTarget.idl',
'dom/GeneratedStream.idl',
'dom/HashChangeEvent.idl',
'dom/KeyboardEvent.idl',
'dom/MessageChannel.idl',
......@@ -1161,6 +1162,7 @@
'dom/Range.idl',
'dom/RangeException.idl',
'dom/RequestAnimationFrameCallback.idl',
'dom/Stream.idl',
'dom/StringCallback.idl',
'dom/Text.idl',
'dom/TextEvent.idl',
......@@ -2471,6 +2473,8 @@
'dom/ExceptionBase.cpp',
'dom/ExceptionBase.h',
'dom/ExceptionCode.cpp',
'dom/GeneratedStream.cpp',
'dom/GeneratedStream.h',
'dom/HashChangeEvent.h',
'dom/IgnoreDestructiveWriteCountIncrementer.h',
'dom/IconURL.cpp',
......@@ -2553,6 +2557,8 @@
'dom/StaticHashSetNodeList.h',
'dom/StaticNodeList.cpp',
'dom/StaticNodeList.h',
'dom/Stream.cpp',
'dom/Stream.h',
'dom/StringCallback.cpp',
'dom/StringCallback.h',
'dom/StyleElement.cpp',
......
......@@ -3104,6 +3104,8 @@ contains(DEFINES, ENABLE_GEOLOCATION=1) {
contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
HEADERS += \
dom/GeneratedStream.h \
dom/Stream.h \
page/CallbackTask.h \
page/MediaStreamClient.h \
page/MediaStreamController.h \
......@@ -3113,6 +3115,8 @@ contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
page/NavigatorUserMediaSuccessCallback.h
SOURCES += \
dom/GeneratedStream.cpp \
dom/Stream.cpp \
page/MediaStreamController.cpp \
page/MediaStreamFrameController.cpp
......
......@@ -5317,6 +5317,62 @@
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSFileWriterSync.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSGeneratedStream.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\JSGeneratedStream.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSGeolocation.cpp"
>
......@@ -13421,6 +13477,62 @@
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStorageInfoUsageCallback.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStream.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\JSStream.h"
>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStringCallback.cpp"
>
......@@ -44697,6 +44809,62 @@
RelativePath="..\dom\ExceptionCode.h"
>
</File>
<File
RelativePath="..\dom\GeneratedStream.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\GeneratedStream.h"
>
</File>
<File
RelativePath="..\dom\HashChangeEvent.h"
>
......@@ -47049,6 +47217,62 @@
RelativePath="..\dom\StaticNodeList.h"
>
</File>
<File
RelativePath="..\dom\Stream.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\Stream.h"
>
</File>
<File
RelativePath="..\dom\StringCallback.cpp"
>
......@@ -4105,12 +4105,20 @@
B1E54599134629C10092A545 /* NavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E5458D134629C10092A545 /* NavigatorUserMediaError.h */; };
B1E5459B134629C10092A545 /* NavigatorUserMediaErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E5458F134629C10092A545 /* NavigatorUserMediaErrorCallback.h */; };
B1E5459D134629C10092A545 /* NavigatorUserMediaSuccessCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E54591134629C10092A545 /* NavigatorUserMediaSuccessCallback.h */; };
B1E5457A1346291F0092A545 /* GeneratedStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545711346291F0092A545 /* GeneratedStream.cpp */; };
B1E5457B1346291F0092A545 /* GeneratedStream.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545721346291F0092A545 /* GeneratedStream.h */; };
B1E5457D1346291F0092A545 /* Stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545741346291F0092A545 /* Stream.cpp */; };
B1E5457E1346291F0092A545 /* Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545751346291F0092A545 /* Stream.h */; };
B1E545DF13462B0B0092A545 /* JSNavigatorUserMediaError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545D113462B0B0092A545 /* JSNavigatorUserMediaError.cpp */; };
B1E545E013462B0B0092A545 /* JSNavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545D213462B0B0092A545 /* JSNavigatorUserMediaError.h */; };
B1E545E113462B0B0092A545 /* JSNavigatorUserMediaErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545D313462B0B0092A545 /* JSNavigatorUserMediaErrorCallback.cpp */; };
B1E545E213462B0B0092A545 /* JSNavigatorUserMediaErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545D413462B0B0092A545 /* JSNavigatorUserMediaErrorCallback.h */; };
B1E545E313462B0B0092A545 /* JSNavigatorUserMediaSuccessCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545D513462B0B0092A545 /* JSNavigatorUserMediaSuccessCallback.cpp */; };
B1E545E413462B0B0092A545 /* JSNavigatorUserMediaSuccessCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545D613462B0B0092A545 /* JSNavigatorUserMediaSuccessCallback.h */; };
B1E545DD13462B0B0092A545 /* JSGeneratedStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545CF13462B0B0092A545 /* JSGeneratedStream.cpp */; };
B1E545DE13462B0B0092A545 /* JSGeneratedStream.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545D013462B0B0092A545 /* JSGeneratedStream.h */; };
B1E545E513462B0B0092A545 /* JSStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545D713462B0B0092A545 /* JSStream.cpp */; };
B1E545E613462B0B0092A545 /* JSStream.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545D813462B0B0092A545 /* JSStream.h */; };
B20111070AB7740500DB0E68 /* JSSVGAElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */; };
B20111080AB7740500DB0E68 /* JSSVGAElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B20111060AB7740500DB0E68 /* JSSVGAElement.h */; };
B22279620D00BF220071B782 /* ColorDistance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277CB0D00BF1F0071B782 /* ColorDistance.cpp */; };
......@@ -10378,12 +10386,22 @@
B1E5458A134629C10092A545 /* MediaStreamFrameController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamFrameController.h; sourceTree = "<group>"; };
B1E5458B134629C10092A545 /* MediaStreamController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamController.cpp; sourceTree = "<group>"; };
B1E5458C134629C10092A545 /* MediaStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamController.h; sourceTree = "<group>"; };
B1E545711346291F0092A545 /* GeneratedStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratedStream.cpp; sourceTree = "<group>"; };
B1E545721346291F0092A545 /* GeneratedStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedStream.h; sourceTree = "<group>"; };
B1E545731346291F0092A545 /* GeneratedStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GeneratedStream.idl; sourceTree = "<group>"; };
B1E545741346291F0092A545 /* Stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Stream.cpp; sourceTree = "<group>"; };
B1E545751346291F0092A545 /* Stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stream.h; sourceTree = "<group>"; };
B1E545761346291F0092A545 /* Stream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Stream.idl; sourceTree = "<group>"; };
B1E5458D134629C10092A545 /* NavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaError.h; sourceTree = "<group>"; };
B1E5458E134629C10092A545 /* NavigatorUserMediaError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaError.idl; sourceTree = "<group>"; };
B1E5458F134629C10092A545 /* NavigatorUserMediaErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaErrorCallback.h; sourceTree = "<group>"; };
B1E54590134629C10092A545 /* NavigatorUserMediaErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaErrorCallback.idl; sourceTree = "<group>"; };
B1E54591134629C10092A545 /* NavigatorUserMediaSuccessCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaSuccessCallback.h; sourceTree = "<group>"; };
B1E54592134629C10092A545 /* NavigatorUserMediaSuccessCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaSuccessCallback.idl; sourceTree = "<group>"; };
B1E545CF13462B0B0092A545 /* JSGeneratedStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeneratedStream.cpp; sourceTree = "<group>"; };
B1E545D013462B0B0092A545 /* JSGeneratedStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeneratedStream.h; sourceTree = "<group>"; };
B1E545D713462B0B0092A545 /* JSStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStream.cpp; sourceTree = "<group>"; };
B1E545D813462B0B0092A545 /* JSStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStream.h; sourceTree = "<group>"; };
B1E545D113462B0B0092A545 /* JSNavigatorUserMediaError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaError.cpp; sourceTree = "<group>"; };
B1E545D213462B0B0092A545 /* JSNavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMediaError.h; sourceTree = "<group>"; };
B1E545D313462B0B0092A545 /* JSNavigatorUserMediaErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaErrorCallback.cpp; sourceTree = "<group>"; };
......@@ -16876,6 +16894,8 @@
65DF322E09D1DDBC000BE325 /* JSEntity.h */,
93F9B7720BA5FDDC00854064 /* JSEntityReference.cpp */,
93F9B7730BA5FDDC00854064 /* JSEntityReference.h */,
B1E545CF13462B0B0092A545 /* JSGeneratedStream.cpp */,
B1E545D013462B0B0092A545 /* JSGeneratedStream.h */,
FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */,
FE80DA600E9C4703000D6F75 /* JSGeolocation.h */,
FE80DA610E9C4703000D6F75 /* JSGeoposition.cpp */,
......@@ -16900,6 +16920,8 @@
75415D52129AB2D2003AD669 /* JSSpeechInputResult.h */,
75415D53129AB2D2003AD669 /* JSSpeechInputResultList.cpp */,
75415D54129AB2D2003AD669 /* JSSpeechInputResultList.h */,
B1E545D713462B0B0092A545 /* JSStream.cpp */,
B1E545D813462B0B0092A545 /* JSStream.h */,
65DF31EF09D1CC60000BE325 /* JSText.cpp */,
65DF31F009D1CC60000BE325 /* JSText.h */,
);
......@@ -19312,6 +19334,9 @@
93831B560D087D6000E5C984 /* ExceptionCode.cpp */,
935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
A853123C11D0471B00D4D077 /* FragmentScriptingPermission.h */,
B1E545711346291F0092A545 /* GeneratedStream.cpp */,
B1E545721346291F0092A545 /* GeneratedStream.h */,
B1E545731346291F0092A545 /* GeneratedStream.idl */,
2442BBF81194C9D300D49469 /* HashChangeEvent.h */,
8482B7441198C32E00BFB005 /* HashChangeEvent.idl */,
45099C401370A7800058D513 /* IconURL.cpp */,
......@@ -19431,6 +19456,9 @@
CEA3949B11D45CDA003094CF /* StaticHashSetNodeList.h */,
BC7FA62C0D1F0EFF00DB22A9 /* StaticNodeList.cpp */,
BC7FA62B0D1F0EFF00DB22A9 /* StaticNodeList.h */,
B1E545741346291F0092A545 /* Stream.cpp */,
B1E545751346291F0092A545 /* Stream.h */,
B1E545761346291F0092A545 /* Stream.idl */,
8102C5871325BB1100DDE67A /* StringCallback.cpp */,
81AC6C35131C57D30009A7E0 /* StringCallback.h */,
81AC6C34131C57C20009A7E0 /* StringCallback.idl */,
......@@ -22839,6 +22867,10 @@
FD537353137B651800008DCE /* ZeroPole.h in Headers */,
598365DD1355F557001B185D /* JSPositionCallback.h in Headers */,
598365DF1355F562001B185D /* JSPositionErrorCallback.h in Headers */,
B1E5457B1346291F0092A545 /* GeneratedStream.h in Headers */,
B1E5457E1346291F0092A545 /* Stream.h in Headers */,
B1E545DE13462B0B0092A545 /* JSGeneratedStream.h in Headers */,
B1E545E613462B0B0092A545 /* JSStream.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -25514,6 +25546,10 @@
FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
598365E41355F604001B185D /* JSPositionCallback.cpp in Sources */,
598365E61355F60D001B185D /* JSPositionErrorCallback.cpp in Sources */,
B1E5457A1346291F0092A545 /* GeneratedStream.cpp in Sources */,
B1E5457D1346291F0092A545 /* Stream.cpp in Sources */,
B1E545DD13462B0B0092A545 /* JSGeneratedStream.cpp in Sources */,
B1E545E513462B0B0092A545 /* JSStream.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -100,6 +100,11 @@
#include "FileReader.h"
#endif
#if ENABLE(MEDIA_STREAM)
#include "GeneratedStream.h"
#include "Stream.h"
#endif
using namespace JSC;
namespace WebCore {
......@@ -189,6 +194,14 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
return toJS(exec, globalObject, fileReader);
#endif
#if ENABLE(MEDIA_STREAM)
if (GeneratedStream* generatedStream = target->toGeneratedStream())
return toJS(exec, globalObject, generatedStream);
if (Stream* stream = target->toStream())
return toJS(exec, globalObject, stream);
#endif
ASSERT_NOT_REACHED();
return jsNull();
}
......
......@@ -48,6 +48,7 @@
#include "V8EventSource.h"
#include "V8FileReader.h"
#include "V8FileWriter.h"
#include "V8GeneratedStream.h"
#include "V8HTMLCollection.h"
#include "V8HTMLDocument.h"
#include "V8IDBDatabase.h"
......@@ -64,6 +65,7 @@
#include "V8Proxy.h"
#include "V8SharedWorker.h"
#include "V8SharedWorkerContext.h"
#include "V8Stream.h"
#include "V8StyleSheet.h"
#include "V8WebSocket.h"
#include "V8Worker.h"
......@@ -448,6 +450,14 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventTargetToV8Object(EventTarget* ta
return toV8(audioContext);
#endif
#if ENABLE(MEDIA_STREAM)
if (GeneratedStream* generatedStream = target->toGeneratedStream())
return toV8(generatedStream);
if (Stream* stream = target->toStream())
return toV8(stream);
#endif
ASSERT(0);