2011-06-23 Tommy Widenflycht <tommyw@google.com>

        Reviewed by Tony Gentilcore.

        MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec
        https://bugs.webkit.org/show_bug.cgi?id=63122

        No new tests since no code has actually changed.

        * 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::toMediaStream):
        (WebCore::EventTarget::toLocalMediaStream):
        * dom/EventTarget.h:
        * dom/LocalMediaStream.cpp: Renamed from Source/WebCore/dom/GeneratedStream.cpp.
        (WebCore::LocalMediaStream::DispatchUpdateTask::create):
        (WebCore::LocalMediaStream::DispatchUpdateTask::performTask):
        (WebCore::LocalMediaStream::DispatchUpdateTask::DispatchUpdateTask):
        (WebCore::LocalMediaStream::create):
        (WebCore::LocalMediaStream::LocalMediaStream):
        (WebCore::LocalMediaStream::~LocalMediaStream):
        (WebCore::LocalMediaStream::toLocalMediaStream):
        (WebCore::LocalMediaStream::detachEmbedder):
        (WebCore::LocalMediaStream::streamEnded):
        (WebCore::LocalMediaStream::audioTracks):
        (WebCore::LocalMediaStream::videoTracks):
        (WebCore::LocalMediaStream::stop):
        (WebCore::LocalMediaStream::onStop):
        * dom/LocalMediaStream.h: Renamed from Source/WebCore/dom/GeneratedStream.h.
        * dom/LocalMediaStream.idl: Renamed from Source/WebCore/dom/GeneratedStream.idl.
        * dom/MediaStream.cpp: Renamed from Source/WebCore/dom/Stream.cpp.
        (WebCore::MediaStream::create):
        (WebCore::MediaStream::MediaStream):
        (WebCore::MediaStream::~MediaStream):
        (WebCore::MediaStream::toMediaStream):
        (WebCore::MediaStream::streamEnded):
        (WebCore::MediaStream::scriptExecutionContext):
        (WebCore::MediaStream::eventTargetData):
        (WebCore::MediaStream::ensureEventTargetData):
        * dom/MediaStream.h: Renamed from Source/WebCore/dom/Stream.h.
        (WebCore::MediaStream::readyState):
        (WebCore::MediaStream::label):
        (WebCore::MediaStream::refEventTarget):
        (WebCore::MediaStream::derefEventTarget):
        * dom/MediaStream.idl: Renamed from Source/WebCore/dom/Stream.idl.
        * dom/MediaStreamContainer.h: Renamed from Source/WebCore/dom/StreamContainer.h.
        (WebCore::MediaStreamContainer::create):
        (WebCore::MediaStreamContainer::~MediaStreamContainer):
        (WebCore::MediaStreamContainer::length):
        (WebCore::MediaStreamContainer::item):
        (WebCore::MediaStreamContainer::add):
        (WebCore::MediaStreamContainer::remove):
        (WebCore::MediaStreamContainer::contains):
        (WebCore::MediaStreamContainer::get):
        (WebCore::MediaStreamContainer::MediaStreamContainer):
        * dom/MediaStreamList.cpp: Renamed from Source/WebCore/dom/StreamList.cpp.
        (WebCore::MediaStreamList::create):
        (WebCore::MediaStreamList::MediaStreamList):
        (WebCore::MediaStreamList::~MediaStreamList):
        (WebCore::MediaStreamList::length):
        (WebCore::MediaStreamList::item):
        * dom/MediaStreamList.h: Renamed from Source/WebCore/dom/StreamList.h.
        * dom/MediaStreamList.idl: Renamed from Source/WebCore/dom/StreamList.idl.
        * dom/StreamEvent.cpp:
        (WebCore::StreamEvent::create):
        (WebCore::StreamEvent::StreamEvent):
        (WebCore::StreamEvent::initStreamEvent):
        (WebCore::StreamEvent::stream):
        * dom/StreamEvent.h:
        (WebCore::StreamEvent::isMediaStreamEvent):
        * dom/StreamEvent.idl:
        * page/MediaStreamFrameController.cpp:
        (WebCore::MediaStreamFrameController::unregister):
        (WebCore::MediaStreamFrameController::getStreamFromLabel):
        (WebCore::MediaStreamFrameController::stopGeneratedStream):
        (WebCore::MediaStreamFrameController::streamGenerated):
        (WebCore::MediaStreamFrameController::audioTrackFailed):
        (WebCore::MediaStreamFrameController::videoTrackFailed):
        * page/MediaStreamFrameController.h:
        (WebCore::MediaStreamFrameController::ClientBase::isMediaStream):
        (WebCore::MediaStreamFrameController::ClientBase::isLocalMediaStream):
        (WebCore::MediaStreamFrameController::MediaStreamClient::MediaStreamClient):
        (WebCore::MediaStreamFrameController::MediaStreamClient::~MediaStreamClient):
        (WebCore::MediaStreamFrameController::MediaStreamClient::isMediaStream):
        (WebCore::MediaStreamFrameController::MediaStreamClient::isLocalMediaStream):
        * page/NavigatorUserMediaSuccessCallback.h:
        * page/NavigatorUserMediaSuccessCallback.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1582670e
