Source/WebCore/CMakeLists.txt

@@SET(WebCore_INCLUDE_DIRECTORIES
4646 "${WEBCORE_DIR}/platform/sql"
4747 "${WEBCORE_DIR}/platform/text"
4848 "${WEBCORE_DIR}/platform/text/transcoder"
 49 "${WEBCORE_DIR}/platform/track"
4950 "${WEBCORE_DIR}/plugins"
5051 "${WEBCORE_DIR}/rendering"
5152 "${WEBCORE_DIR}/rendering/mathml"

@@ENDIF ()
19631964
19641965IF (ENABLE_VIDEO_TRACK)
19651966 LIST(APPEND WebCore_SOURCES
 1967 html/CueIndex.cpp
19661968 html/HTMLTrackElement.cpp
 1969 html/LoadableTextTrack.cpp
 1970 html/LoadableTextTrackImpl.cpp
 1971 html/MutableTextTrack.cpp
 1972 html/MutableTextTrackImpl.cpp
 1973 html/TextTrack.cpp
 1974 html/TextTrackCue.cpp
 1975 html/TextTrackCueList.cpp
 1976 loader/CueLoader.cpp
 1977 platform/track/CueParser.cpp
19671978 )
19681979ENDIF()
19691980

Source/WebCore/ChangeLog

 12011-06-17 Anna Cavender <annacc@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Adding initial interfaces and stubs for track
 6 https://bugs.webkit.org/show_bug.cgi?id=60379
 7
 8 This marks the first patch of a series to implement out-of-band
 9 <track> support in WebKit. This patch adds some of the core header files
 10 and their corresponding stub .cpp files.
 11
 12 No new tests because feature is hidden behind VIDEO_TRACK feature
 13 define, which is turned off.
 14
 15 * CMakeLists.txt:
 16 * WebCore.gyp/WebCore.gyp:
 17 * WebCore.gypi:
 18 * WebCore.pri:
 19 * WebCore.pro:
 20 * WebCore.xcodeproj/project.pbxproj:
 21 * html/CueIndex.cpp: Added.
 22 * html/CueIndex.h: Added.
 23 * html/LoadableTextTrack.cpp: Added.
 24 * html/LoadableTextTrack.h: Added.
 25 * html/LoadableTextTrackImpl.cpp: Added.
 26 * html/LoadableTextTrackImpl.h: Added.
 27 * html/MutableTextTrack.cpp: Added.
 28 * html/MutableTextTrack.h: Added.
 29 * html/MutableTextTrackImpl.cpp: Added.
 30 * html/MutableTextTrackImpl.h: Added.
 31 * html/TextTrack.cpp: Added.
 32 * html/TextTrack.h: Added.
 33 * html/TextTrackCue.cpp: Added.
 34 * html/TextTrackCue.h: Added.
 35 * html/TextTrackCueList.cpp: Added.
 36 * html/TextTrackCueList.h: Added.
 37 * html/TextTrackPrivate.h: Added.
 38 * loader/CueLoader.cpp: Added.
 39 * loader/CueLoader.h: Added.
 40 * platform/track/CueParser.cpp: Added.
 41 * platform/track/CueParser.h: Added.
 42 * platform/track/CueParserPrivate.h: Added.
 43
1442011-06-17 Sheriff Bot <webkit.review.bot@gmail.com>
245
346 Unreviewed, rolling out r89143.

Source/WebCore/WebCore.gyp/WebCore.gyp

201201 '../platform/sql',
202202 '../platform/text',
203203 '../platform/text/transcoder',
 204 '../platform/track',
204205 '../plugins',
205206 '../plugins/chromium',
206207 '../rendering',

Source/WebCore/WebCore.gypi

28472847 'html/CollectionCache.cpp',
28482848 'html/ColorInputType.cpp',
28492849 'html/ColorInputType.h',
 2850 'html/CueIndex.cpp',
 2851 'html/CueIndex.h',
28502852 'html/DOMFormData.cpp',
28512853 'html/DOMFormData.h',
28522854 'html/DOMSettableTokenList.cpp',

30403042 'html/LabelsNodeList.h',
30413043 'html/LinkRelAttribute.cpp',
30423044 'html/LinkRelAttribute.h',
 3045 'html/LoadableTextTrack.cpp',
 3046 'html/LoadableTextTrack.h',
 3047 'html/LoadableTextTrackImpl.cpp',
 3048 'html/LoadableTextTrackImpl.h',
30433049 'html/MediaDocument.cpp',
30443050 'html/MediaDocument.h',
30453051 'html/MediaError.h',
 3052 'html/MutableTextTrack.cpp',
 3053 'html/MutableTextTrack.h',
 3054 'html/MutableTextTrackImpl.cpp',
 3055 'html/MutableTextTrackImpl.h',
30463056 'html/MonthInputType.cpp',
30473057 'html/MonthInputType.h',
30483058 'html/NumberInputType.cpp',

30763086 'html/TextInputType.cpp',
30773087 'html/TextInputType.h',
30783088 'html/TextMetrics.h',
 3089 'html/TextTrack.cpp',
 3090 'html/TextTrack.h',
 3091 'html/TextTrackCue.cpp',
 3092 'html/TextTrackCue.h',
 3093 'html/TextTrackCueList.cpp',
 3094 'html/TextTrackCueList.h',
 3095 'html/TextTrackPrivateInterface.h',
30793096 'html/TimeInputType.cpp',
30803097 'html/TimeInputType.h',
30813098 'html/TimeRanges.cpp',

33383355 'loader/CrossOriginAccessControl.cpp',
33393356 'loader/CrossOriginAccessControl.h',
33403357 'loader/CrossOriginPreflightResultCache.cpp',
 3358 'loader/CueLoader.cpp',
 3359 'loader/CueLoader.h',
33413360 'loader/DocumentLoader.cpp',
33423361 'loader/DocumentThreadableLoader.cpp',
33433362 'loader/DocumentThreadableLoader.h',

50405059 'platform/text/wince/TextBreakIteratorWinCE.cpp',
50415060 'platform/text/wince/TextCodecWinCE.cpp',
50425061 'platform/text/wince/TextCodecWinCE.h',
 5062 'platform/track/CueParser.cpp',
 5063 'platform/track/CueParser.h',
 5064 'platform/track/CueParserPrivate.h',
50435065 'platform/win/BString.cpp',
50445066 'platform/win/BString.h',
50455067 'platform/win/BitmapInfo.cpp',

Source/WebCore/WebCore.pri

@@WEBCORE_INCLUDEPATH = \
101101 $$SOURCE_DIR/WebCore/platform/sql \
102102 $$SOURCE_DIR/WebCore/platform/text \
103103 $$SOURCE_DIR/WebCore/platform/text/transcoder \
 104 $$SOURCE_DIR/WebCore/platform/track \
104105 $$SOURCE_DIR/WebCore/plugins \
105106 $$SOURCE_DIR/WebCore/rendering \
106107 $$SOURCE_DIR/WebCore/rendering/mathml \

Source/WebCore/WebCore.pro

@@HEADERS += \
16381638 html/canvas/Uint8Array.h \
16391639 html/ClassList.h \
16401640 html/CollectionCache.h \
 1641 html/CueIndex.h \
16411642 html/DOMFormData.h \
16421643 html/DOMSettableTokenList.h \
16431644 html/DOMTokenList.h \

@@HEADERS += \
17261727 html/HTMLTableSectionElement.h \
17271728 html/HTMLTextAreaElement.h \
17281729 html/HTMLTitleElement.h \
 1730 html/HTMLTrackElement.h \
17291731 html/HTMLUListElement.h \
17301732 html/HTMLVideoElement.h \
17311733 html/HTMLViewSourceDocument.h \

@@HEADERS += \
17331735 html/ImageDocument.h \
17341736 html/LabelsNodeList.h \
17351737 html/LinkRelAttribute.h \
 1738 html/LoadableTextTrack.h \
 1739 html/LoadableTextTrackImpl.h \
17361740 html/MediaDocument.h \
 1741 html/MutableTextTrack.h \
 1742 html/MutableTextTrackImpl.h \
17371743 html/PluginDocument.h \
17381744 html/StepRange.h \
17391745 html/TextDocument.h \
 1746 html/TextTrack.h \
 1747 html/TextTrackCue.h \
 1748 html/TextTrackCueList.h \
 1749 html/TextTrackPrivate.h \
17401750 html/TimeRanges.h \
17411751 html/ValidityState.h \
17421752 html/parser/CSSPreloadScanner.h \

@@HEADERS += \
18191829 loader/cache/MemoryCache.h \
18201830 loader/CrossOriginAccessControl.h \
18211831 loader/CrossOriginPreflightResultCache.h \
 1832 loader/CueLoader.h \
18221833 loader/cache/CachedResourceLoader.h \
18231834 loader/DocumentLoader.h \
18241835 loader/DocumentThreadableLoader.h \

@@HEADERS += \
20952106 platform/ThreadGlobalData.h \
20962107 platform/ThreadTimers.h \
20972108 platform/Timer.h \
 2109 platform/track/CueParser.h \
 2110 platform/track/CueParserPrivate.h \
20982111 platform/Widget.h \
20992112 platform/PlatformStrategies.h \
21002113 platform/LocalizedStrings.h \

Source/WebCore/WebCore.xcodeproj/project.pbxproj

40064006 B14353F8138EA95B00D53276 /* JSStreamList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B14353F6138EA95B00D53276 /* JSStreamList.cpp */; };
40074007 B14353F9138EA95B00D53276 /* JSStreamList.h in Headers */ = {isa = PBXBuildFile; fileRef = B14353F7138EA95B00D53276 /* JSStreamList.h */; };
40084008 B1827493134CA4C100B98C2D /* CallbackFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1827492134CA4C100B98C2D /* CallbackFunction.cpp */; };
 4009 B1AD4E5C13A12A0B00846B27 /* CueIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E4B13A12A0B00846B27 /* CueIndex.cpp */; };
 4010 B1AD4E5D13A12A0B00846B27 /* CueIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E4C13A12A0B00846B27 /* CueIndex.h */; };
 4011 B1AD4E5E13A12A0B00846B27 /* LoadableTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E4D13A12A0B00846B27 /* LoadableTextTrack.cpp */; };
 4012 B1AD4E5F13A12A0B00846B27 /* LoadableTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E4E13A12A0B00846B27 /* LoadableTextTrack.h */; };
 4013 B1AD4E6013A12A0B00846B27 /* LoadableTextTrackImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E4F13A12A0B00846B27 /* LoadableTextTrackImpl.cpp */; };
 4014 B1AD4E6113A12A0B00846B27 /* LoadableTextTrackImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5013A12A0B00846B27 /* LoadableTextTrackImpl.h */; };
 4015 B1AD4E6213A12A0B00846B27 /* MutableTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E5113A12A0B00846B27 /* MutableTextTrack.cpp */; };
 4016 B1AD4E6313A12A0B00846B27 /* MutableTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5213A12A0B00846B27 /* MutableTextTrack.h */; };
 4017 B1AD4E6413A12A0B00846B27 /* MutableTextTrackImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E5313A12A0B00846B27 /* MutableTextTrackImpl.cpp */; };
 4018 B1AD4E6513A12A0B00846B27 /* MutableTextTrackImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5413A12A0B00846B27 /* MutableTextTrackImpl.h */; };
 4019 B1AD4E6613A12A0B00846B27 /* TextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E5513A12A0B00846B27 /* TextTrack.cpp */; };
 4020 B1AD4E6713A12A0B00846B27 /* TextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5613A12A0B00846B27 /* TextTrack.h */; };
 4021 B1AD4E6813A12A0B00846B27 /* TextTrackCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E5713A12A0B00846B27 /* TextTrackCue.cpp */; };
 4022 B1AD4E6913A12A0B00846B27 /* TextTrackCue.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5813A12A0B00846B27 /* TextTrackCue.h */; };
 4023 B1AD4E6A13A12A0B00846B27 /* TextTrackCueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E5913A12A0B00846B27 /* TextTrackCueList.cpp */; };
 4024 B1AD4E6B13A12A0B00846B27 /* TextTrackCueList.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5A13A12A0B00846B27 /* TextTrackCueList.h */; };
 4025 B1AD4E6C13A12A0B00846B27 /* TextTrackPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E5B13A12A0B00846B27 /* TextTrackPrivate.h */; };
 4026 B1AD4E7313A12A4600846B27 /* CueLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E7113A12A4600846B27 /* CueLoader.cpp */; };
 4027 B1AD4E7413A12A4600846B27 /* CueLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E7213A12A4600846B27 /* CueLoader.h */; };
 4028 B1AD4E7B13A12A7200846B27 /* CueParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E7813A12A7200846B27 /* CueParser.cpp */; };
 4029 B1AD4E7C13A12A7200846B27 /* CueParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E7913A12A7200846B27 /* CueParser.h */; };
 4030 B1AD4E7D13A12A7200846B27 /* CueParserPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E7A13A12A7200846B27 /* CueParserPrivate.h */; };
