/* THIS FILE IS AUTOGENERATED FROM ContentAnalysis.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_CONTENTANALYSISBINDING_H_
#define DOM_CONTENTANALYSISBINDING_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 ContentAnalysisConfigJSONAtoms;
struct ContentAnalysisRuleJSON;
struct ContentAnalysisRuleJSONAtoms;
struct ContentAnalysisRuleSetJSON;
struct ContentAnalysisRuleSetJSONAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct MOZ_EMPTY_BASES ContentAnalysisRuleJSON : public MaybeEmptyDictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mActions;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mContentPatterns;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mDomains;
bool mEnabled = false;
MOZ_INIT_OUTSIDE_CTOR nsString mMessage;
MOZ_INIT_OUTSIDE_CTOR nsString mName;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
ContentAnalysisRuleJSON();
explicit inline ContentAnalysisRuleJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
ContentAnalysisRuleJSON(ContentAnalysisRuleJSON&& aOther) = default;
explicit inline ContentAnalysisRuleJSON(const ContentAnalysisRuleJSON& 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);
ContentAnalysisRuleJSON&
operator=(const ContentAnalysisRuleJSON& aOther);
private:
static bool
InitIds(JSContext* cx, ContentAnalysisRuleJSONAtoms* atomsCache);
};
namespace binding_detail {
struct MOZ_EMPTY_BASES FastContentAnalysisRuleJSON : public ContentAnalysisRuleJSON
{
inline FastContentAnalysisRuleJSON()
: ContentAnalysisRuleJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct MOZ_EMPTY_BASES ContentAnalysisRuleSetJSON : public MaybeEmptyDictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Sequence<ContentAnalysisRuleJSON> mRules;
MOZ_INIT_OUTSIDE_CTOR nsString mVersion;
ContentAnalysisRuleSetJSON();
explicit inline ContentAnalysisRuleSetJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
ContentAnalysisRuleSetJSON(ContentAnalysisRuleSetJSON&& aOther) = default;
explicit inline ContentAnalysisRuleSetJSON(const ContentAnalysisRuleSetJSON& 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);
ContentAnalysisRuleSetJSON&
operator=(const ContentAnalysisRuleSetJSON& aOther);
private:
static bool
InitIds(JSContext* cx, ContentAnalysisRuleSetJSONAtoms* atomsCache);
};
namespace binding_detail {
struct MOZ_EMPTY_BASES FastContentAnalysisRuleSetJSON : public ContentAnalysisRuleSetJSON
{
inline FastContentAnalysisRuleSetJSON()
: ContentAnalysisRuleSetJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct MOZ_EMPTY_BASES ContentAnalysisConfigJSON : public MaybeEmptyDictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR ContentAnalysisRuleSetJSON mDLPRules;
ContentAnalysisConfigJSON();
explicit inline ContentAnalysisConfigJSON(const FastDictionaryInitializer& )
: mDLPRules(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
ContentAnalysisConfigJSON(ContentAnalysisConfigJSON&& aOther) = default;
explicit inline ContentAnalysisConfigJSON(const ContentAnalysisConfigJSON& aOther)
: mDLPRules(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);
bool
Init(const nsAString& aJSON);
bool
Init(const nsACString& aJSON);
void
TraceDictionary(JSTracer* trc);
ContentAnalysisConfigJSON&
operator=(const ContentAnalysisConfigJSON& aOther);
private:
static bool
InitIds(JSContext* cx, ContentAnalysisConfigJSONAtoms* atomsCache);
};
namespace binding_detail {
struct MOZ_EMPTY_BASES FastContentAnalysisConfigJSON : public ContentAnalysisConfigJSON
{
inline FastContentAnalysisConfigJSON()
: ContentAnalysisConfigJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace mozilla::dom
#endif // DOM_CONTENTANALYSISBINDING_H_