Chromium Code Reviews| 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..5c580193d273b6b87ee80146e823f57466f51afb |
| --- /dev/null |
| +++ b/Source/modules/mediasource/TrackDefaultList.h |
| @@ -0,0 +1,43 @@ |
| +// 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" |
| +#include "wtf/text/AtomicStringHash.h" |
| +#include "wtf/text/StringHash.h" |
| + |
| +namespace blink { |
| + |
| +class ExceptionState; |
| + |
| +class TrackDefaultList final : public GarbageCollected<TrackDefaultList>, public ScriptWrappable { |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + static TrackDefaultList* create(const HeapVector<Member<TrackDefault>>&, ExceptionState&); |
| + |
| + // Implement the IDL |
| + unsigned length() const { return m_trackDefaults.size(); } |
| + TrackDefault* item(unsigned) const; |
| + |
| + void trace(Visitor*); |
| + |
| +private: |
| + 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.
|
| + typedef HeapHashMap<TypeAndID, Member<TrackDefault>> TypeAndIDToTrackDefaultMap; |
| + |
| + TrackDefaultList(const HeapVector<Member<TrackDefault>>&, const TypeAndIDToTrackDefaultMap&); |
| + |
| + const HeapVector<Member<TrackDefault>> m_trackDefaults; |
| + |
| + // HashMapped index of |m_trackDefaults| for lookup by unique <type, byteStreamTrackID>. |
| + 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.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // TrackDefaultList_h |