Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM LoadURIOptions.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_LOADURIOPTIONSBINDING_H_
#define DOM_LOADURIOPTIONSBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "nsIContentSecurityPolicy.h"
#include "nsIInputStream.h"
#include "nsIPrincipal.h"
#include "nsIReferrerInfo.h"
#include "nsIURI.h"
class nsIContentSecurityPolicy;
class nsIInputStream;
class nsIPrincipal;
class nsIReferrerInfo;
class nsIURI;
namespace mozilla {
namespace dom {
struct LoadURIOptionsAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct LoadURIOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIURI> mBaseURI;
MOZ_INIT_OUTSIDE_CTOR int32_t mCancelContentJSEpoch;
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIContentSecurityPolicy> mCsp;
MOZ_INIT_OUTSIDE_CTOR bool mHasValidUserGestureActivation;
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIInputStream> mHeaders;
MOZ_INIT_OUTSIDE_CTOR int32_t mLoadFlags;
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIInputStream> mPostData;
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIReferrerInfo> mReferrerInfo;
MOZ_INIT_OUTSIDE_CTOR Optional<nsCString> mRemoteTypeOverride;
MOZ_INIT_OUTSIDE_CTOR RefPtr<nsIPrincipal> mTriggeringPrincipal;
MOZ_INIT_OUTSIDE_CTOR Optional<nsCString> mTriggeringRemoteType;
MOZ_INIT_OUTSIDE_CTOR uint32_t mTriggeringSandboxFlags;
MOZ_INIT_OUTSIDE_CTOR bool mTriggeringStorageAccess;
MOZ_INIT_OUTSIDE_CTOR uint64_t mTriggeringWindowId;
MOZ_INIT_OUTSIDE_CTOR bool mWasSchemelessInput;
LoadURIOptions();
explicit inline LoadURIOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
LoadURIOptions(LoadURIOptions&& aOther) = default;
explicit inline LoadURIOptions(const LoadURIOptions& 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);
inline void
TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
{
ImplCycleCollectionTraverse(aCallback, mBaseURI, "mBaseURI", aFlags);
ImplCycleCollectionTraverse(aCallback, mCsp, "mCsp", aFlags);
ImplCycleCollectionTraverse(aCallback, mHeaders, "mHeaders", aFlags);
ImplCycleCollectionTraverse(aCallback, mPostData, "mPostData", aFlags);
ImplCycleCollectionTraverse(aCallback, mReferrerInfo, "mReferrerInfo", aFlags);
ImplCycleCollectionTraverse(aCallback, mTriggeringPrincipal, "mTriggeringPrincipal", aFlags);
}
inline void
UnlinkForCC()
{
ImplCycleCollectionUnlink(mBaseURI);
ImplCycleCollectionUnlink(mCsp);
ImplCycleCollectionUnlink(mHeaders);
ImplCycleCollectionUnlink(mPostData);
ImplCycleCollectionUnlink(mReferrerInfo);
ImplCycleCollectionUnlink(mTriggeringPrincipal);
}
LoadURIOptions&
operator=(const LoadURIOptions& aOther);
private:
static bool
InitIds(JSContext* cx, LoadURIOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastLoadURIOptions : public LoadURIOptions
{
inline FastLoadURIOptions()
: LoadURIOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace mozilla::dom
#endif // DOM_LOADURIOPTIONSBINDING_H_