From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- dom/media/webrtc/jsapi/RTCRtpScriptTransform.h | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 dom/media/webrtc/jsapi/RTCRtpScriptTransform.h (limited to 'dom/media/webrtc/jsapi/RTCRtpScriptTransform.h') diff --git a/dom/media/webrtc/jsapi/RTCRtpScriptTransform.h b/dom/media/webrtc/jsapi/RTCRtpScriptTransform.h new file mode 100644 index 0000000000..362c59b761 --- /dev/null +++ b/dom/media/webrtc/jsapi/RTCRtpScriptTransform.h @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#ifndef MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCRTPSCRIPTTRANSFORM_H_ +#define MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCRTPSCRIPTTRANSFORM_H_ + +#include "nsISupports.h" +#include "nsWrapperCache.h" +#include "mozilla/RefPtr.h" +#include "mozilla/Maybe.h" +#include "js/RootingAPI.h" +#include "nsTArray.h" + +class nsPIDOMWindowInner; + +namespace mozilla { +class FrameTransformerProxy; +class ErrorResult; + +namespace dom { +class Worker; +class GlobalObject; +template +class Sequence; +template +class Optional; + +class RTCRtpScriptTransform : public nsISupports, public nsWrapperCache { + public: + static already_AddRefed Constructor( + const GlobalObject& aGlobal, Worker& aWorker, + JS::Handle aOptions, + const Optional>& aTransfer, ErrorResult& aRv); + + explicit RTCRtpScriptTransform(nsPIDOMWindowInner* aWindow); + + // nsISupports + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(RTCRtpScriptTransform) + + JSObject* WrapObject(JSContext* aCx, + JS::Handle aGivenProto) override; + + nsPIDOMWindowInner* GetParentObject() const { return mWindow; } + + FrameTransformerProxy& GetProxy() { return *mProxy; } + + bool IsClaimed() const { return mClaimed; } + void SetClaimed() { mClaimed = true; } + + private: + virtual ~RTCRtpScriptTransform(); + RefPtr mWindow; + RefPtr mProxy; + bool mClaimed = false; +}; + +} // namespace dom +} // namespace mozilla +#endif // MOZILLA_DOM_MEDIA_WEBRTC_JSAPI_RTCRTPSCRIPTTRANSFORM_H_ -- cgit v1.2.3