summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp b/chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp
new file mode 100644
index 00000000000..c4653cdf48b
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/core/html/track/AudioTrackList.cpp
@@ -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.
+
+#include "config.h"
+#include "core/html/track/AudioTrackList.h"
+
+namespace WebCore {
+
+PassRefPtrWillBeRawPtr<AudioTrackList> AudioTrackList::create(HTMLMediaElement& mediaElement)
+{
+ return adoptRefWillBeRefCountedGarbageCollected(new AudioTrackList(mediaElement));
+}
+
+AudioTrackList::~AudioTrackList()
+{
+}
+
+AudioTrackList::AudioTrackList(HTMLMediaElement& mediaElement)
+ : TrackListBase<AudioTrack>(&mediaElement)
+{
+ ScriptWrappable::init(this);
+}
+
+bool AudioTrackList::hasEnabledTrack() const
+{
+ for (unsigned i = 0; i < length(); ++i) {
+ if (anonymousIndexedGetter(i)->enabled())
+ return true;
+ }
+
+ return false;
+}
+
+const AtomicString& AudioTrackList::interfaceName() const
+{
+ return EventTargetNames::AudioTrackList;
+}
+
+}