40094031 B1D5ECB5134B58DA0087C78F /* CallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */; };
40104032 B1E5457A1346291F0092A545 /* GeneratedStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1E545711346291F0092A545 /* GeneratedStream.cpp */; };
40114033 B1E5457B1346291F0092A545 /* GeneratedStream.h in Headers */ = {isa = PBXBuildFile; fileRef = B1E545721346291F0092A545 /* GeneratedStream.h */; };

1039610418 B14353F6138EA95B00D53276 /* JSStreamList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStreamList.cpp; sourceTree = "<group>"; };
1039710419 B14353F7138EA95B00D53276 /* JSStreamList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStreamList.h; sourceTree = "<group>"; };
1039810420 B1827492134CA4C100B98C2D /* CallbackFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallbackFunction.cpp; sourceTree = "<group>"; };
 10421 B1AD4E4B13A12A0B00846B27 /* CueIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CueIndex.cpp; path = html/CueIndex.cpp; sourceTree = SOURCE_ROOT; };
 10422 B1AD4E4C13A12A0B00846B27 /* CueIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CueIndex.h; path = html/CueIndex.h; sourceTree = SOURCE_ROOT; };
 10423 B1AD4E4D13A12A0B00846B27 /* LoadableTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoadableTextTrack.cpp; path = html/LoadableTextTrack.cpp; sourceTree = SOURCE_ROOT; };
 10424 B1AD4E4E13A12A0B00846B27 /* LoadableTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoadableTextTrack.h; path = html/LoadableTextTrack.h; sourceTree = SOURCE_ROOT; };
 10425 B1AD4E4F13A12A0B00846B27 /* LoadableTextTrackImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoadableTextTrackImpl.cpp; path = html/LoadableTextTrackImpl.cpp; sourceTree = SOURCE_ROOT; };
 10426 B1AD4E5013A12A0B00846B27 /* LoadableTextTrackImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoadableTextTrackImpl.h; path = html/LoadableTextTrackImpl.h; sourceTree = SOURCE_ROOT; };
 10427 B1AD4E5113A12A0B00846B27 /* MutableTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MutableTextTrack.cpp; path = html/MutableTextTrack.cpp; sourceTree = SOURCE_ROOT; };
 10428 B1AD4E5213A12A0B00846B27 /* MutableTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MutableTextTrack.h; path = html/MutableTextTrack.h; sourceTree = SOURCE_ROOT; };
 10429 B1AD4E5313A12A0B00846B27 /* MutableTextTrackImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MutableTextTrackImpl.cpp; path = html/MutableTextTrackImpl.cpp; sourceTree = SOURCE_ROOT; };
 10430 B1AD4E5413A12A0B00846B27 /* MutableTextTrackImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MutableTextTrackImpl.h; path = html/MutableTextTrackImpl.h; sourceTree = SOURCE_ROOT; };
 10431 B1AD4E5513A12A0B00846B27 /* TextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextTrack.cpp; path = html/TextTrack.cpp; sourceTree = SOURCE_ROOT; };
 10432 B1AD4E5613A12A0B00846B27 /* TextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrack.h; path = html/TextTrack.h; sourceTree = SOURCE_ROOT; };
 10433 B1AD4E5713A12A0B00846B27 /* TextTrackCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextTrackCue.cpp; path = html/TextTrackCue.cpp; sourceTree = SOURCE_ROOT; };
 10434 B1AD4E5813A12A0B00846B27 /* TextTrackCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrackCue.h; path = html/TextTrackCue.h; sourceTree = SOURCE_ROOT; };
 10435 B1AD4E5913A12A0B00846B27 /* TextTrackCueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextTrackCueList.cpp; path = html/TextTrackCueList.cpp; sourceTree = SOURCE_ROOT; };
 10436 B1AD4E5A13A12A0B00846B27 /* TextTrackCueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrackCueList.h; path = html/TextTrackCueList.h; sourceTree = SOURCE_ROOT; };
 10437 B1AD4E5B13A12A0B00846B27 /* TextTrackPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextTrackPrivate.h; path = html/TextTrackPrivate.h; sourceTree = SOURCE_ROOT; };
 10438 B1AD4E7113A12A4600846B27 /* CueLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CueLoader.cpp; path = loader/CueLoader.cpp; sourceTree = SOURCE_ROOT; };
 10439 B1AD4E7213A12A4600846B27 /* CueLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CueLoader.h; path = loader/CueLoader.h; sourceTree = SOURCE_ROOT; };
 10440 B1AD4E7813A12A7200846B27 /* CueParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CueParser.cpp; sourceTree = "<group>"; };
 10441 B1AD4E7913A12A7200846B27 /* CueParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CueParser.h; sourceTree = "<group>"; };
 10442 B1AD4E7A13A12A7200846B27 /* CueParserPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CueParserPrivate.h; sourceTree = "<group>"; };
1039910443 B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallbackFunction.h; sourceTree = "<group>"; };
1040010444 B1E545711346291F0092A545 /* GeneratedStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratedStream.cpp; sourceTree = "<group>"; };
1040110445 B1E545721346291F0092A545 /* GeneratedStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedStream.h; sourceTree = "<group>"; };

1355213596 417DA4CD13734204007C57FB /* testing */ = {
1355313597 isa = PBXGroup;
1355413598 children = (
 13599 B1AD4E7713A12A7200846B27 /* track */,
 13600 B1AD4E7113A12A4600846B27 /* CueLoader.cpp */,
 13601 B1AD4E7213A12A4600846B27 /* CueLoader.h */,
 13602 B1AD4E4B13A12A0B00846B27 /* CueIndex.cpp */,
 13603 B1AD4E4C13A12A0B00846B27 /* CueIndex.h */,
 13604 B1AD4E4D13A12A0B00846B27 /* LoadableTextTrack.cpp */,
 13605 B1AD4E4E13A12A0B00846B27 /* LoadableTextTrack.h */,
 13606 B1AD4E4F13A12A0B00846B27 /* LoadableTextTrackImpl.cpp */,
 13607 B1AD4E5013A12A0B00846B27 /* LoadableTextTrackImpl.h */,
 13608 B1AD4E5113A12A0B00846B27 /* MutableTextTrack.cpp */,
 13609 B1AD4E5213A12A0B00846B27 /* MutableTextTrack.h */,
 13610 B1AD4E5313A12A0B00846B27 /* MutableTextTrackImpl.cpp */,
 13611 B1AD4E5413A12A0B00846B27 /* MutableTextTrackImpl.h */,
 13612 B1AD4E5513A12A0B00846B27 /* TextTrack.cpp */,
 13613 B1AD4E5613A12A0B00846B27 /* TextTrack.h */,
 13614 B1AD4E5713A12A0B00846B27 /* TextTrackCue.cpp */,
 13615 B1AD4E5813A12A0B00846B27 /* TextTrackCue.h */,
 13616 B1AD4E5913A12A0B00846B27 /* TextTrackCueList.cpp */,
 13617 B1AD4E5A13A12A0B00846B27 /* TextTrackCueList.h */,
 13618 B1AD4E5B13A12A0B00846B27 /* TextTrackPrivate.h */,
1355513619 41815C1B138319630057AAA4 /* js */,
1355613620 417DA4CF13734326007C57FB /* Internals.cpp */,
1355713621 417DA4CE13734326007C57FB /* Internals.h */,

1723517299 name = Plugins;
1723617300 sourceTree = "<group>";
1723717301 };
 17302 B1AD4E7713A12A7200846B27 /* track */ = {
 17303 isa = PBXGroup;
 17304 children = (
 17305 B1AD4E7813A12A7200846B27 /* CueParser.cpp */,
 17306 B1AD4E7913A12A7200846B27 /* CueParser.h */,
 17307 B1AD4E7A13A12A7200846B27 /* CueParserPrivate.h */,
 17308 );
 17309 name = track;
 17310 path = platform/track;
 17311 sourceTree = SOURCE_ROOT;
 17312 };
1723817313 B22277CA0D00BF1E0071B782 /* svg */ = {
1723917314 isa = PBXGroup;
1724017315 children = (

2289322968 977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
2289422969 FD537353137B651800008DCE /* ZeroPole.h in Headers */,
2289522970 985BB96E13A94058007A0B69 /* LinkRelAttribute.h in Headers */,
 22971 B1AD4E5D13A12A0B00846B27 /* CueIndex.h in Headers */,
 22972 B1AD4E5F13A12A0B00846B27 /* LoadableTextTrack.h in Headers */,
 22973 B1AD4E6113A12A0B00846B27 /* LoadableTextTrackImpl.h in Headers */,
 22974 B1AD4E6313A12A0B00846B27 /* MutableTextTrack.h in Headers */,
 22975 B1AD4E6513A12A0B00846B27 /* MutableTextTrackImpl.h in Headers */,
 22976 B1AD4E6713A12A0B00846B27 /* TextTrack.h in Headers */,
 22977 B1AD4E6913A12A0B00846B27 /* TextTrackCue.h in Headers */,
 22978 B1AD4E6B13A12A0B00846B27 /* TextTrackCueList.h in Headers */,
 22979 B1AD4E6C13A12A0B00846B27 /* TextTrackPrivate.h in Headers */,
 22980 B1AD4E7413A12A4600846B27 /* CueLoader.h in Headers */,
 22981 B1AD4E7C13A12A7200846B27 /* CueParser.h in Headers */,
 22982 B1AD4E7D13A12A7200846B27 /* CueParserPrivate.h in Headers */,
2289622983 );
2289722984 runOnlyForDeploymentPostprocessing = 0;
2289822985 };

2563225719 977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
2563325720 FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
2563425721 985BB96D13A94058007A0B69 /* LinkRelAttribute.cpp in Sources */,
 25722 B1AD4E5C13A12A0B00846B27 /* CueIndex.cpp in Sources */,
 25723 B1AD4E5E13A12A0B00846B27 /* LoadableTextTrack.cpp in Sources */,
 25724 B1AD4E6013A12A0B00846B27 /* LoadableTextTrackImpl.cpp in Sources */,
 25725 B1AD4E6213A12A0B00846B27 /* MutableTextTrack.cpp in Sources */,
 25726 B1AD4E6413A12A0B00846B27 /* MutableTextTrackImpl.cpp in Sources */,
 25727 B1AD4E6613A12A0B00846B27 /* TextTrack.cpp in Sources */,
 25728 B1AD4E6813A12A0B00846B27 /* TextTrackCue.cpp in Sources */,
 25729 B1AD4E6A13A12A0B00846B27 /* TextTrackCueList.cpp in Sources */,
 25730 B1AD4E7313A12A4600846B27 /* CueLoader.cpp in Sources */,
 25731 B1AD4E7B13A12A7200846B27 /* CueParser.cpp in Sources */,
2563525732 );
2563625733 runOnlyForDeploymentPostprocessing = 0;
2563725734 };

