tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AudioParamMap.h (1027B)


      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 AudioParamMap_h_
      8 #define AudioParamMap_h_
      9 
     10 #include "AudioWorkletNode.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla::dom {
     14 
     15 class AudioParamMap final : public nsWrapperCache {
     16 public:
     17  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AudioParamMap)
     18  NS_DECL_CYCLE_COLLECTION_NATIVE_WRAPPERCACHE_CLASS(AudioParamMap)
     19 
     20  explicit AudioParamMap(AudioWorkletNode* aParent);
     21 
     22  AudioWorkletNode* GetParentObject() const { return mParent; }
     23 
     24  JSObject* WrapObject(JSContext* aCx,
     25                       JS::Handle<JSObject*> aGivenProto) override;
     26 
     27 private:
     28  ~AudioParamMap() = default;
     29  RefPtr<AudioWorkletNode> mParent;
     30 };
     31 
     32 }  // namespace mozilla::dom
     33 
     34 #endif  // AudioParamMap_h_