......@@ -1994,10 +1994,10 @@ ENDIF ()
IF (ENABLE_MEDIA_STREAM)
LIST(APPEND WebCore_SOURCES
bindings/js/JSNavigatorCustom.cpp
dom/GeneratedStream.cpp
dom/Stream.cpp
dom/LocalMediaStream.cpp
dom/MediaStream.cpp
dom/MediaStreamList.cpp
dom/StreamEvent.cpp
dom/StreamList.cpp
page/MediaStreamController.cpp
page/MediaStreamFrameController.cpp
)
......
2011-06-23 Tommy Widenflycht <tommyw@google.com>
Reviewed by Tony Gentilcore.
MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=63122
No new tests since no code has actually changed.
* 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::toMediaStream):
(WebCore::EventTarget::toLocalMediaStream):
* dom/EventTarget.h:
* dom/LocalMediaStream.cpp: Renamed from Source/WebCore/dom/GeneratedStream.cpp.
(WebCore::LocalMediaStream::DispatchUpdateTask::create):
(WebCore::LocalMediaStream::DispatchUpdateTask::performTask):
(WebCore::LocalMediaStream::DispatchUpdateTask::DispatchUpdateTask):
(WebCore::LocalMediaStream::create):
(WebCore::LocalMediaStream::LocalMediaStream):
(WebCore::LocalMediaStream::~LocalMediaStream):
(WebCore::LocalMediaStream::toLocalMediaStream):
(WebCore::LocalMediaStream::detachEmbedder):
(WebCore::LocalMediaStream::streamEnded):
(WebCore::LocalMediaStream::audioTracks):
(WebCore::LocalMediaStream::videoTracks):
(WebCore::LocalMediaStream::stop):
(WebCore::LocalMediaStream::onStop):
* dom/LocalMediaStream.h: Renamed from Source/WebCore/dom/GeneratedStream.h.
* dom/LocalMediaStream.idl: Renamed from Source/WebCore/dom/GeneratedStream.idl.
* dom/MediaStream.cpp: Renamed from Source/WebCore/dom/Stream.cpp.
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::toMediaStream):
(WebCore::MediaStream::streamEnded):
(WebCore::MediaStream::scriptExecutionContext):
(WebCore::MediaStream::eventTargetData):
(WebCore::MediaStream::ensureEventTargetData):
* dom/MediaStream.h: Renamed from Source/WebCore/dom/Stream.h.
(WebCore::MediaStream::readyState):
(WebCore::MediaStream::label):
(WebCore::MediaStream::refEventTarget):
(WebCore::MediaStream::derefEventTarget):
* dom/MediaStream.idl: Renamed from Source/WebCore/dom/Stream.idl.
* dom/MediaStreamContainer.h: Renamed from Source/WebCore/dom/StreamContainer.h.
(WebCore::MediaStreamContainer::create):
(WebCore::MediaStreamContainer::~MediaStreamContainer):
(WebCore::MediaStreamContainer::length):
(WebCore::MediaStreamContainer::item):
(WebCore::MediaStreamContainer::add):
(WebCore::MediaStreamContainer::remove):
(WebCore::MediaStreamContainer::contains):
(WebCore::MediaStreamContainer::get):
(WebCore::MediaStreamContainer::MediaStreamContainer):
* dom/MediaStreamList.cpp: Renamed from Source/WebCore/dom/StreamList.cpp.
(WebCore::MediaStreamList::create):
(WebCore::MediaStreamList::MediaStreamList):
(WebCore::MediaStreamList::~MediaStreamList):
(WebCore::MediaStreamList::length):
(WebCore::MediaStreamList::item):
* dom/MediaStreamList.h: Renamed from Source/WebCore/dom/StreamList.h.
* dom/MediaStreamList.idl: Renamed from Source/WebCore/dom/StreamList.idl.
* dom/StreamEvent.cpp:
(WebCore::StreamEvent::create):
(WebCore::StreamEvent::StreamEvent):
(WebCore::StreamEvent::initStreamEvent):
(WebCore::StreamEvent::stream):
* dom/StreamEvent.h:
(WebCore::StreamEvent::isMediaStreamEvent):
* dom/StreamEvent.idl:
* page/MediaStreamFrameController.cpp:
(WebCore::MediaStreamFrameController::unregister):
(WebCore::MediaStreamFrameController::getStreamFromLabel):
(WebCore::MediaStreamFrameController::stopGeneratedStream):
(WebCore::MediaStreamFrameController::streamGenerated):
(WebCore::MediaStreamFrameController::audioTrackFailed):
(WebCore::MediaStreamFrameController::videoTrackFailed):
* page/MediaStreamFrameController.h:
(WebCore::MediaStreamFrameController::ClientBase::isMediaStream):
(WebCore::MediaStreamFrameController::ClientBase::isLocalMediaStream):
(WebCore::MediaStreamFrameController::MediaStreamClient::MediaStreamClient):
(WebCore::MediaStreamFrameController::MediaStreamClient::~MediaStreamClient):
(WebCore::MediaStreamFrameController::MediaStreamClient::isMediaStream):
(WebCore::MediaStreamFrameController::MediaStreamClient::isLocalMediaStream):
* page/NavigatorUserMediaSuccessCallback.h:
* page/NavigatorUserMediaSuccessCallback.idl:
2011-06-23 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Yury Semikhatsky.
......
......@@ -140,9 +140,11 @@ IDL_BINDINGS += \
# dom/EventListener.idl \
# dom/EventTarget.idl \
dom/ExclusiveTrackList.idl \
dom/GeneratedStream.idl \
dom/HashChangeEvent.idl \
dom/KeyboardEvent.idl \
dom/LocalMediaStream.idl \
dom/MediaStream.idl \
dom/MediaStreamList.idl \
dom/MouseEvent.idl \
dom/MessageChannel.idl \
dom/MessageEvent.idl \
......@@ -162,9 +164,7 @@ IDL_BINDINGS += \
dom/ProgressEvent.idl \
dom/RangeException.idl \
dom/Range.idl \
dom/Stream.idl \
dom/StreamEvent.idl \
dom/StreamList.idl \
dom/StringCallback.idl \
dom/Text.idl \
dom/TextEvent.idl \
......
......@@ -131,7 +131,6 @@
#include "JSWebKitFlags.cpp"
#include "JSFloat32Array.cpp"
#include "JSFloat64Array.cpp"
#include "JSGeneratedStream.cpp"
#include "JSGeolocation.cpp"
#include "JSGeoposition.cpp"
#include "JSHashChangeEvent.cpp"
......@@ -228,9 +227,12 @@
#include "JSInt8Array.cpp"
#include "JSJavaScriptCallFrame.cpp"
#include "JSKeyboardEvent.cpp"
#include "JSLocalMediaStream.cpp"
#include "JSLocation.cpp"
#include "JSMediaError.cpp"
#include "JSMediaList.cpp"
#include "JSMediaStream.cpp"
#include "JSMediaStreamList.cpp"
#include "JSMediaQueryList.cpp"
#include "JSMemoryInfo.cpp"
#include "JSMessageChannel.cpp"
......@@ -291,9 +293,7 @@
#include "JSStorageInfoErrorCallback.cpp"
#include "JSStorageInfoQuotaCallback.cpp"
#include "JSStorageInfoUsageCallback.cpp"
#include "JSStream.cpp"
#include "JSStreamEvent.cpp"
#include "JSStreamList.cpp"
#include "JSStringCallback.cpp"
#include "JSStyleMedia.cpp"
#include "JSStyleSheet.cpp"
......
......@@ -202,7 +202,6 @@ DOM_CLASSES = \
FileWriterSync \
FileSystemCallback \
WebKitFlags \
GeneratedStream \
Geolocation \
Geoposition \
HashChangeEvent \
......@@ -296,11 +295,14 @@ DOM_CLASSES = \
InspectorFrontendHost \
Internals \
KeyboardEvent \
LocalMediaStream \
Location \
MediaError \
MediaList \
MediaQueryList \
MediaQueryListListener \
MediaStream \
MediaStreamList \
MemoryInfo \
MessageChannel \
MessageEvent \
......@@ -366,9 +368,7 @@ DOM_CLASSES = \
StorageInfoErrorCallback \
StorageInfoQuotaCallback \
StorageInfoUsageCallback \
Stream \
StreamEvent \
StreamList \
StringCallback \
SVGAElement \
SVGAltGlyphElement \
......
......@@ -178,8 +178,6 @@ webcore_built_sources += \
DerivedSources/WebCore/JSFloat32Array.h \
DerivedSources/WebCore/JSFloat64Array.cpp \
DerivedSources/WebCore/JSFloat64Array.h \
DerivedSources/WebCore/JSGeneratedStream.cpp \
DerivedSources/WebCore/JSGeneratedStream.h \
DerivedSources/WebCore/JSGeolocation.cpp \
DerivedSources/WebCore/JSGeolocation.h \
DerivedSources/WebCore/JSGeoposition.cpp \
......@@ -349,6 +347,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSJavaScriptCallFrame.h \
DerivedSources/WebCore/JSKeyboardEvent.cpp \
DerivedSources/WebCore/JSKeyboardEvent.h \
DerivedSources/WebCore/JSLocalMediaStream.cpp \
DerivedSources/WebCore/JSLocalMediaStream.h \
DerivedSources/WebCore/JSLocation.cpp \
DerivedSources/WebCore/JSLocation.h \
DerivedSources/WebCore/JSMediaError.cpp \
......@@ -1175,15 +1175,20 @@ webcore_sources += \
Source/WebCore/dom/ExclusiveTrackList.cpp \
Source/WebCore/dom/ExclusiveTrackList.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 \
Source/WebCore/dom/HashChangeEvent.h \
Source/WebCore/dom/KeyboardEvent.cpp \
Source/WebCore/dom/KeyboardEvent.h \
Source/WebCore/dom/LocalMediaStream.cpp \
Source/WebCore/dom/LocalMediaStream.h \
Source/WebCore/dom/MappedAttributeEntry.h \
Source/WebCore/dom/MediaStream.cpp \
Source/WebCore/dom/MediaStream.h \
Source/WebCore/dom/MediaStreamContainer.h \
Source/WebCore/dom/MediaStreamList.cpp \
Source/WebCore/dom/MediaStreamList.h \
Source/WebCore/dom/MessageChannel.cpp \
Source/WebCore/dom/MessageChannel.h \
Source/WebCore/dom/MessageEvent.cpp \
......@@ -1276,13 +1281,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/StreamContainer.h \
Source/WebCore/dom/StreamEvent.cpp \
Source/WebCore/dom/StreamEvent.h \
Source/WebCore/dom/StreamList.cpp \
Source/WebCore/dom/StreamList.h \
Source/WebCore/dom/StyledElement.cpp \
Source/WebCore/dom/StyledElement.h \
Source/WebCore/dom/StyleElement.cpp \
......
......@@ -1153,9 +1153,11 @@
'dom/EventListener.idl',
'dom/EventTarget.idl',
'dom/ExclusiveTrackList.idl',
'dom/GeneratedStream.idl',
'dom/HashChangeEvent.idl',
'dom/KeyboardEvent.idl',
'dom/LocalMediaStream.idl',
'dom/MediaStream.idl',
'dom/MediaStreamList.idl',
'dom/MessageChannel.idl',
'dom/MessageEvent.idl',
'dom/MessagePort.idl',
......@@ -1176,9 +1178,7 @@
'dom/Range.idl',
'dom/RangeException.idl',
'dom/RequestAnimationFrameCallback.idl',
'dom/Stream.idl',
'dom/StreamEvent.idl',
'dom/StreamList.idl',
'dom/StringCallback.idl',
'dom/Text.idl',
'dom/TextEvent.idl',
......@@ -2498,13 +2498,18 @@
'dom/ExceptionCode.cpp',
'dom/ExclusiveTrackList.cpp',
'dom/ExclusiveTrackList.h',
'dom/GeneratedStream.cpp',
'dom/GeneratedStream.h',
'dom/HashChangeEvent.h',
'dom/IgnoreDestructiveWriteCountIncrementer.h',
'dom/IconURL.cpp',
'dom/IconURL.h',
'dom/KeyboardEvent.cpp',
'dom/LocalMediaStream.cpp',
'dom/LocalMediaStream.h',
'dom/MediaStream.cpp',
'dom/MediaStream.h',
'dom/MediaStreamContainer.h',
'dom/MediaStreamList.cpp',
'dom/MediaStreamList.h',
'dom/MessageChannel.cpp',
'dom/MessageChannel.h',
'dom/MessageEvent.cpp',
......@@ -2584,13 +2589,8 @@
'dom/StaticHashSetNodeList.h',
'dom/StaticNodeList.cpp',
'dom/StaticNodeList.h',
'dom/Stream.cpp',
'dom/Stream.h',
'dom/StreamContainer.h',
'dom/StreamEvent.cpp',
'dom/StreamEvent.h',
'dom/StreamList.cpp',
'dom/StreamList.h',
'dom/StringCallback.cpp',
'dom/StringCallback.h',
'dom/StyleElement.cpp',
......
......@@ -3204,11 +3204,11 @@ contains(DEFINES, ENABLE_GEOLOCATION=1) {
contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
HEADERS += \
dom/GeneratedStream.h \
dom/Stream.h \
dom/StreamContainer.h \
dom/LocalMediaStream.h \
dom/MediaStream.h \
dom/MediaStreamContainer.h \
dom/MediaStreamList.h \
dom/StreamEvent.h \
dom/StreamList.h \
page/CallbackTask.h \
page/MediaStreamClient.h \
page/MediaStreamController.h \
......@@ -3218,10 +3218,10 @@ contains(DEFINES, ENABLE_MEDIA_STREAM=1) {
page/NavigatorUserMediaSuccessCallback.h
SOURCES += \
dom/GeneratedStream.cpp \
dom/Stream.cpp \
dom/LocalMediaStream.cpp \
dom/MediaStream.cpp \
dom/MediaStreamList.cpp \
dom/StreamEvent.cpp \
dom/StreamList.cpp \
page/MediaStreamController.cpp \
page/MediaStreamFrameController.cpp
......
......@@ -101,8 +101,8 @@
#endif
#if ENABLE(MEDIA_STREAM)
#include "GeneratedStream.h"
#include "Stream.h"
#include "LocalMediaStream.h"
#include "MediaStream.h"
#endif
#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
......@@ -201,10 +201,10 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
#endif
#if ENABLE(MEDIA_STREAM)
if (GeneratedStream* generatedStream = target->toGeneratedStream())
return toJS(exec, globalObject, generatedStream);
if (LocalMediaStream* stream = target->toLocalMediaStream())
return toJS(exec, globalObject, stream);
if (Stream* stream = target->toStream())
if (MediaStream* stream = target->toMediaStream())
return toJS(exec, globalObject, stream);
#endif
......
......@@ -49,14 +49,15 @@
#include "V8ExclusiveTrackList.h"
#include "V8FileReader.h"
#include "V8FileWriter.h"
#include "V8GeneratedStream.h"
#include "V8HTMLCollection.h"
#include "V8HTMLDocument.h"
#include "V8IDBDatabase.h"
#include "V8IDBRequest.h"
#include "V8IDBTransaction.h"
#include "V8IsolatedContext.h"
#include "V8LocalMediaStream.h"
#include "V8Location.h"
#include "V8MediaStream.h"
#include "V8MessageChannel.h"
#include "V8MultipleTrackList.h"
#include "V8NamedNodeMap.h"
......@@ -67,7 +68,6 @@
#include "V8Proxy.h"
#include "V8SharedWorker.h"
#include "V8SharedWorkerContext.h"
#include "V8Stream.h"
#include "V8StyleSheet.h"
#include "V8TrackList.h"
#include "V8WebSocket.h"
......@@ -456,10 +456,10 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventTargetToV8Object(EventTarget* ta
#endif
#if ENABLE(MEDIA_STREAM)
if (GeneratedStream* generatedStream = target->toGeneratedStream())
return toV8(generatedStream);
if (LocalMediaStream* stream = target->toLocalMediaStream())
return toV8(stream);
if (Stream* stream = target->toStream())
if (MediaStream* stream = target->toMediaStream())
return toV8(stream);
#endif
......
......@@ -76,9 +76,10 @@
#include "ExceptionBase.cpp"
#include "ExceptionCode.cpp"
#include "ExclusiveTrackList.cpp"
#include "GeneratedStream.cpp"
#include "IconURL.cpp"
#include "KeyboardEvent.cpp"
#include "LocalMediaStream.cpp"
#include "MediaStream.cpp"
#include "MessageChannel.cpp"
#include "MessageEvent.cpp"
#include "MessagePort.cpp"
......@@ -118,7 +119,6 @@
#include "SpaceSplitString.cpp"
#include "StaticHashSetNodeList.cpp"
#include "StaticNodeList.cpp"
#include "Stream.cpp"
#include "StreamEvent.cpp"
#include "StyleElement.cpp"
#include "StyledElement.cpp"
......
......@@ -206,12 +206,12 @@ IDBVersionChangeRequest* EventTarget::toIDBVersionChangeRequest()
#endif
#if ENABLE(MEDIA_STREAM)
Stream* EventTarget::toStream()
MediaStream* EventTarget::toMediaStream()
{
return 0;
}
GeneratedStream* EventTarget::toGeneratedStream()
LocalMediaStream* EventTarget::toLocalMediaStream()
{
return 0;
}
......
......@@ -50,12 +50,13 @@ namespace WebCore {
class ExclusiveTrackList;
class FileReader;
class FileWriter;
class GeneratedStream;
class IDBDatabase;
class IDBRequest;
class IDBTransaction;
class IDBVersionChangeRequest;
class JavaScriptAudioNode;
class LocalMediaStream;
class MediaStream;
class MessagePort;
class MultipleTrackList;
class Node;
......@@ -64,7 +65,6 @@ namespace WebCore {
class ScriptExecutionContext;
class SharedWorker;
class SharedWorkerContext;
class Stream;
class TrackList;
class WebSocket;
class Worker;
......@@ -153,8 +153,8 @@ namespace WebCore {
#endif
#if ENABLE(MEDIA_STREAM)
virtual Stream* toStream();
virtual GeneratedStream* toGeneratedStream();
virtual MediaStream* toMediaStream();
virtual LocalMediaStream* toLocalMediaStream();
#endif
#if ENABLE(MEDIA_STREAM) || ENABLE(VIDEO_TRACK)
......
......@@ -23,7 +23,7 @@
*/
#include "config.h"
#include "GeneratedStream.h"
#include "LocalMediaStream.h"
#if ENABLE(MEDIA_STREAM)
......@@ -36,11 +36,11 @@
namespace WebCore {
class GeneratedStream::DispatchUpdateTask : public ScriptExecutionContext::Task {
class LocalMediaStream::DispatchUpdateTask : public ScriptExecutionContext::Task {
public:
typedef void (GeneratedStream::*Callback)();
typedef void (LocalMediaStream::*Callback)();
static PassOwnPtr<DispatchUpdateTask> create(PassRefPtr<GeneratedStream> object, Callback callback)
static PassOwnPtr<DispatchUpdateTask> create(PassRefPtr<LocalMediaStream> object, Callback callback)
{
return adoptPtr(new DispatchUpdateTask(object, callback));
}
......@@ -51,21 +51,21 @@ public:
}
public:
DispatchUpdateTask(PassRefPtr<GeneratedStream> object, Callback callback)
DispatchUpdateTask(PassRefPtr<LocalMediaStream> object, Callback callback)
: m_object(object)
, m_callback(callback) { }
RefPtr<GeneratedStream> m_object;
RefPtr<LocalMediaStream> m_object;
Callback m_callback;
};
PassRefPtr<GeneratedStream> GeneratedStream::create(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
PassRefPtr<LocalMediaStream> LocalMediaStream::create(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
{
return adoptRef(new GeneratedStream(frameController, label, audioTracks, videoTracks));
return adoptRef(new LocalMediaStream(frameController, label, audioTracks, videoTracks));
}
GeneratedStream::GeneratedStream(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
: Stream(frameController, label, true)
LocalMediaStream::LocalMediaStream(MediaStreamFrameController* frameController, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks)
: MediaStream(frameController, label, true)
, m_audioTracks(audioTracks)
, m_videoTracks(videoTracks)
{
......@@ -75,42 +75,42 @@ GeneratedStream::GeneratedStream(MediaStreamFrameController* frameController, co
m_videoTracks->associateStream(label);
}
GeneratedStream::~GeneratedStream()
LocalMediaStream::~LocalMediaStream()
{
}
GeneratedStream* GeneratedStream::toGeneratedStream()
LocalMediaStream* LocalMediaStream::toLocalMediaStream()
{
return this;
}
void GeneratedStream::detachEmbedder()
void LocalMediaStream::detachEmbedder()
{
// Assuming we should stop any live streams when losing access to the embedder.
stop();
Stream::detachEmbedder();
MediaStream::detachEmbedder();
}
void GeneratedStream::streamEnded()
void LocalMediaStream::streamEnded()
{
m_audioTracks->clear();
m_videoTracks->clear();
Stream::streamEnded();
MediaStream::streamEnded();
}
PassRefPtr<MultipleTrackList> GeneratedStream::audioTracks() const
PassRefPtr<MultipleTrackList> LocalMediaStream::audioTracks() const
{
return m_audioTracks;
}
PassRefPtr<ExclusiveTrackList> GeneratedStream::videoTracks() const
PassRefPtr<ExclusiveTrackList> LocalMediaStream::videoTracks() const
{
return m_videoTracks;
}
void GeneratedStream::stop()
void LocalMediaStream::stop()
{
if (!mediaStreamFrameController() || m_readyState == ENDED)
return;
......@@ -126,10 +126,10 @@ void GeneratedStream::stop()
return;
ASSERT(scriptExecutionContext()->isContextThread());
scriptExecutionContext()->postTask(DispatchUpdateTask::create(this, &GeneratedStream::onStop));
scriptExecutionContext()->postTask(DispatchUpdateTask::create(this, &LocalMediaStream::onStop));
}
void GeneratedStream::onStop()
void LocalMediaStream::onStop()
{
dispatchEvent(Event::create(eventNames().endedEvent, false, false));
}
......
......@@ -22,12 +22,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GeneratedStream_h
#define GeneratedStream_h
#ifndef LocalMediaStream_h
#define LocalMediaStream_h
#if ENABLE(MEDIA_STREAM)
#include "Stream.h"
#include "MediaStream.h"
#include <wtf/Forward.h>
namespace WebCore {
......@@ -35,10 +35,10 @@ namespace WebCore {
class ExclusiveTrackList;
class MultipleTrackList;
class GeneratedStream : public Stream {
class LocalMediaStream : public MediaStream {
public:
static PassRefPtr<GeneratedStream> create(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
virtual ~GeneratedStream();
static PassRefPtr<LocalMediaStream> create(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
virtual ~LocalMediaStream();
void stop();
......@@ -50,10 +50,10 @@ public:
virtual void streamEnded();
// EventTarget.
virtual GeneratedStream* toGeneratedStream();
virtual LocalMediaStream* toLocalMediaStream();
private:
GeneratedStream(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
LocalMediaStream(MediaStreamFrameController*, const String& label, PassRefPtr<MultipleTrackList> audioTracks, PassRefPtr<ExclusiveTrackList> videoTracks);
class DispatchUpdateTask;
friend class DispatchUpdateTask;
......@@ -67,4 +67,4 @@ private: