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#include "config.h"
6#include "core/html/track/AudioTrackList.h"
7
8namespace blink {
9
10PassRefPtrWillBeRawPtr<AudioTrackList> AudioTrackList::create(HTMLMediaElement& mediaElement)
11{
12    return adoptRefWillBeNoop(new AudioTrackList(mediaElement));
13}
14
15AudioTrackList::~AudioTrackList()
16{
17}
18
19AudioTrackList::AudioTrackList(HTMLMediaElement& mediaElement)
20    : TrackListBase<AudioTrack>(&mediaElement)
21{
22}
23
24bool AudioTrackList::hasEnabledTrack() const
25{
26    for (unsigned i = 0; i < length(); ++i) {
27        if (anonymousIndexedGetter(i)->enabled())
28            return true;
29    }
30
31    return false;
32}
33
34const AtomicString& AudioTrackList::interfaceName() const
35{
36    return EventTargetNames::AudioTrackList;
37}
38
39}
40