Source/WebCore/html/CueIndex.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "CueIndex.h"
 31
 32#include "TextTrackCue.h"
 33#include "TextTrackCueList.h"
 34
 35namespace WebCore {
 36
 37CueSet CueSet::difference(const CueSet&) const
 38{
 39 // FIXME(62883): Implement.
 40 return CueSet();
 41}
 42
 43CueSet CueSet::unionSet(const CueSet&) const
 44{
 45 // FIXME(62883): Implement.
 46 return CueSet();
 47}
 48
 49void CueSet::add(const TextTrackCue&)
 50{
 51 // FIXME(62883): Implement.
 52}
 53
 54bool CueSet::contains(const TextTrackCue&) const
 55{
 56 // FIXME(62883): Implement.
 57 return false;
 58}
 59
 60void CueSet::remove(const TextTrackCue&)
 61{
 62 // FIXME(62883): Implement.
 63}
 64
 65bool CueSet::isEmpty() const
 66{
 67 // FIXME(62883): Implement.
 68 return false;
 69}
 70
 71int CueSet::size() const
 72{
 73 // FIXME(62883): Implement.
 74 return 0;
 75}
 76
 77void CueIndex::fetchNewCuesFromLoader(CueLoader*)
 78{
 79 // FIXME(62883): Implement.
 80}
 81
 82void CueIndex::removeCuesFromIndex(const TextTrackCueList*)
 83{
 84 // FIXME(62883): Implement.
 85}
 86
 87CueSet CueIndex::visibleCuesAtTime(double) const
 88{
 89 // FIXME(62855): Implement.
 90 return CueSet();
 91}
 92
 93void CueIndex::add(TextTrackCue*)
 94{
 95 // FIXME(62890): Implement.
 96}
 97
 98void CueIndex::remove(TextTrackCue*)
 99{
 100 // FIXME(62890): Implement.
 101}
 102
 103} // namespace WebCore
 104
 105#endif

