Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM CreateOfferRequest.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_CREATEOFFERREQUESTBINDING_H_
#define DOM_CREATEOFFERREQUESTBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/CallbackInterface.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/ToJSValue.h"
#include "nsWeakReference.h"
namespace mozilla {
namespace dom {
class CreateOfferRequest;
struct CreateOfferRequestAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
namespace CreateOfferRequest_Binding {
typedef mozilla::dom::CreateOfferRequest NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::CreateOfferRequest* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::CreateOfferRequest,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::CreateOfferRequest,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace CreateOfferRequest_Binding
class CreateOfferRequestJSImpl : public CallbackInterface
{
public:
explicit inline CreateOfferRequestJSImpl(JSContext* aCx, JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aCallbackGlobal, nsIGlobalObject* aIncumbentGlobal)
: CallbackInterface(aCx, aCallback, aCallbackGlobal, aIncumbentGlobal)
{
}
explicit inline CreateOfferRequestJSImpl(JSObject* aCallback, JSObject* aCallbackGlobal, const FastCallbackConstructor& )
: CallbackInterface(aCallback, aCallbackGlobal, FastCallbackConstructor())
{
}
explicit inline CreateOfferRequestJSImpl(JSObject* aCallback, JSObject* aCallbackGlobal, JSObject* aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
: CallbackInterface(aCallback, aCallbackGlobal, aAsyncStack, aIncumbentGlobal)
{
}
inline bool
operator==(const CreateOfferRequestJSImpl& aOther) const
{
return CallbackInterface::operator==(aOther);
}
uint64_t GetWindowID(ErrorResult& aRv, JS::Realm* aRealm = nullptr);
uint64_t GetInnerWindowID(ErrorResult& aRv, JS::Realm* aRealm = nullptr);
void GetCallID(nsString& aRetVal, ErrorResult& aRv, JS::Realm* aRealm = nullptr);
bool GetIsSecure(ErrorResult& aRv, JS::Realm* aRealm = nullptr);
private:
static bool
InitIds(JSContext* cx, CreateOfferRequestAtoms* atomsCache);
};
class CreateOfferRequest final : public nsSupportsWeakReference,
public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(CreateOfferRequest)
private:
RefPtr<CreateOfferRequestJSImpl> mImpl;
nsCOMPtr<nsIGlobalObject> mParent;
public:
CreateOfferRequest(JS::Handle<JSObject*> aJSImplObject, JS::Handle<JSObject*> aJSImplGlobal, nsIGlobalObject* aParent);
private:
~CreateOfferRequest();
public:
nsISupports* GetParentObject() const;
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
uint64_t GetWindowID(ErrorResult& aRv, JS::Realm* aRealm = nullptr) const;
uint64_t GetInnerWindowID(ErrorResult& aRv, JS::Realm* aRealm = nullptr) const;
void GetCallID(nsString& aRetVal, ErrorResult& aRv, JS::Realm* aRealm = nullptr) const;
bool GetIsSecure(ErrorResult& aRv, JS::Realm* aRealm = nullptr) const;
static bool
_Create(JSContext* cx, unsigned argc, JS::Value* vp);
};
} // namespace mozilla::dom
#endif // DOM_CREATEOFFERREQUESTBINDING_H_