/src/mozilla-central/dom/media/webaudio/AudioWorkletNode.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
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 https://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef AudioWorkletNode_h_ |
8 | | #define AudioWorkletNode_h_ |
9 | | |
10 | | #include "AudioNode.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | class AudioParamMap; |
16 | | struct AudioWorkletNodeOptions; |
17 | | class MessagePort; |
18 | | |
19 | | class AudioWorkletNode : public AudioNode |
20 | | { |
21 | | public: |
22 | | |
23 | | NS_DECL_ISUPPORTS_INHERITED |
24 | | |
25 | | IMPL_EVENT_HANDLER(processorerror) |
26 | | |
27 | | static already_AddRefed<AudioWorkletNode> |
28 | | Constructor(const GlobalObject& aGlobal, |
29 | | AudioContext& aAudioContext, |
30 | | const nsAString& aName, |
31 | | const AudioWorkletNodeOptions& aOptions, |
32 | | ErrorResult& aRv); |
33 | | |
34 | | AudioParamMap* GetParameters(ErrorResult& aRv) const; |
35 | | |
36 | | MessagePort* GetPort(ErrorResult& aRv) const; |
37 | | |
38 | | JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
39 | | |
40 | | const char* NodeType() const override |
41 | 0 | { |
42 | 0 | return "AudioWorkletNode"; |
43 | 0 | } |
44 | | |
45 | | size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override; |
46 | | size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override; |
47 | | |
48 | | private: |
49 | | AudioWorkletNode(AudioContext* aAudioContext, const nsAString& aName); |
50 | 0 | ~AudioWorkletNode() = default; |
51 | | |
52 | | nsString mNodeName; |
53 | | }; |
54 | | |
55 | | } // namespace dom |
56 | | } // namespace mozilla |
57 | | |
58 | | #endif // AudioWorkletNode_h_ |