Source/WebCore/html/CueIndex.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef CueIndex_h
 27#define CueIndex_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "CueLoader.h"
 32#include <wtf/HashSet.h>
 33
 34namespace WebCore {
 35
 36class TextTrackCue;
 37class TextTrackCueList;
 38
 39class CueSet {
 40public:
 41 CueSet() { }
 42 ~CueSet() { }
 43 CueSet difference(const CueSet&) const;
 44 CueSet unionSet(const CueSet&) const;
 45 void add(const TextTrackCue&);
 46 bool contains(const TextTrackCue&) const;
 47 void remove(const TextTrackCue&);
 48 bool isEmpty() const;
 49 int size() const;
 50private:
 51 HashSet<TextTrackCue*> m_set;
 52};
 53
 54class CueIndex : public CueLoaderClient {
 55public:
 56 // CueLoaderClient methods.
 57 void fetchNewCuesFromLoader(CueLoader*);
 58 void removeCuesFromIndex(const TextTrackCueList*);
 59
 60 // Returns set of cues visible at a time in seconds.
 61 CueSet visibleCuesAtTime(double) const;
 62 void add(TextTrackCue*);
 63 void remove(TextTrackCue*);
 64};
 65
 66} // namespace WebCore
 67
 68#endif
 69#endif

Source/WebCore/html/LoadableTextTrack.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "LoadableTextTrack.h"
 31
 32namespace WebCore {
 33
 34LoadableTextTrack::LoadableTextTrack(const String& kind, const String& label, const String& language, bool isDefault)
 35{
 36 // FIXME(62881): Implement.
 37 m_private = LoadableTextTrackImpl::create(kind, label, language, isDefault);
 38}
 39
 40LoadableTextTrack::~LoadableTextTrack()
 41{
 42 // FIXME(62881): Implement.
 43}
 44
 45void LoadableTextTrack::load(const String&)
 46{
 47 // FIXME(62881): Implement.
 48}
 49
 50} // namespace WebCore
 51
 52#endif

Source/WebCore/html/LoadableTextTrack.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef LoadableTextTrack_h
 27#define LoadableTextTrack_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "LoadableTextTrackImpl.h"
 32#include "PassRefPtr.h"
 33#include "TextTrack.h"
 34#include "TextTrackCueList.h"
 35
 36namespace WebCore {
 37
 38class LoadableTextTrack : public TextTrack {
 39public:
 40 static PassRefPtr<LoadableTextTrack> create(const String& kind, const String& label, const String& language, bool isDefault)
 41 {
 42 return adoptRef(new LoadableTextTrack(kind, label, language, isDefault));
 43 }
 44 virtual ~LoadableTextTrack();
 45
 46 void load(const String&);
 47
 48private:
 49 LoadableTextTrack(const String& kind, const String& label, const String& language, bool isDefault);
 50
 51};
 52} // namespace WebCore
 53
 54#endif
 55#endif

Source/WebCore/html/LoadableTextTrackImpl.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "LoadableTextTrackImpl.h"
 31
 32#include "TextTrackCueList.h"
 33
 34namespace WebCore {
 35
 36LoadableTextTrackImpl::LoadableTextTrackImpl(const String& kind, const String& label, const String& language, bool isDefault)
 37 : TextTrackPrivateInterface(kind, label, language)
 38 , m_isDefault(isDefault)
 39{
 40}
 41
 42LoadableTextTrackImpl::~LoadableTextTrackImpl()
 43{
 44}
 45
 46PassRefPtr<TextTrackCueList> LoadableTextTrackImpl::cues() const
 47{
 48 // FIXME(62885): Implement.
 49 return 0;
 50}
 51
 52PassRefPtr<TextTrackCueList> LoadableTextTrackImpl::activeCues() const
 53{
 54 // FIXME(62885): Implement.
 55 return 0;
 56}
 57
 58void LoadableTextTrackImpl::fetchNewestCues(Vector<TextTrackCue*>&)
 59{
 60 // FIXME(62885): Implement.
 61}
 62
 63void LoadableTextTrackImpl::load(const String&)
 64{
 65 // FIXME(62881): Implement.
 66}
 67
 68void LoadableTextTrackImpl::newCuesLoaded()
 69{
 70 // FIXME(62881): Implement.
 71}
 72
 73} // namespace WebCore
 74
 75#endif

Source/WebCore/html/LoadableTextTrackImpl.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef LoadableTextTrackImpl_h
 27#define LoadableTextTrackImpl_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "CueLoader.h"
 32#include "CueParser.h"
 33#include "TextTrackPrivate.h"
 34#include <wtf/PassRefPtr.h>
 35#include <wtf/Vector.h>
 36
 37namespace WebCore {
 38
 39class TextTrack;
 40class TextTrackCue;
 41class TextTrackCueList;
 42
 43class LoadableTextTrackImpl : public TextTrackPrivateInterface, public CueLoader {
 44public:
 45 static PassOwnPtr<LoadableTextTrackImpl> create(const String& kind, const String& label, const String& language, bool isDefault)
 46 {
 47 return adoptPtr(new LoadableTextTrackImpl(kind, label, language, isDefault));
 48 }
 49 virtual ~LoadableTextTrackImpl();
 50
 51 // TextTrackPrivateInterface methods
 52 virtual PassRefPtr<TextTrackCueList> cues() const;
 53 virtual PassRefPtr<TextTrackCueList> activeCues() const;
 54 virtual void load(const String&);
 55
 56 // CueLoader interface
 57 virtual void newCuesLoaded();
 58 virtual void fetchNewestCues(Vector<TextTrackCue*>&);
 59
 60private:
 61 LoadableTextTrackImpl(const String& kind, const String& label, const String& language, bool isDefault);
 62
 63 bool m_isDefault;
 64
 65 CueParser m_parser;
 66 RefPtr<TextTrackCueList> m_cues;
 67};
 68
 69} // namespace WebCore
 70
 71#endif
 72#endif

Source/WebCore/html/MutableTextTrack.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "MutableTextTrack.h"
 31
 32#include "MutableTextTrackImpl.h"
 33
 34namespace WebCore {
 35
 36MutableTextTrack::MutableTextTrack(const String& kind, const String& label, const String& language)
 37{
 38 m_private = MutableTextTrackImpl::create(kind, label, language);
 39}
 40
 41void MutableTextTrack::addCue(PassRefPtr<TextTrackCue>)
 42{
 43 // FIXME(62890): Implement.
 44}
 45
 46void MutableTextTrack::removeCue(PassRefPtr<TextTrackCue>)
 47{
 48 // FIXME(62890): Implement.
 49}
 50
 51} // namespace WebCore
 52
 53#endif

Source/WebCore/html/MutableTextTrack.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef MutableTextTrack_h
 27#define MutableTextTrack_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "TextTrack.h"
 32
 33namespace WebCore {
 34
 35class TextTrackCue;
 36
 37class MutableTextTrack : public TextTrack {
 38public:
 39 static PassRefPtr<MutableTextTrack> create(const String& kind, const String& label, const String& language)
 40 {
 41 return adoptRef(new MutableTextTrack(kind, label, language));
 42 }
 43 virtual ~MutableTextTrack() { }
 44
 45 void addCue(PassRefPtr<TextTrackCue>);
 46 void removeCue(PassRefPtr<TextTrackCue>);
 47private:
 48 MutableTextTrack(const String& kind, const String& label, const String& language);
 49};
 50
 51} // namespace WebCore
 52
 53#endif
 54#endif

Source/WebCore/html/MutableTextTrackImpl.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "MutableTextTrackImpl.h"
 31
 32#include "TextTrack.h"
 33#include "TextTrackCue.h"
 34#include "TextTrackCueList.h"
 35
 36namespace WebCore {
 37
 38MutableTextTrackImpl::MutableTextTrackImpl(const String& kind, const String& label, const String& language)
 39 : TextTrackPrivateInterface(kind, label, language)
 40{
 41}
 42
 43MutableTextTrackImpl::~MutableTextTrackImpl()
 44{
 45}
 46
 47void MutableTextTrackImpl::addCue(TextTrackCue*)
 48{
 49 // FIXME(62890): Implement.
 50}
 51
 52void MutableTextTrackImpl::removeCue(TextTrackCue*)
 53{
 54 // FIXME(62890): Implement.
 55}
 56
 57PassRefPtr<TextTrackCueList> MutableTextTrackImpl::cues() const
 58{
 59 // FIXME(62885): Implement.
 60 return 0;
 61}
 62
 63PassRefPtr<TextTrackCueList> MutableTextTrackImpl::activeCues() const
 64{
 65 // FIXME(62885): Implement.
 66 return 0;
 67}
 68
 69void MutableTextTrackImpl::newCuesLoaded()
 70{
 71 // FIXME(62890): Implement.
 72}
 73
 74void MutableTextTrackImpl::fetchNewestCues(Vector<TextTrackCue*>&)
 75{
 76 // FIXME(62890): Implement.
 77}
 78
 79} // namespace WebCore
 80
 81#endif

Source/WebCore/html/MutableTextTrackImpl.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef MutableTextTrackImpl_h
 27#define MutableTextTrackImpl_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "CueLoader.h"
 32#include "TextTrackPrivate.h"
 33#include <wtf/PassRefPtr.h>
 34#include <wtf/Vector.h>
 35
 36namespace WebCore {
 37
 38class CueLoaderClient;
 39class TextTrack;
 40class TextTrackCue;
 41class TextTrackCueList;
 42
 43class MutableTextTrackImpl : public TextTrackPrivateInterface, public CueLoader {
 44public:
 45 static PassOwnPtr<MutableTextTrackImpl> create(const String& kind, const String& label, const String& language)
 46 {
 47 return adoptPtr(new MutableTextTrackImpl(kind, label, language));
 48 }
 49 virtual ~MutableTextTrackImpl();
 50
 51 // TextTrackPrivateInterface methods
 52 virtual PassRefPtr<TextTrackCueList> cues() const;
 53 virtual PassRefPtr<TextTrackCueList> activeCues() const;
 54 virtual void addCue(TextTrackCue*);
 55 virtual void removeCue(TextTrackCue*);
 56
 57 // CueLoader interface
 58 virtual void newCuesLoaded();
 59 virtual void fetchNewestCues(Vector<TextTrackCue*>&);
 60
 61private:
 62 MutableTextTrackImpl(const String& kind, const String& label, const String& language);
 63
 64 RefPtr<TextTrackCueList> m_cues;
 65 Vector<TextTrackCue*> m_newestCues;
 66};
 67
 68} // namespace WebCore
 69
 70#endif
 71#endif

Source/WebCore/html/TextTrack.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(VIDEO_TRACK)
 34
 35#include "TextTrack.h"
 36
 37#include "TextTrackCueList.h"
 38#include "TextTrackPrivate.h"
 39
 40namespace WebCore {
 41
 42class NullTextTrackPrivate : public TextTrackPrivateInterface {
 43public:
 44 NullTextTrackPrivate();
 45 virtual ~NullTextTrackPrivate();
 46
 47 // TextTrackPrivateInterface methods
 48 virtual String kind() const { return emptyString(); }
 49 virtual String label() const { return emptyString(); }
 50 virtual String language() const { return emptyString(); }
 51 virtual TextTrack::ReadyState readyState() const { return TextTrack::NONE; }
 52 virtual TextTrack::Mode mode() const { return TextTrack::OFF; }
 53 virtual void setMode(TextTrack::Mode) { }
 54 virtual PassRefPtr<TextTrackCueList> cues() const { return 0; }
 55 virtual PassRefPtr<TextTrackCueList> activeCues() const { return 0; }
 56 virtual void load(const String&) { }
 57};
 58
 59static PassOwnPtr<NullTextTrackPrivate> createNullTextTrackPrivate()
 60{
 61 return adoptPtr(new NullTextTrackPrivate());
 62}
 63
 64TextTrack::TextTrack()
 65 : m_private(createNullTextTrackPrivate())
 66{
 67}
 68
 69TextTrack::~TextTrack()
 70{
 71}
 72
 73String TextTrack::kind() const
 74{
 75 return m_private->kind();
 76}
 77
 78String TextTrack::label() const
 79{
 80 return m_private->label();
 81}
 82
 83String TextTrack::language() const
 84{
 85 return m_private->language();
 86}
 87
 88TextTrack::ReadyState TextTrack::readyState() const
 89{
 90 return m_private->readyState();
 91}
 92
 93TextTrack::Mode TextTrack::mode() const
 94{
 95 return m_private->mode();
 96}
 97
 98void TextTrack::setMode(unsigned short mode, ExceptionCode& ec)
 99{
 100 // 4.8.10.12.5 On setting the mode, if the new value is not either 0, 1, or 2,
 101 // the user agent must throw an INVALID_ACCESS_ERR exception.
 102 if (mode == TextTrack::OFF || mode == TextTrack::HIDDEN || mode == TextTrack::SHOWING)
 103 m_private->setMode(static_cast<Mode>(mode));
 104 else
 105 ec = INVALID_ACCESS_ERR;
 106}
 107
 108PassRefPtr<TextTrackCueList> TextTrack::cues() const
 109{
 110 return m_private->cues();
 111}
 112
 113PassRefPtr<TextTrackCueList> TextTrack::activeCues() const
 114{
 115 return m_private->activeCues();
 116}
 117
 118} // namespace WebCore
 119
 120#endif

