Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 GarbageCollected<TrackDefaultList>, public ScriptWrappable { | |
| 19 DEFINE_WRAPPERTYPEINFO(); | |
| 20 public: | |
| 21 static TrackDefaultList* create(const HeapVector<Member<TrackDefault>>&, Exc eptionState&); | |
| 22 | |
| 23 // Implement the IDL | |
| 24 unsigned length() const { return m_trackDefaults.size(); } | |
| 25 TrackDefault* item(unsigned) const; | |
| 26 | |
| 27 void trace(Visitor*); | |
| 28 | |
| 29 private: | |
| 30 typedef std::pair<AtomicString, String> TypeAndID; | |
|
sof
2014/12/12 09:37:00
nit: switch to the du jour 'using'?
wolenetz
2014/12/12 19:18:31
I assume you mean:
using std::pair;
typedef pair<A
wolenetz
2014/12/12 21:48:05
Done.
| |
| 31 typedef HeapHashMap<TypeAndID, Member<TrackDefault>> TypeAndIDToTrackDefault Map; | |
| 32 | |
| 33 TrackDefaultList(const HeapVector<Member<TrackDefault>>&, const TypeAndIDToT rackDefaultMap&); | |
| 34 | |
| 35 const HeapVector<Member<TrackDefault>> m_trackDefaults; | |
| 36 | |
| 37 // HashMapped index of |m_trackDefaults| for lookup by unique <type, byteStr eamTrackID>. | |
| 38 const TypeAndIDToTrackDefaultMap m_typeAndIDToTrackDefaultMap; | |
|
philipj_slow
2014/12/12 20:25:21
This is never used, just traced. I guess a bunch o
wolenetz
2014/12/12 21:48:05
Done.
| |
| 39 }; | |
| 40 | |
| 41 } // namespace blink | |
| 42 | |
| 43 #endif // TrackDefaultList_h | |
| OLD | NEW |