Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM OriginAttributes.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_ORIGINATTRIBUTESBINDING_H_
#define DOM_ORIGINATTRIBUTESBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
struct OriginAttributesDictionaryAtoms;
struct OriginAttributesPatternDictionaryAtoms;
struct PartitionKeyPatternDictionary;
struct PartitionKeyPatternDictionaryAtoms;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct OriginAttributesDictionary : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mFirstPartyDomain;
MOZ_INIT_OUTSIDE_CTOR nsString mGeckoViewSessionContextId;
MOZ_INIT_OUTSIDE_CTOR nsString mPartitionKey;
MOZ_INIT_OUTSIDE_CTOR uint32_t mPrivateBrowsingId;
MOZ_INIT_OUTSIDE_CTOR uint32_t mUserContextId;
OriginAttributesDictionary();
explicit inline OriginAttributesDictionary(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
OriginAttributesDictionary(OriginAttributesDictionary&& aOther) = default;
explicit inline OriginAttributesDictionary(const OriginAttributesDictionary& 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);
bool
Init(const nsAString& aJSON);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
OriginAttributesDictionary&
operator=(const OriginAttributesDictionary& aOther);
bool
operator==(const OriginAttributesDictionary& aOther) const;
private:
static bool
InitIds(JSContext* cx, OriginAttributesDictionaryAtoms* atomsCache);
};
namespace binding_detail {
struct FastOriginAttributesDictionary : public OriginAttributesDictionary
{
inline FastOriginAttributesDictionary()
: OriginAttributesDictionary(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PartitionKeyPatternDictionary : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mBaseDomain;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mForeignByAncestorContext;
MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mPort;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mScheme;
PartitionKeyPatternDictionary();
explicit inline PartitionKeyPatternDictionary(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PartitionKeyPatternDictionary(PartitionKeyPatternDictionary&& aOther) = default;
explicit inline PartitionKeyPatternDictionary(const PartitionKeyPatternDictionary& 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);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
PartitionKeyPatternDictionary&
operator=(const PartitionKeyPatternDictionary& aOther);
private:
static bool
InitIds(JSContext* cx, PartitionKeyPatternDictionaryAtoms* atomsCache);
};
namespace binding_detail {
struct FastPartitionKeyPatternDictionary : public PartitionKeyPatternDictionary
{
inline FastPartitionKeyPatternDictionary()
: PartitionKeyPatternDictionary(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct OriginAttributesPatternDictionary : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mFirstPartyDomain;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mGeckoViewSessionContextId;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mPartitionKey;
MOZ_INIT_OUTSIDE_CTOR Optional<PartitionKeyPatternDictionary> mPartitionKeyPattern;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mPrivateBrowsingId;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mUserContextId;
OriginAttributesPatternDictionary();
explicit inline OriginAttributesPatternDictionary(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
OriginAttributesPatternDictionary(OriginAttributesPatternDictionary&& aOther) = default;
explicit inline OriginAttributesPatternDictionary(const OriginAttributesPatternDictionary& 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);
bool
Init(const nsAString& aJSON);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
bool
ToJSON(nsAString& aJSON) const;
void
TraceDictionary(JSTracer* trc);
OriginAttributesPatternDictionary&
operator=(const OriginAttributesPatternDictionary& aOther);
private:
static bool
InitIds(JSContext* cx, OriginAttributesPatternDictionaryAtoms* atomsCache);
};
namespace binding_detail {
struct FastOriginAttributesPatternDictionary : public OriginAttributesPatternDictionary
{
inline FastOriginAttributesPatternDictionary()
: OriginAttributesPatternDictionary(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace mozilla::dom
#endif // DOM_ORIGINATTRIBUTESBINDING_H_