Source/WebCore/html/TextTrack.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef TextTrack_h
 27#define TextTrack_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "ExceptionCode.h"
 32#include <wtf/PassOwnPtr.h>
 33#include <wtf/RefCounted.h>
 34#include <wtf/text/WTFString.h>
 35
 36namespace WebCore {
 37
 38class TextTrack;
 39class TextTrackCueList;
 40class TextTrackPrivateInterface;
 41
 42class TextTrackClient {
 43public:
 44 virtual ~TextTrackClient() { }
 45 virtual void textTrackReadyStateChanged(TextTrack*) { }
 46 virtual void textTrackModeChanged(TextTrack*) { }
 47 virtual void textTrackCreated(TextTrack*) { }
 48};
 49
 50class TextTrack : public RefCounted<TextTrack> {
 51public:
 52 static PassRefPtr<TextTrack> create()
 53 {
 54 return adoptRef(new TextTrack);
 55 }
 56 virtual ~TextTrack();
 57
 58 String kind() const;
 59 String label() const;
 60 String language() const;
 61
 62 enum ReadyState { NONE, LOADING, LOADED, ERROR };
 63 ReadyState readyState() const;
 64
 65 enum Mode { OFF = 0, HIDDEN = 1, SHOWING = 2 };
 66 Mode mode() const;
 67 void setMode(unsigned short, ExceptionCode&);
 68
 69 PassRefPtr<TextTrackCueList> cues() const;
 70 PassRefPtr<TextTrackCueList> activeCues() const;
 71
 72 void readyStateChanged();
 73 void modeChanged();
 74
 75protected:
 76 TextTrack();
 77 OwnPtr<TextTrackPrivateInterface> m_private;
 78
 79};
 80
 81} // namespace WebCore
 82
 83#endif
 84#endif

Source/WebCore/html/TextTrackCue.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "TextTrackCue.h"
 31
 32#include "DocumentFragment.h"
 33#include "TextTrack.h"
 34
 35namespace WebCore {
 36
 37TextTrackCue::TextTrackCue(const String& id, double start, double end, const String& content, const String& settings, bool pauseOnExit)
 38 : m_id(id)
 39 , m_startTime(start)
 40 , m_endTime(end)
 41 , m_content(content)
 42 , m_settings(settings)
 43 , m_pauseOnExit(pauseOnExit)
 44{
 45}
 46
 47TextTrackCue::~TextTrackCue()
 48{
 49}
 50
 51TextTrack* TextTrackCue::track() const
 52{
 53 return m_track;
 54}
 55
 56void TextTrackCue::setTrack(TextTrack* track)
 57{
 58 m_track = track;
 59}
 60
 61String TextTrackCue::id() const
 62{
 63 return m_id;
 64}
 65
 66double TextTrackCue::startTime() const
 67{
 68 return m_startTime;
 69}
 70
 71double TextTrackCue::endTime() const
 72{
 73 return m_endTime;
 74}
 75
 76bool TextTrackCue::pauseOnExit() const
 77{
 78 return m_pauseOnExit;
 79}
 80
 81String TextTrackCue::getCueAsSource()
 82{
 83 // FIXME(62883): Implement.
 84 return emptyString();
 85}
 86
 87PassRefPtr<DocumentFragment> TextTrackCue::getCueAsHTML()
 88{
 89 // FIXME(62883): Implement.
 90 return DocumentFragment::create(0);
 91}
 92
 93bool TextTrackCue::isActive()
 94{
 95 // FIXME(62885): Implement.
 96 return false;
 97}
 98
 99void TextTrackCue::setIsActive(bool active)
 100{
 101 m_isActive = active;
 102}
 103
 104} // namespace WebCore
 105
 106#endif

Source/WebCore/html/TextTrackCue.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef TextTrackCue_h
 27#define TextTrackCue_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "TextTrack.h"
 32#include <wtf/PassOwnPtr.h>
 33#include <wtf/RefCounted.h>
 34
 35namespace WebCore {
 36
 37class DocumentFragment;
 38class TextTrack;
 39
 40class TextTrackCue : public RefCounted<TextTrackCue> {
 41public:
 42 static PassRefPtr<TextTrackCue> create(const String& id, double start, double end, const String& content, const String& settings, bool pauseOnExit)
 43 {
 44 return adoptRef(new TextTrackCue(id, start, end, content, settings, pauseOnExit));
 45 }
 46
 47 virtual ~TextTrackCue();
 48
 49 TextTrack* track() const;
 50 void setTrack(TextTrack*);
 51
 52 String id() const;
 53 double startTime() const;
 54 double endTime() const;
 55 bool pauseOnExit() const;
 56
 57 String getCueAsSource();
 58 PassRefPtr<DocumentFragment> getCueAsHTML();
 59
 60 bool isActive();
 61 void setIsActive(bool);
 62
 63private:
 64 TextTrackCue(const String& id, double start, double end, const String& content, const String& settings, bool pauseOnExit);
 65
 66 TextTrack* m_track;
 67
 68 String m_id;
 69 double m_startTime;
 70 double m_endTime;
 71 String m_content;
 72 String m_settings;
 73 bool m_pauseOnExit;
 74 bool m_isActive;
 75};
 76
 77} // namespace WebCore
 78
 79#endif
 80#endif

Source/WebCore/html/TextTrackCueList.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "TextTrackCueList.h"
 31
 32namespace WebCore {
 33
 34TextTrackCueList::TextTrackCueList()
 35{
 36 // FIXME(62883): Implement.
 37}
 38
 39TextTrackCue* TextTrackCueList::getCueById(const String&) const
 40{
 41 // FIXME(62883): Implement.
 42 return 0;
 43}
 44
 45void TextTrackCueList::append(Vector<PassRefPtr<TextTrackCue> >&)
 46{
 47 // FIXME(62883): Implement.
 48}
 49
 50void TextTrackCueList::append(const PassRefPtr<TextTrackCue>&)
 51{
 52 // FIXME(62883): Implement.
 53}
 54
 55void TextTrackCueList::remove(const PassRefPtr<TextTrackCue>&)
 56{
 57 // FIXME(62883): Implement.
 58}
 59
 60} // namespace WebCore
 61
 62#endif

Source/WebCore/html/TextTrackCueList.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef TextTrackCueList_h
 27#define TextTrackCueList_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "PassRefPtr.h"
 32#include "TextTrackCue.h"
 33#include <wtf/RefCounted.h>
 34#include <wtf/Vector.h>
 35
 36namespace WebCore {
 37
 38class TextTrackCueList : public RefCounted<TextTrackCueList> {
 39public:
 40 static PassRefPtr<TextTrackCueList> create()
 41 {
 42 return adoptRef(new TextTrackCueList);
 43 }
 44
 45 unsigned long length() const;
 46 TextTrackCue* getCueById(const String&) const;
 47 PassRefPtr<TextTrackCueList> activeCues();
 48
 49 void append(const PassRefPtr<TextTrackCue>&);
 50 void append(Vector<PassRefPtr<TextTrackCue> >&);
 51 void remove(const PassRefPtr<TextTrackCue>&);
 52
 53private:
 54 TextTrackCueList();
 55};
 56
 57} // namespace WebCore
 58
 59#endif
 60#endif

