Commit c6373300 authored by annacc@chromium.org's avatar annacc@chromium.org

Create SourceBuffer and SourceBufferList objects

https://bugs.webkit.org/show_bug.cgi?id=91771

Reviewed by Eric Carlson.

SourceBuffer and SourceBufferList objects are needed in order to
implement the new object-oriented MediaSource API:
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html

No new tests - will be able to test after landing BUGWK91775

Adding new files to build files:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/WebCoreCommon.vsprops:
* WebCore.vcproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:

New objects:
* Modules/mediasource/SourceBuffer.cpp: Added.
* Modules/mediasource/SourceBuffer.h: Added.
* Modules/mediasource/SourceBuffer.idl: Added.
* Modules/mediasource/SourceBufferList.cpp: Added.
* Modules/mediasource/SourceBufferList.h: Added.
* Modules/mediasource/SourceBufferList.idl: Added.

New events:
* dom/EventNames.h:
(WebCore):
* dom/EventTarget.h:
(WebCore):
* dom/EventTargetFactory.in:

Object constructors:
* page/DOMWindow.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ccc87d87
......@@ -2636,6 +2636,20 @@ SET(WebCoreTestSupport_SOURCES
testing/InternalSettings.cpp
)
IF (ENABLE_MEDIA_SOURCE)
LIST(APPEND WebCore_INCLUDE_DIRECTORIES
${WEBCORE_DIR}/Modules/mediasource
)
LIST(APPEND WebCore_IDL_FILES
Modules/mediasource/SourceBuffer.idl
Modules/mediasource/SourceBufferList.idl
)
LIST(APPEND WebCore_SOURCES
Modules/mediasource/SourceBuffer.cpp
Modules/mediasource/SourceBufferList.cpp
)
ENDIF()
# Modules that the bindings generator scripts may use
SET(SCRIPTS_RESOLVE_SUPPLEMENTAL
${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
......
2012-07-24 Anna Cavender <annacc@chromium.org>
Create SourceBuffer and SourceBufferList objects
https://bugs.webkit.org/show_bug.cgi?id=91771
Reviewed by Eric Carlson.
SourceBuffer and SourceBufferList objects are needed in order to
implement the new object-oriented MediaSource API:
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
No new tests - will be able to test after landing BUGWK91775
Adding new files to build files:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/WebCoreCommon.vsprops:
* WebCore.vcproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
New objects:
* Modules/mediasource/SourceBuffer.cpp: Added.
* Modules/mediasource/SourceBuffer.h: Added.
* Modules/mediasource/SourceBuffer.idl: Added.
* Modules/mediasource/SourceBufferList.cpp: Added.
* Modules/mediasource/SourceBufferList.h: Added.
* Modules/mediasource/SourceBufferList.idl: Added.
New events:
* dom/EventNames.h:
(WebCore):
* dom/EventTarget.h:
(WebCore):
* dom/EventTargetFactory.in:
Object constructors:
* page/DOMWindow.idl:
2012-07-24 Patrick Gansterer <paroga@webkit.org>
Store the full year in GregorianDateTime
......@@ -280,6 +280,10 @@
#include "JSShadowRoot.cpp"
#include "JSSharedWorker.cpp"
#include "JSSharedWorkerContext.cpp"
#if ENABLE(MEDIA_SOURCE)
#include "JSSourceBuffer.cpp"
#include "JSSourceBufferList.cpp"
#endif
#include "JSSQLError.cpp"
#include "JSSQLException.cpp"
#include "JSSQLResultSet.cpp"
......
......@@ -31,6 +31,7 @@ VPATH = \
$(WebCore)/Modules/filesystem \
$(WebCore)/Modules/geolocation \
$(WebCore)/Modules/indexeddb \
$(WebCore)/Modules/mediasource \
$(WebCore)/Modules/notifications \
$(WebCore)/Modules/quota \
$(WebCore)/Modules/webaudio \
......@@ -105,6 +106,8 @@ BINDING_IDLS = \
$(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
$(WebCore)/Modules/indexeddb/IDBVersionChangeRequest.idl \
$(WebCore)/Modules/indexeddb/WorkerContextIndexedDatabase.idl \
$(WebCore)/Modules/mediasource/SourceBuffer.idl \
$(WebCore)/Modules/mediasource/SourceBufferList.idl \
$(WebCore)/Modules/notifications/DOMWindowNotifications.idl \
$(WebCore)/Modules/notifications/Notification.idl \
$(WebCore)/Modules/notifications/NotificationCenter.idl \
......@@ -946,6 +949,7 @@ IDL_INCLUDES = \
$(WebCore)/fileapi \
$(WebCore)/html \
$(WebCore)/css \
$(WebCore)/Modules/mediasource \
$(WebCore)/Modules/notifications \
$(WebCore)/page \
$(WebCore)/xml \
......
......@@ -620,6 +620,12 @@ contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
$$PWD/html/track/TrackEvent.idl \
}
contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
IDL_BINDINGS += \
$$PWD/Modules/mediasource/SourceBuffer.idl \
$$PWD/Modules/mediasource/SourceBufferList.idl
}
mathmlnames.output = MathMLNames.cpp
mathmlnames.input = MATHML_NAMES
mathmlnames.depends = $$PWD/mathml/mathattrs.in
......
......@@ -15,6 +15,7 @@ webcore_cppflags += \
-I$(srcdir)/Source/WebCore/Modules/gamepad \
-I$(srcdir)/Source/WebCore/Modules/geolocation \
-I$(srcdir)/Source/WebCore/Modules/indexeddb \
-I$(srcdir)/Source/WebCore/Modules/mediasource \
-I$(srcdir)/Source/WebCore/Modules/mediastream \
-I$(srcdir)/Source/WebCore/Modules/notifications \
-I$(srcdir)/Source/WebCore/Modules/protocolhandler \
......@@ -881,6 +882,7 @@ IDL_PATH := \
$(WebCore)/Modules/gamepad \
$(WebCore)/Modules/geolocation \
$(WebCore)/Modules/indexeddb \
$(WebCore)/Modules/mediasource \
$(WebCore)/Modules/mediastream \
$(WebCore)/Modules/notifications \
$(WebCore)/Modules/webaudio \
......@@ -1049,6 +1051,7 @@ EXTRA_DIST += \
$(shell ls $(srcdir)/Source/WebCore/Modules/gamepad/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/geolocation/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/indexeddb/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/mediasource/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/mediastream/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/notifications/*.idl) \
$(shell ls $(srcdir)/Source/WebCore/Modules/protocolhandler/*.idl) \
......
......@@ -507,6 +507,10 @@ webcore_built_sources += \
DerivedSources/WebCore/JSSharedWorker.h \
DerivedSources/WebCore/JSSignalingCallback.cpp \
DerivedSources/WebCore/JSSignalingCallback.h \
DerivedSources/WebCore/JSSourceBuffer.cpp \
DerivedSources/WebCore/JSSourceBuffer.h \
DerivedSources/WebCore/JSSourceBufferList.cpp \
DerivedSources/WebCore/JSSourceBufferList.h \
DerivedSources/WebCore/JSSpeechInputEvent.cpp \
DerivedSources/WebCore/JSSpeechInputEvent.h \
DerivedSources/WebCore/JSSpeechInputResult.cpp \
......@@ -696,6 +700,8 @@ dom_binding_idls += \
$(WebCore)/Modules/geolocation/PositionCallback.idl \
$(WebCore)/Modules/geolocation/PositionError.idl \
$(WebCore)/Modules/geolocation/PositionErrorCallback.idl \
$(WebCore)/Modules/mediasource/SourceBuffer.idl \
$(WebCore)/Modules/mediasource/SourceBufferList.idl \
$(WebCore)/Modules/mediastream/DeprecatedPeerConnection.idl \
$(WebCore)/Modules/mediastream/DOMWindowMediaStream.idl \
$(WebCore)/Modules/mediastream/IceCallback.idl \
......@@ -1165,6 +1171,10 @@ webcore_modules_sources += \
Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.h \
Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp \
Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h \
Source/WebCore/Modules/mediasource/SourceBuffer.cpp \
Source/WebCore/Modules/mediasource/SourceBuffer.h \
Source/WebCore/Modules/mediasource/SourceBufferList.cpp \
Source/WebCore/Modules/mediasource/SourceBufferList.h \
Source/WebCore/Modules/mediastream/DeprecatedPeerConnection.cpp \
Source/WebCore/Modules/mediastream/DeprecatedPeerConnection.h \
Source/WebCore/Modules/mediastream/IceCallback.h \
......
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 "SourceBuffer.h"
#if ENABLE(MEDIA_SOURCE)
#include "TimeRanges.h"
#include <wtf/Uint8Array.h>
namespace WebCore {
SourceBuffer::SourceBuffer(const String& id)
: m_id(id)
{
}
SourceBuffer::~SourceBuffer()
{
}
PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode&) const
{
// FIXME(91773): return buffered data from media source.
return 0;
}
void SourceBuffer::append(PassRefPtr<Uint8Array>, ExceptionCode&)
{
// FIXME(91773): append the data to the media source.
}
void SourceBuffer::abort(ExceptionCode&)
{
// FIXME(91773): signal the media source to abort this source buffer.
}
} // namespace WebCore
#endif
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 SourceBuffer_h
#define SourceBuffer_h
#if ENABLE(MEDIA_SOURCE)
#include "ExceptionCode.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class TimeRanges;
class SourceBuffer : public RefCounted<SourceBuffer> {
public:
static PassRefPtr<SourceBuffer> create(const String& id)
{
return adoptRef(new SourceBuffer(id));
}
virtual ~SourceBuffer();
PassRefPtr<TimeRanges> buffered(ExceptionCode&) const;
void append(PassRefPtr<Uint8Array> data, ExceptionCode&);
void abort(ExceptionCode&);
const String& id() const { return m_id; }
void clear() { }
private:
explicit SourceBuffer(const String& id);
String m_id;
};
} // namespace WebCore
#endif
#endif
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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.
*/
module html {
interface [
Conditional=MEDIA_SOURCE,
V8EnabledAtRuntime=mediaSource
] SourceBuffer {
// Returns the time ranges buffered.
readonly attribute TimeRanges buffered
getter raises(DOMException);
// Append segment data.
void append(in Uint8Array data) raises (DOMException);
// Abort the current segment append sequence.
void abort() raises (DOMException);
};
}
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 "SourceBufferList.h"
#if ENABLE(MEDIA_SOURCE)
#include "Event.h"
namespace WebCore {
SourceBufferList::SourceBufferList(ScriptExecutionContext* context)
: m_scriptExecutionContext(context)
{
}
unsigned long SourceBufferList::length() const
{
return m_list.size();
}
SourceBuffer* SourceBufferList::item(unsigned index) const
{
if (index >= m_list.size())
return 0;
return m_list[index].get();
}
void SourceBufferList::add(PassRefPtr<SourceBuffer> buffer)
{
m_list.append(buffer);
createAndFireEvent(eventNames().webkitaddsourcebufferEvent);
}
bool SourceBufferList::remove(SourceBuffer* buffer)
{
size_t index = m_list.find(buffer);
if (index == notFound)
return false;
m_list.remove(index);
buffer->clear();
createAndFireEvent(eventNames().webkitremovesourcebufferEvent);
return true;
}
void SourceBufferList::clear()
{
for (size_t i = 0; i < m_list.size(); ++i)
remove(m_list[i].get());
}
void SourceBufferList::createAndFireEvent(const AtomicString& eventName)
{
RefPtr<Event> event = Event::create(eventName, false, false);
event->setTarget(this);
EventTarget::dispatchEvent(event);
}
const AtomicString& SourceBufferList::interfaceName() const
{
return eventNames().interfaceForSourceBufferList;
}
ScriptExecutionContext* SourceBufferList::scriptExecutionContext() const
{
return m_scriptExecutionContext;
}
EventTargetData* SourceBufferList::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData* SourceBufferList::ensureEventTargetData()
{
return &m_eventTargetData;
}
} // namespace WebCore
#endif
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 SourceBufferList_h
#define SourceBufferList_h
#if ENABLE(MEDIA_SOURCE)
#include "EventTarget.h"
#include "SourceBuffer.h"
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget {
public:
static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context)
{
return adoptRef(new SourceBufferList(context));
}
virtual ~SourceBufferList() { }
unsigned long length() const;
SourceBuffer* item(unsigned index) const;
void add(PassRefPtr<SourceBuffer>);
bool remove(SourceBuffer*);
void clear();
// EventTarget interface
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
using RefCounted<SourceBufferList>::ref;
using RefCounted<SourceBufferList>::deref;
protected:
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData* ensureEventTargetData() OVERRIDE;
private:
explicit SourceBufferList(ScriptExecutionContext*);
void createAndFireEvent(const AtomicString&);
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
EventTargetData m_eventTargetData;
ScriptExecutionContext* m_scriptExecutionContext;
Vector<RefPtr<SourceBuffer> > m_list;
};
} // namespace WebCore
#endif
#endif
/*
* Copyright (C) 2012 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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.
*/
module html {
interface [
Conditional=MEDIA_SOURCE,
V8EnabledAtRuntime=mediaSource,
IndexedGetter,
EventTarget,
CallWith=ScriptExecutionContext
] SourceBufferList {
readonly attribute unsigned long length;
SourceBuffer item(in unsigned long index);
// EventTarget interface
void addEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
void removeEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
boolean dispatchEvent(in Event event)
raises(EventException);