Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/MediaStreamAudioDestinationNode.h
Line
Count
Source (jump to first uncovered line)
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 MediaStreamAudioDestinationNode_h_
8
#define MediaStreamAudioDestinationNode_h_
9
10
#include "AudioNode.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class AudioContext;
16
struct AudioNodeOptions;
17
18
class MediaStreamAudioDestinationNode final : public AudioNode
19
{
20
public:
21
  static already_AddRefed<MediaStreamAudioDestinationNode>
22
  Create(AudioContext& aAudioContext, const AudioNodeOptions& aOptions,
23
         ErrorResult& aRv);
24
25
  NS_DECL_ISUPPORTS_INHERITED
26
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamAudioDestinationNode, AudioNode)
27
28
  static already_AddRefed<MediaStreamAudioDestinationNode>
29
  Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
30
              const AudioNodeOptions& aOptions, ErrorResult& aRv)
31
0
  {
32
0
    return Create(aAudioContext, aOptions, aRv);
33
0
  }
34
35
  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
36
37
  uint16_t NumberOfOutputs() const final
38
  {
39
    return 0;
40
  }
41
42
  void DestroyMediaStream() override;
43
44
  DOMMediaStream* DOMStream() const
45
0
  {
46
0
    return mDOMStream;
47
0
  }
48
49
  const char* NodeType() const override
50
  {
51
    return "MediaStreamAudioDestinationNode";
52
  }
53
54
  size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
55
  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
56
57
private:
58
  explicit MediaStreamAudioDestinationNode(AudioContext* aContext);
59
  ~MediaStreamAudioDestinationNode() = default;
60
61
  RefPtr<DOMMediaStream> mDOMStream;
62
  RefPtr<MediaInputPort> mPort;
63
};
64
65
} // namespace dom
66
} // namespace mozilla
67
68
#endif