Source/WebCore/html/TextTrackPrivate.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef TextTrackPrivate_h
 27#define TextTrackPrivate_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include "TextTrack.h"
 32#include <wtf/Forward.h>
 33#include <wtf/Noncopyable.h>
 34
 35namespace WebCore {
 36
 37class CueLoaderClient;
 38class TextTrackCueList;
 39
 40class TextTrackPrivateInterface {
 41 WTF_MAKE_NONCOPYABLE(TextTrackPrivateInterface); WTF_MAKE_FAST_ALLOCATED;
 42public:
 43 TextTrackPrivateInterface(const String& kind, const String& label, const String& language)
 44 : m_kind(kind)
 45 , m_label(label)
 46 , m_language(language)
 47 , m_readyState(TextTrack::NONE)
 48 , m_mode(TextTrack::SHOWING)
 49 {
 50 }
 51 virtual ~TextTrackPrivateInterface() { }
 52
 53 virtual String kind() const { return m_kind; }
 54 virtual String label() const { return m_label; }
 55 virtual String language() const { return m_language; }
 56
 57 virtual TextTrack::ReadyState readyState() const { return m_readyState; }
 58
 59 virtual TextTrack::Mode mode() const { return m_mode; }
 60 virtual void setMode(TextTrack::Mode mode) { m_mode = mode; }
 61
 62 virtual PassRefPtr<TextTrackCueList> cues() const = 0;
 63 virtual PassRefPtr<TextTrackCueList> activeCues() const = 0;
 64
 65 // This method should only be overridden by tracks that load cue data from a URL.
 66 virtual void load(const String&) { }
 67
 68private:
 69 String m_kind;
 70 String m_label;
 71 String m_language;
 72 TextTrack::ReadyState m_readyState;
 73 TextTrack::Mode m_mode;
 74};
 75
 76} // namespace WebCore
 77
 78#endif
 79#endif

Source/WebCore/loader/CueLoader.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#if ENABLE(VIDEO_TRACK)
 29
 30#include "CueLoader.h"
 31
 32namespace WebCore {
 33
 34void CueLoader::setCueLoaderClient(CueLoaderClient* client)
 35{
 36 m_client = client;
 37}
 38
 39}
 40
 41#endif

Source/WebCore/loader/CueLoader.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef CueLoader_h
 27#define CueLoader_h
 28
 29#if ENABLE(VIDEO_TRACK)
 30
 31#include <wtf/Vector.h>
 32
 33namespace WebCore {
 34
 35class CueLoader;
 36class TextTrackCue;
 37class TextTrackCueList;
 38
 39// Listener to CueLoader.
 40class CueLoaderClient {
 41public:
 42 // Queries CueLoader for newest cues.
 43 virtual void fetchNewCuesFromLoader(CueLoader*) = 0;
 44 virtual void removeCuesFromIndex(const TextTrackCueList*) = 0;
 45};
 46
 47class CueLoader {
 48public:
 49 void setCueLoaderClient(CueLoaderClient*);
 50
 51 // Informs client that new cues have been loaded.
 52 virtual void newCuesLoaded() = 0;
 53
 54 // Transfers ownership of currently loaded cues.
 55 virtual void fetchNewestCues(Vector<TextTrackCue*>& cues) = 0;
 56
 57protected:
 58 CueLoaderClient* m_client;
 59};
 60
 61}
 62
 63#endif
 64#endif

Source/WebCore/platform/track/CueParser.cpp

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(VIDEO_TRACK)
 34
 35#include "CueParser.h"
 36
 37namespace WebCore {
 38
 39CueParser::CueParser()
 40{
 41 // FIXME(62893): Implement.
 42}
 43
 44CueParser::~CueParser()
 45{
 46}
 47
 48void CueParser::load(const String&)
 49{
 50 // FIXME(62881): Implement.
 51}
 52
 53void CueParser::didReceiveData(const char*, int)
 54{
 55 // FIXME(62881): Implement.
 56}
 57
 58void CueParser::fetchParsedCues(Vector<PassRefPtr<TextTrackCue> >&)
 59{
 60 // FIXME(62893): Implement.
 61}
 62
 63} // namespace WebCore
 64
 65#endif

Source/WebCore/platform/track/CueParser.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef CueParser_h
 32#define CueParser_h
 33
 34#if ENABLE(VIDEO_TRACK)
 35
 36#include "CueParserPrivate.h"
 37#include "ThreadableLoader.h"
 38#include "ThreadableLoaderClient.h"
 39#include <wtf/RefCounted.h>
 40#include <wtf/Vector.h>
 41#include <wtf/text/WTFString.h>
 42
 43namespace WebCore {
 44
 45class TextTrackCue;
 46
 47class CueParser : public ThreadableLoaderClient {
 48public:
 49 CueParser();
 50 virtual ~CueParser();
 51
 52 // ThreadableLoaderClient methods.
 53 void didReceiveData(const char*, int);
 54
 55 void load(const String&);
 56 void fetchParsedCues(Vector<PassRefPtr<TextTrackCue> >&);
 57
 58private:
 59 RefPtr<ThreadableLoader> m_loader;
 60 OwnPtr<CueParserPrivateInterface> m_private;
 61};
 62
 63} // namespace WebCore
 64
 65#endif
 66#endif

Source/WebCore/platform/track/CueParserPrivate.h

 1/*
 2 * Copyright (C) 2011 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef CueParserPrivate_h
 32#define CueParsePrivate_h
 33
 34#if ENABLE(VIDEO_TRACK)
 35
 36#include "TextTrackCue.h"
 37#include <wtf/Forward.h>
 38#include <wtf/Noncopyable.h>
 39#include <wtf/Vector.h>
 40
 41namespace WebCore {
 42
 43class CueParserPrivateClient {
 44public:
 45 virtual void newCuesParsed() = 0;
 46};
 47
 48class CueParserPrivateInterface {
 49 WTF_MAKE_NONCOPYABLE(CueParserPrivateInterface); WTF_MAKE_FAST_ALLOCATED;
 50public:
 51 virtual ~CueParserPrivateInterface() { }
 52
 53 // Input data to the parser to parse.
 54 virtual void parseBytes(const char*, int) = 0;
 55
 56 // Transfers ownership of last parsed cues to caller.
 57 virtual void fetchParsedCues(Vector<PassRefPtr<TextTrackCue> >&) = 0;
 58
 59protected:
 60 CueParserPrivateInterface() { }
 61};
 62
 63} // namespace WebCore
 64
 65#endif
 66#endif