Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM JSWindowActor.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_JSWINDOWACTORBINDING_H_
#define DOM_JSWINDOWACTORBINDING_H_
#include "EventTargetBinding.h"
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/Record.h"
namespace mozilla {
namespace dom {
class JSWindowActorChild;
class JSWindowActorParent;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct WindowActorChildOptions;
struct WindowActorChildOptionsAtoms;
struct WindowActorEventListenerOptions;
struct WindowActorEventListenerOptionsAtoms;
struct WindowActorOptionsAtoms;
struct WindowActorSidedOptions;
struct WindowActorSidedOptionsAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct WindowActorEventListenerOptions : public AddEventListenerOptions
{
MOZ_INIT_OUTSIDE_CTOR bool mCreateActor;
WindowActorEventListenerOptions();
explicit inline WindowActorEventListenerOptions(const FastDictionaryInitializer& )
: AddEventListenerOptions(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
WindowActorEventListenerOptions(WindowActorEventListenerOptions&& aOther) = default;
explicit inline WindowActorEventListenerOptions(const WindowActorEventListenerOptions& aOther)
: AddEventListenerOptions(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
inline void
TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
{
AddEventListenerOptions::TraverseForCC(aCallback, aFlags);
}
inline void
UnlinkForCC()
{
AddEventListenerOptions::UnlinkForCC();
}
WindowActorEventListenerOptions&
operator=(const WindowActorEventListenerOptions& aOther);
private:
static bool
InitIds(JSContext* cx, WindowActorEventListenerOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastWindowActorEventListenerOptions : public WindowActorEventListenerOptions
{
inline FastWindowActorEventListenerOptions()
: WindowActorEventListenerOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct WindowActorSidedOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsCString> mEsModuleURI;
MOZ_INIT_OUTSIDE_CTOR Optional<nsCString> mModuleURI;
WindowActorSidedOptions();
explicit inline WindowActorSidedOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
WindowActorSidedOptions(WindowActorSidedOptions&& aOther) = default;
explicit inline WindowActorSidedOptions(const WindowActorSidedOptions& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
WindowActorSidedOptions&
operator=(const WindowActorSidedOptions& aOther);
private:
static bool
InitIds(JSContext* cx, WindowActorSidedOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastWindowActorSidedOptions : public WindowActorSidedOptions
{
inline FastWindowActorSidedOptions()
: WindowActorSidedOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct WindowActorChildOptions : public WindowActorSidedOptions
{
MOZ_INIT_OUTSIDE_CTOR Optional<Record<nsString, WindowActorEventListenerOptions>> mEvents;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsCString>> mObservers;
WindowActorChildOptions();
explicit inline WindowActorChildOptions(const FastDictionaryInitializer& )
: WindowActorSidedOptions(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
WindowActorChildOptions(WindowActorChildOptions&& aOther) = default;
private:
WindowActorChildOptions(const WindowActorChildOptions&) = delete;
WindowActorChildOptions& operator=(const WindowActorChildOptions&) = delete;
static bool
InitIds(JSContext* cx, WindowActorChildOptionsAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastWindowActorChildOptions : public WindowActorChildOptions
{
inline FastWindowActorChildOptions()
: WindowActorChildOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct WindowActorOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR bool mAllFrames;
MOZ_INIT_OUTSIDE_CTOR Optional<WindowActorChildOptions> mChild;
MOZ_INIT_OUTSIDE_CTOR bool mIncludeChrome;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mMatches;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mMessageManagerGroups;
MOZ_INIT_OUTSIDE_CTOR Optional<WindowActorSidedOptions> mParent;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsCString>> mRemoteTypes;
WindowActorOptions();
explicit inline WindowActorOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
WindowActorOptions(WindowActorOptions&& aOther) = default;
private:
WindowActorOptions(const WindowActorOptions&) = delete;
WindowActorOptions& operator=(const WindowActorOptions&) = delete;
static bool
InitIds(JSContext* cx, WindowActorOptionsAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastWindowActorOptions : public WindowActorOptions
{
inline FastWindowActorOptions()
: WindowActorOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace JSWindowActorChild_Binding {
typedef mozilla::dom::JSWindowActorChild NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::JSWindowActorChild* 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, 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::JSWindowActorChild,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace JSWindowActorChild_Binding
namespace JSWindowActorParent_Binding {
typedef mozilla::dom::JSWindowActorParent NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::JSWindowActorParent* 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, 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::JSWindowActorParent,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace JSWindowActorParent_Binding
} // namespace mozilla::dom
#endif // DOM_JSWINDOWACTORBINDING_H_