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

Side by Side 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: Implementation for realz Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef TrackDefaultList_h
6 #define TrackDefaultList_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/mediasource/TrackDefault.h"
10 #include "platform/heap/Handle.h"
11 #include "wtf/text/AtomicStringHash.h"
12 #include "wtf/text/StringHash.h"
13
14 namespace blink {
15
16 class ExceptionState;
17
18 class TrackDefaultList final : public GarbageCollectedFinalized<TrackDefaultList >, public ScriptWrappable {
sof 2014/12/03 19:15:40 This can be a non-finalized class; have it derive
wolenetz 2014/12/11 23:52:39 Done.
19 DEFINE_WRAPPERTYPEINFO();
20 public:
21 static TrackDefaultList* create(const HeapVector<Member<TrackDefault>>& trac kDefaults, ExceptionState& exceptionState)
22 {
23 return new TrackDefaultList(trackDefaults, exceptionState);
24 }
25
26 virtual ~TrackDefaultList() { }
27
28 // Implement the IDL
29 unsigned length() const { return m_trackDefaults.size(); }
30 TrackDefault* item(unsigned) const;
31
32 void trace(Visitor*);
33
34 private:
35 TrackDefaultList(const HeapVector<Member<TrackDefault>>&, ExceptionState&);
36
37 HeapVector<Member<TrackDefault>> m_trackDefaults;
38
39 // HashMapped index of |m_trackDefaults| for lookup by unique <type,
40 // byteStreamTrackID>.
41 typedef std::pair<AtomicString, String> TypeAndID;
42 typedef HeapHashMap<TypeAndID, Member<TrackDefault>> TypeAndIDToTrackDefault Map;
43 TypeAndIDToTrackDefaultMap m_typeAndIDToTrackDefaultMap;
44 };
45
46 } // namespace blink
47
48 #endif // TrackDefaultList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698