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

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

Issue 702583002: MSE: Implement TrackDefaultList object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@WIP_blink_trackdefaults_and_add_tracks_to_init_segment_processing
Patch Set: 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
Index: Source/modules/mediasource/TrackDefaultList.h
diff --git a/Source/modules/mediasource/TrackDefaultList.h b/Source/modules/mediasource/TrackDefaultList.h
new file mode 100644
index 0000000000000000000000000000000000000000..aba79bd7877418005587177cde6ccb8bb1f6febb
--- /dev/null
+++ b/Source/modules/mediasource/TrackDefaultList.h
@@ -0,0 +1,40 @@
+// 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 TrackDefaultList_h
+#define TrackDefaultList_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "modules/mediasource/TrackDefault.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ExceptionState;
+
+class TrackDefaultList final : public GarbageCollectedFinalized<TrackDefaultList>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static TrackDefaultList* create(const Vector<TrackDefault>& trackDefaults, ExceptionState& exceptionState)
+ {
+ return new TrackDefaultList(trackDefaults, exceptionState);
+ }
+
+ virtual ~TrackDefaultList() { }
+
+ // Implement the IDL
+ unsigned long length() const { return m_trackDefaults.size(); }
philipj_slow 2014/11/14 12:12:27 Just unsigned, see https://codereview.chromium.org
wolenetz 2014/12/03 01:09:56 Done, and done for item(), too. Thanks for pointin
+ TrackDefault* item(unsigned long) const;
+
+ void trace(Visitor* visitor) { visitor->trace(m_trackDefaults); }
+
+private:
+ TrackDefaultList(const Vector<TrackDefault>&, ExceptionState&);
+
+ HeapVector<Member<TrackDefault> > m_trackDefaults;
philipj_slow 2014/11/14 12:12:27 The extra space in nested templates is no longer r
wolenetz 2014/12/03 01:09:56 Done.
+};
+
+} // namespace blink
+
+#endif // TrackDefaultList_h
« no previous file with comments | « no previous file | Source/modules/mediasource/TrackDefaultList.cpp » ('j') | Source/modules/mediasource/TrackDefaultList.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698