Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1715)

Unified Diff: Source/modules/mediasource/TrackDefault.h

Issue 691313002: MSE: Implement TrackDefault object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased and addressed PS9 comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/VideoTrack.cpp ('k') | Source/modules/mediasource/TrackDefault.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..17358457819b069bcc16b4adc0e9f8e4bbaaaf1f
--- /dev/null
+++ b/Source/modules/mediasource/TrackDefault.h
@@ -0,0 +1,52 @@
+// 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);
+ }
+
+ virtual ~TrackDefault();
+
+ // Implement the IDL
+ AtomicString type() const { return m_type; }
+ String byteStreamTrackID() const { return m_byteStreamTrackID; }
+ String language() const { return m_language; }
+ String label() const { return m_label; }
+ const 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
« no previous file with comments | « Source/core/html/track/VideoTrack.cpp ('k') | Source/modules/mediasource/TrackDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698