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

Unified Diff: Source/core/html/track/AudioTrackList.cpp

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/AudioTrackList.h ('k') | Source/core/html/track/AudioTrackList.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/AudioTrackList.cpp
diff --git a/Source/core/html/track/AudioTrackList.cpp b/Source/core/html/track/AudioTrackList.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c4653cdf48b93b3e421cdf217feb8780bf35b9b9
--- /dev/null
+++ b/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;
+}
+
+}
« no previous file with comments | « Source/core/html/track/AudioTrackList.h ('k') | Source/core/html/track/AudioTrackList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698