Chromium Code Reviews| Index: Source/modules/mediasource/TrackDefault.h |
| diff --git a/Source/modules/mediasource/TrackDefault.h b/Source/modules/mediasource/TrackDefault.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..86e54f2ea766c4ecce6890f7972982d7111dbd84 |
| --- /dev/null |
| +++ b/Source/modules/mediasource/TrackDefault.h |
| @@ -0,0 +1,56 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef TrackDefault_h |
| +#define TrackDefault_h |
| + |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace blink { |
| + |
| +class ExceptionState; |
| + |
| +class TrackDefault final : public GarbageCollectedFinalized<TrackDefault>, public ScriptWrappable { |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + enum TrackDefaultTypeCode { |
| + TrackDefaultTypeAudio, |
| + TrackDefaultTypeVideo, |
| + TrackDefaultTypeText |
| + }; |
| + |
| + static TrackDefault* create(const AtomicString& type, const String& language, const String& label, const Vector<String>& kinds, const String& byteStreamTrackID, ExceptionState& exceptionState) |
| + { |
| + return new TrackDefault(type, language, label, kinds, byteStreamTrackID, exceptionState); |
| + } |
| + |
| + static const AtomicString& audioKeyword(); |
| + static const AtomicString& videoKeyword(); |
| + static const AtomicString& textKeyword(); |
| + |
| + virtual ~TrackDefault() { } |
|
sof
2014/11/13 20:45:42
Possible to "outline" its definition?
wolenetz
2014/11/13 22:56:40
Yes, done. Thanks for spotting this.
|
| + |
| + // Implement the IDL |
| + String type() const { return m_type; } |
| + String byteStreamTrackID() const { return m_byteStreamTrackID; } |
| + String language() const { return m_language; } |
| + String label() const { return m_label; } |
| + Vector<String> kinds() const { return m_kinds; } |
| + |
| + void trace(Visitor*) { } |
| + |
| +private: |
| + TrackDefault(const AtomicString& type, const String& language, const String& label, const Vector<String>& kinds, const String& byteStreamTrackID, ExceptionState&); |
| + |
| + AtomicString m_type; |
| + String m_byteStreamTrackID; |
| + String m_language; |
| + String m_label; |
| + Vector<String> m_kinds; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // TrackDefault_h |