/src/mozilla-central/dom/media/AudioTrackList.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
3 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | | |
6 | | #include "mozilla/dom/AudioTrack.h" |
7 | | #include "mozilla/dom/AudioTrackList.h" |
8 | | #include "mozilla/dom/AudioTrackListBinding.h" |
9 | | |
10 | | namespace mozilla { |
11 | | namespace dom { |
12 | | |
13 | | JSObject* |
14 | | AudioTrackList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
15 | 0 | { |
16 | 0 | return AudioTrackList_Binding::Wrap(aCx, this, aGivenProto); |
17 | 0 | } |
18 | | |
19 | | AudioTrack* |
20 | | AudioTrackList::operator[](uint32_t aIndex) |
21 | 0 | { |
22 | 0 | MediaTrack* track = MediaTrackList::operator[](aIndex); |
23 | 0 | return track->AsAudioTrack(); |
24 | 0 | } |
25 | | |
26 | | AudioTrack* |
27 | | AudioTrackList::IndexedGetter(uint32_t aIndex, bool& aFound) |
28 | 0 | { |
29 | 0 | MediaTrack* track = MediaTrackList::IndexedGetter(aIndex, aFound); |
30 | 0 | return track ? track->AsAudioTrack() : nullptr; |
31 | 0 | } |
32 | | |
33 | | AudioTrack* |
34 | | AudioTrackList::GetTrackById(const nsAString& aId) |
35 | 0 | { |
36 | 0 | MediaTrack* track = MediaTrackList::GetTrackById(aId); |
37 | 0 | return track ? track->AsAudioTrack() : nullptr; |
38 | 0 | } |
39 | | |
40 | | } // namespace dom |
41 | | } // namespace mozilla |