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 sts=2 et cindent: */
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 MediaElementAudioSourceNode_h_
8 : #define MediaElementAudioSourceNode_h_
9 :
10 : #include "MediaStreamAudioSourceNode.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : class AudioContext;
16 : struct MediaElementAudioSourceOptions;
17 :
18 0 : class MediaElementAudioSourceNode final : public MediaStreamAudioSourceNode
19 : {
20 : public:
21 : static already_AddRefed<MediaElementAudioSourceNode>
22 : Create(AudioContext& aAudioContext,
23 : const MediaElementAudioSourceOptions& aOptions,
24 : ErrorResult& aRv);
25 :
26 : static already_AddRefed<MediaElementAudioSourceNode>
27 0 : Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
28 : const MediaElementAudioSourceOptions& aOptions, ErrorResult& aRv)
29 : {
30 0 : return Create(aAudioContext, aOptions, aRv);
31 : }
32 :
33 : JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
34 :
35 0 : const char* NodeType() const override
36 : {
37 0 : return "MediaElementAudioSourceNode";
38 : }
39 :
40 0 : const char* CrossOriginErrorString() const override
41 : {
42 0 : return "MediaElementAudioSourceNodeCrossOrigin";
43 : }
44 :
45 0 : size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
46 : {
47 0 : return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
48 : }
49 : private:
50 : explicit MediaElementAudioSourceNode(AudioContext* aContext);
51 : };
52 :
53 : } // namespace dom
54 : } // namespace mozilla
55 :
56 : #endif
|