Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM AudioWorkletGlobalScope.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_AUDIOWORKLETGLOBALSCOPEBINDING_H_
#define DOM_AUDIOWORKLETGLOBALSCOPEBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/CallbackFunction.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/ToJSValue.h"
namespace mozilla {
namespace dom {
class AudioWorkletGlobalScope;
class AudioWorkletProcessor;
class AudioWorkletProcessorConstructor;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
class AudioWorkletProcessorConstructor : public CallbackFunction
{
public:
explicit inline AudioWorkletProcessorConstructor(JSContext* aCx, JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aCallbackGlobal, nsIGlobalObject* aIncumbentGlobal)
: CallbackFunction(aCx, aCallback, aCallbackGlobal, aIncumbentGlobal)
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline AudioWorkletProcessorConstructor(JSObject* aCallback, JSObject* aCallbackGlobal, const FastCallbackConstructor& )
: CallbackFunction(aCallback, aCallbackGlobal, FastCallbackConstructor())
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline AudioWorkletProcessorConstructor(JSObject* aCallback, JSObject* aCallbackGlobal, JSObject* aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
: CallbackFunction(aCallback, aCallbackGlobal, aAsyncStack, aIncumbentGlobal)
{
MOZ_ASSERT(JS::IsCallable(mCallback));
}
explicit inline AudioWorkletProcessorConstructor(CallbackFunction* aOther)
: CallbackFunction(aOther)
{
}
MOZ_CAN_RUN_SCRIPT already_AddRefed<AudioWorkletProcessor> Construct(JS::Handle<JSObject*> options, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JS::Realm* aRealm = nullptr);
inline bool
operator==(const AudioWorkletProcessorConstructor& aOther) const
{
return CallbackFunction::operator==(aOther);
}
};
namespace binding_detail {
class FastAudioWorkletProcessorConstructor : public AudioWorkletProcessorConstructor
{
public:
explicit inline FastAudioWorkletProcessorConstructor(JSObject* aCallback, JSObject* aCallbackGlobal)
: AudioWorkletProcessorConstructor(aCallback, aCallbackGlobal, FastCallbackConstructor())
{
}
inline void
Trace(JSTracer* aTracer)
{
AudioWorkletProcessorConstructor::Trace(aTracer);
}
inline void
FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx)
{
AudioWorkletProcessorConstructor::FinishSlowJSInitIfMoreThanOneOwner(aCx);
}
};
} // namespace binding_detail
namespace AudioWorkletGlobalScope_Binding {
typedef mozilla::dom::AudioWorkletGlobalScope NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::AudioWorkletGlobalScope* aObject, nsWrapperCache* aCache, JS::RealmOptions& aOptions, JSPrincipals* aPrincipal, JS::MutableHandle<JSObject*> aReflector);
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::AudioWorkletGlobalScope,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace AudioWorkletGlobalScope_Binding
} // namespace mozilla::dom
#endif // DOM_AUDIOWORKLETGLOBALSCOPEBINDING_H_