Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim:set ts=2 sw=2 et tw=78: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_AudioTrackList_h
8 : #define mozilla_dom_AudioTrackList_h
9 :
10 : #include "MediaTrack.h"
11 : #include "MediaTrackList.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class AudioTrack;
17 :
18 0 : class AudioTrackList : public MediaTrackList
19 : {
20 : public:
21 0 : AudioTrackList(nsPIDOMWindowInner* aOwnerWindow, HTMLMediaElement* aMediaElement)
22 0 : : MediaTrackList(aOwnerWindow, aMediaElement) {}
23 :
24 : JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
25 :
26 : AudioTrack* operator[](uint32_t aIndex);
27 :
28 : // WebIDL
29 : AudioTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
30 :
31 : AudioTrack* GetTrackById(const nsAString& aId);
32 :
33 : protected:
34 0 : AudioTrackList* AsAudioTrackList() override { return this; }
35 : };
36 :
37 : } // namespace dom
38 : } // namespace mozilla
39 :
40 : #endif // mozilla_dom_AudioTrackList_h
|