/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsILoadInfo.idl
 */

#ifndef __gen_nsILoadInfo_h__
#define __gen_nsILoadInfo_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsIContentPolicy_h__
#include "nsIContentPolicy.h"
#endif

#include "js/Value.h"

#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMDocument; /* forward declaration */

class nsINode; /* forward declaration */

class nsIPrincipal; /* forward declaration */

class nsIURI; /* forward declaration */

#include "nsTArray.h"
typedef uint32_t  nsSecurityFlags;


/* starting interface:    nsILoadInfo */
#define NS_ILOADINFO_IID_STR "cc51498e-f8f8-469d-85ba-6dcba17027e4"

#define NS_ILOADINFO_IID \
  {0xcc51498e, 0xf8f8, 0x469d, \
    { 0x85, 0xba, 0x6d, 0xcb, 0xa1, 0x70, 0x27, 0xe4 }}

class nsILoadInfo : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOADINFO_IID)

  enum {
    SEC_NORMAL = 0U,
    SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS = 1U,
    SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED = 2U,
    SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS = 4U,
    SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL = 8U,
    SEC_REQUIRE_CORS_DATA_INHERITS = 16U,
    SEC_REQUIRE_CORS_WITH_CREDENTIALS = 32U,
    SEC_FORCE_INHERIT_PRINCIPAL = 64U,
    SEC_SANDBOXED = 128U,
    SEC_ABOUT_BLANK_INHERITS = 256U
  };

  /* readonly attribute nsIPrincipal loadingPrincipal; */
  NS_IMETHOD GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal) = 0;

  /* [binaryname(LoadingPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryLoadingPrincipal (); */
  virtual nsIPrincipal * LoadingPrincipal(void) = 0;

  /* readonly attribute nsIPrincipal triggeringPrincipal; */
  NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal) = 0;

  /* [binaryname(TriggeringPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryTriggeringPrincipal (); */
  virtual nsIPrincipal * TriggeringPrincipal(void) = 0;

  /* readonly attribute nsIDOMDocument loadingDocument; */
  NS_IMETHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument) = 0;

  /* [binaryname(LoadingNode),noscript,nostdcall,notxpcom] nsINode binaryLoadingNode (); */
  virtual nsINode * LoadingNode(void) = 0;

  /* readonly attribute nsSecurityFlags securityFlags; */
  NS_IMETHOD GetSecurityFlags(nsSecurityFlags *aSecurityFlags) = 0;

   inline nsSecurityFlags GetSecurityFlags()
  {
    nsSecurityFlags result;
    mozilla::DebugOnly<nsresult> rv = GetSecurityFlags(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* [infallible] readonly attribute unsigned long securityMode; */
  NS_IMETHOD GetSecurityMode(uint32_t *aSecurityMode) = 0;
  inline uint32_t GetSecurityMode()
  {
    uint32_t result;
    mozilla::DebugOnly<nsresult> rv = GetSecurityMode(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean requireCorsWithCredentials; */
  NS_IMETHOD GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials) = 0;
  inline bool GetRequireCorsWithCredentials()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetRequireCorsWithCredentials(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean forceInheritPrincipal; */
  NS_IMETHOD GetForceInheritPrincipal(bool *aForceInheritPrincipal) = 0;
  inline bool GetForceInheritPrincipal()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetForceInheritPrincipal(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean loadingSandboxed; */
  NS_IMETHOD GetLoadingSandboxed(bool *aLoadingSandboxed) = 0;
  inline bool GetLoadingSandboxed()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetLoadingSandboxed(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean aboutBlankInherits; */
  NS_IMETHOD GetAboutBlankInherits(bool *aAboutBlankInherits) = 0;
  inline bool GetAboutBlankInherits()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAboutBlankInherits(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* readonly attribute nsContentPolicyType contentPolicyType; */
  NS_IMETHOD GetContentPolicyType(nsContentPolicyType *aContentPolicyType) = 0;

   inline nsContentPolicyType GetContentPolicyType()
  {
    nsContentPolicyType result;
    mozilla::DebugOnly<nsresult> rv = GetContentPolicyType(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* [noscript,notxpcom] nsContentPolicyType internalContentPolicyType (); */
  NS_IMETHOD_(nsContentPolicyType) InternalContentPolicyType(void) = 0;

  /* readonly attribute nsIURI baseURI; */
  NS_IMETHOD GetBaseURI(nsIURI * *aBaseURI) = 0;

  /* [binaryname(BaseURI),noscript,nostdcall,notxpcom] nsIURI binaryBaseURI (); */
  virtual nsIURI * BaseURI(void) = 0;

  /* readonly attribute boolean upgradeInsecureRequests; */
  NS_IMETHOD GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests) = 0;

   inline bool GetUpgradeInsecureRequests()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetUpgradeInsecureRequests(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* readonly attribute unsigned long long innerWindowID; */
  NS_IMETHOD GetInnerWindowID(uint64_t *aInnerWindowID) = 0;

  /* readonly attribute unsigned long long outerWindowID; */
  NS_IMETHOD GetOuterWindowID(uint64_t *aOuterWindowID) = 0;

  /* readonly attribute unsigned long long parentOuterWindowID; */
  NS_IMETHOD GetParentOuterWindowID(uint64_t *aParentOuterWindowID) = 0;

   inline uint64_t GetInnerWindowID()
  {
    uint64_t result;
    mozilla::DebugOnly<nsresult> rv = GetInnerWindowID(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  inline uint64_t GetOuterWindowID()
  {
    uint64_t result;
    mozilla::DebugOnly<nsresult> rv = GetOuterWindowID(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  inline uint64_t GetParentOuterWindowID()
  {
    uint64_t result;
    mozilla::DebugOnly<nsresult> rv = GetParentOuterWindowID(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* attribute bool enforceSecurity; */
  NS_IMETHOD GetEnforceSecurity(bool *aEnforceSecurity) = 0;
  NS_IMETHOD SetEnforceSecurity(bool aEnforceSecurity) = 0;

   inline bool GetEnforceSecurity()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetEnforceSecurity(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* attribute bool initialSecurityCheckDone; */
  NS_IMETHOD GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone) = 0;
  NS_IMETHOD SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone) = 0;

   inline bool GetInitialSecurityCheckDone()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetInitialSecurityCheckDone(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  /* void appendRedirectedPrincipal (in nsIPrincipal aPrincipal); */
  NS_IMETHOD AppendRedirectedPrincipal(nsIPrincipal *aPrincipal) = 0;

  /* [implicit_jscontext] readonly attribute jsval redirectChain; */
  NS_IMETHOD GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain) = 0;

  /* [binaryname(RedirectChain),noscript,nostdcall,notxpcom] const_nsIPrincipalArray binaryRedirectChain (); */
  virtual const nsTArray<nsCOMPtr<nsIPrincipal>> & RedirectChain(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsILoadInfo, NS_ILOADINFO_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILOADINFO \
  NS_IMETHOD GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal) override; \
  virtual nsIPrincipal * LoadingPrincipal(void) override; \
  NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal) override; \
  virtual nsIPrincipal * TriggeringPrincipal(void) override; \
  NS_IMETHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument) override; \
  virtual nsINode * LoadingNode(void) override; \
  NS_IMETHOD GetSecurityFlags(nsSecurityFlags *aSecurityFlags) override; \
  using nsILoadInfo::GetSecurityMode; \
  NS_IMETHOD GetSecurityMode(uint32_t *aSecurityMode) override; \
  using nsILoadInfo::GetRequireCorsWithCredentials; \
  NS_IMETHOD GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials) override; \
  using nsILoadInfo::GetForceInheritPrincipal; \
  NS_IMETHOD GetForceInheritPrincipal(bool *aForceInheritPrincipal) override; \
  using nsILoadInfo::GetLoadingSandboxed; \
  NS_IMETHOD GetLoadingSandboxed(bool *aLoadingSandboxed) override; \
  using nsILoadInfo::GetAboutBlankInherits; \
  NS_IMETHOD GetAboutBlankInherits(bool *aAboutBlankInherits) override; \
  NS_IMETHOD GetContentPolicyType(nsContentPolicyType *aContentPolicyType) override; \
  NS_IMETHOD_(nsContentPolicyType) InternalContentPolicyType(void) override; \
  NS_IMETHOD GetBaseURI(nsIURI * *aBaseURI) override; \
  virtual nsIURI * BaseURI(void) override; \
  NS_IMETHOD GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests) override; \
  NS_IMETHOD GetInnerWindowID(uint64_t *aInnerWindowID) override; \
  NS_IMETHOD GetOuterWindowID(uint64_t *aOuterWindowID) override; \
  NS_IMETHOD GetParentOuterWindowID(uint64_t *aParentOuterWindowID) override; \
  NS_IMETHOD GetEnforceSecurity(bool *aEnforceSecurity) override; \
  NS_IMETHOD SetEnforceSecurity(bool aEnforceSecurity) override; \
  NS_IMETHOD GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone) override; \
  NS_IMETHOD SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone) override; \
  NS_IMETHOD AppendRedirectedPrincipal(nsIPrincipal *aPrincipal) override; \
  NS_IMETHOD GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain) override; \
  virtual const nsTArray<nsCOMPtr<nsIPrincipal>> & RedirectChain(void) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSILOADINFO \
  NS_METHOD GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal); \
  nsIPrincipal * LoadingPrincipal(void); \
  NS_METHOD GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal); \
  nsIPrincipal * TriggeringPrincipal(void); \
  NS_METHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument); \
  nsINode * LoadingNode(void); \
  NS_METHOD GetSecurityFlags(nsSecurityFlags *aSecurityFlags); \
  using nsILoadInfo::GetSecurityMode; \
  NS_METHOD GetSecurityMode(uint32_t *aSecurityMode); \
  using nsILoadInfo::GetRequireCorsWithCredentials; \
  NS_METHOD GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials); \
  using nsILoadInfo::GetForceInheritPrincipal; \
  NS_METHOD GetForceInheritPrincipal(bool *aForceInheritPrincipal); \
  using nsILoadInfo::GetLoadingSandboxed; \
  NS_METHOD GetLoadingSandboxed(bool *aLoadingSandboxed); \
  using nsILoadInfo::GetAboutBlankInherits; \
  NS_METHOD GetAboutBlankInherits(bool *aAboutBlankInherits); \
  NS_METHOD GetContentPolicyType(nsContentPolicyType *aContentPolicyType); \
  NS_METHOD_(nsContentPolicyType) InternalContentPolicyType(void); \
  NS_METHOD GetBaseURI(nsIURI * *aBaseURI); \
  nsIURI * BaseURI(void); \
  NS_METHOD GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests); \
  NS_METHOD GetInnerWindowID(uint64_t *aInnerWindowID); \
  NS_METHOD GetOuterWindowID(uint64_t *aOuterWindowID); \
  NS_METHOD GetParentOuterWindowID(uint64_t *aParentOuterWindowID); \
  NS_METHOD GetEnforceSecurity(bool *aEnforceSecurity); \
  NS_METHOD SetEnforceSecurity(bool aEnforceSecurity); \
  NS_METHOD GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone); \
  NS_METHOD SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone); \
  NS_METHOD AppendRedirectedPrincipal(nsIPrincipal *aPrincipal); \
  NS_METHOD GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain); \
  const nsTArray<nsCOMPtr<nsIPrincipal>> & RedirectChain(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILOADINFO(_to) \
  NS_IMETHOD GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal) override { return _to GetLoadingPrincipal(aLoadingPrincipal); } \
  virtual nsIPrincipal * LoadingPrincipal(void) override { return _to LoadingPrincipal(); } \
  NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal) override { return _to GetTriggeringPrincipal(aTriggeringPrincipal); } \
  virtual nsIPrincipal * TriggeringPrincipal(void) override { return _to TriggeringPrincipal(); } \
  NS_IMETHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument) override { return _to GetLoadingDocument(aLoadingDocument); } \
  virtual nsINode * LoadingNode(void) override { return _to LoadingNode(); } \
  NS_IMETHOD GetSecurityFlags(nsSecurityFlags *aSecurityFlags) override { return _to GetSecurityFlags(aSecurityFlags); } \
  using nsILoadInfo::GetSecurityMode; \
  NS_IMETHOD GetSecurityMode(uint32_t *aSecurityMode) override { return _to GetSecurityMode(aSecurityMode); } \
  using nsILoadInfo::GetRequireCorsWithCredentials; \
  NS_IMETHOD GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials) override { return _to GetRequireCorsWithCredentials(aRequireCorsWithCredentials); } \
  using nsILoadInfo::GetForceInheritPrincipal; \
  NS_IMETHOD GetForceInheritPrincipal(bool *aForceInheritPrincipal) override { return _to GetForceInheritPrincipal(aForceInheritPrincipal); } \
  using nsILoadInfo::GetLoadingSandboxed; \
  NS_IMETHOD GetLoadingSandboxed(bool *aLoadingSandboxed) override { return _to GetLoadingSandboxed(aLoadingSandboxed); } \
  using nsILoadInfo::GetAboutBlankInherits; \
  NS_IMETHOD GetAboutBlankInherits(bool *aAboutBlankInherits) override { return _to GetAboutBlankInherits(aAboutBlankInherits); } \
  NS_IMETHOD GetContentPolicyType(nsContentPolicyType *aContentPolicyType) override { return _to GetContentPolicyType(aContentPolicyType); } \
  NS_IMETHOD_(nsContentPolicyType) InternalContentPolicyType(void) override { return _to InternalContentPolicyType(); } \
  NS_IMETHOD GetBaseURI(nsIURI * *aBaseURI) override { return _to GetBaseURI(aBaseURI); } \
  virtual nsIURI * BaseURI(void) override { return _to BaseURI(); } \
  NS_IMETHOD GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests) override { return _to GetUpgradeInsecureRequests(aUpgradeInsecureRequests); } \
  NS_IMETHOD GetInnerWindowID(uint64_t *aInnerWindowID) override { return _to GetInnerWindowID(aInnerWindowID); } \
  NS_IMETHOD GetOuterWindowID(uint64_t *aOuterWindowID) override { return _to GetOuterWindowID(aOuterWindowID); } \
  NS_IMETHOD GetParentOuterWindowID(uint64_t *aParentOuterWindowID) override { return _to GetParentOuterWindowID(aParentOuterWindowID); } \
  NS_IMETHOD GetEnforceSecurity(bool *aEnforceSecurity) override { return _to GetEnforceSecurity(aEnforceSecurity); } \
  NS_IMETHOD SetEnforceSecurity(bool aEnforceSecurity) override { return _to SetEnforceSecurity(aEnforceSecurity); } \
  NS_IMETHOD GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone) override { return _to GetInitialSecurityCheckDone(aInitialSecurityCheckDone); } \
  NS_IMETHOD SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone) override { return _to SetInitialSecurityCheckDone(aInitialSecurityCheckDone); } \
  NS_IMETHOD AppendRedirectedPrincipal(nsIPrincipal *aPrincipal) override { return _to AppendRedirectedPrincipal(aPrincipal); } \
  NS_IMETHOD GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain) override { return _to GetRedirectChain(cx, aRedirectChain); } \
  virtual const nsTArray<nsCOMPtr<nsIPrincipal>> & RedirectChain(void) override { return _to RedirectChain(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSILOADINFO(_to) \
  NS_IMETHOD GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadingPrincipal(aLoadingPrincipal); } \
  virtual nsIPrincipal * LoadingPrincipal(void) override; \
  NS_IMETHOD GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTriggeringPrincipal(aTriggeringPrincipal); } \
  virtual nsIPrincipal * TriggeringPrincipal(void) override; \
  NS_IMETHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadingDocument(aLoadingDocument); } \
  virtual nsINode * LoadingNode(void) override; \
  NS_IMETHOD GetSecurityFlags(nsSecurityFlags *aSecurityFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityFlags(aSecurityFlags); } \
  NS_IMETHOD GetSecurityMode(uint32_t *aSecurityMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityMode(aSecurityMode); } \
  NS_IMETHOD GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequireCorsWithCredentials(aRequireCorsWithCredentials); } \
  NS_IMETHOD GetForceInheritPrincipal(bool *aForceInheritPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForceInheritPrincipal(aForceInheritPrincipal); } \
  NS_IMETHOD GetLoadingSandboxed(bool *aLoadingSandboxed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadingSandboxed(aLoadingSandboxed); } \
  NS_IMETHOD GetAboutBlankInherits(bool *aAboutBlankInherits) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAboutBlankInherits(aAboutBlankInherits); } \
  NS_IMETHOD GetContentPolicyType(nsContentPolicyType *aContentPolicyType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentPolicyType(aContentPolicyType); } \
  NS_IMETHOD_(nsContentPolicyType) InternalContentPolicyType(void) override; \
  NS_IMETHOD GetBaseURI(nsIURI * *aBaseURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBaseURI(aBaseURI); } \
  virtual nsIURI * BaseURI(void) override; \
  NS_IMETHOD GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpgradeInsecureRequests(aUpgradeInsecureRequests); } \
  NS_IMETHOD GetInnerWindowID(uint64_t *aInnerWindowID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInnerWindowID(aInnerWindowID); } \
  NS_IMETHOD GetOuterWindowID(uint64_t *aOuterWindowID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOuterWindowID(aOuterWindowID); } \
  NS_IMETHOD GetParentOuterWindowID(uint64_t *aParentOuterWindowID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentOuterWindowID(aParentOuterWindowID); } \
  NS_IMETHOD GetEnforceSecurity(bool *aEnforceSecurity) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnforceSecurity(aEnforceSecurity); } \
  NS_IMETHOD SetEnforceSecurity(bool aEnforceSecurity) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEnforceSecurity(aEnforceSecurity); } \
  NS_IMETHOD GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInitialSecurityCheckDone(aInitialSecurityCheckDone); } \
  NS_IMETHOD SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetInitialSecurityCheckDone(aInitialSecurityCheckDone); } \
  NS_IMETHOD AppendRedirectedPrincipal(nsIPrincipal *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendRedirectedPrincipal(aPrincipal); } \
  NS_IMETHOD GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedirectChain(cx, aRedirectChain); } \
  virtual const nsTArray<nsCOMPtr<nsIPrincipal>> & RedirectChain(void) override; 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsLoadInfo : public nsILoadInfo
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILOADINFO

  nsLoadInfo();

private:
  ~nsLoadInfo();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsLoadInfo, nsILoadInfo)

nsLoadInfo::nsLoadInfo()
{
  /* member initializers and constructor code */
}

nsLoadInfo::~nsLoadInfo()
{
  /* destructor code */
}

/* readonly attribute nsIPrincipal loadingPrincipal; */
NS_IMETHODIMP nsLoadInfo::GetLoadingPrincipal(nsIPrincipal * *aLoadingPrincipal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [binaryname(LoadingPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryLoadingPrincipal (); */
nsIPrincipal * nsLoadInfo::LoadingPrincipal()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIPrincipal triggeringPrincipal; */
NS_IMETHODIMP nsLoadInfo::GetTriggeringPrincipal(nsIPrincipal * *aTriggeringPrincipal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [binaryname(TriggeringPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryTriggeringPrincipal (); */
nsIPrincipal * nsLoadInfo::TriggeringPrincipal()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMDocument loadingDocument; */
NS_IMETHODIMP nsLoadInfo::GetLoadingDocument(nsIDOMDocument * *aLoadingDocument)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [binaryname(LoadingNode),noscript,nostdcall,notxpcom] nsINode binaryLoadingNode (); */
nsINode * nsLoadInfo::LoadingNode()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsSecurityFlags securityFlags; */
NS_IMETHODIMP nsLoadInfo::GetSecurityFlags(nsSecurityFlags *aSecurityFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [infallible] readonly attribute unsigned long securityMode; */
NS_IMETHODIMP nsLoadInfo::GetSecurityMode(uint32_t *aSecurityMode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [infallible] readonly attribute boolean requireCorsWithCredentials; */
NS_IMETHODIMP nsLoadInfo::GetRequireCorsWithCredentials(bool *aRequireCorsWithCredentials)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [infallible] readonly attribute boolean forceInheritPrincipal; */
NS_IMETHODIMP nsLoadInfo::GetForceInheritPrincipal(bool *aForceInheritPrincipal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [infallible] readonly attribute boolean loadingSandboxed; */
NS_IMETHODIMP nsLoadInfo::GetLoadingSandboxed(bool *aLoadingSandboxed)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [infallible] readonly attribute boolean aboutBlankInherits; */
NS_IMETHODIMP nsLoadInfo::GetAboutBlankInherits(bool *aAboutBlankInherits)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsContentPolicyType contentPolicyType; */
NS_IMETHODIMP nsLoadInfo::GetContentPolicyType(nsContentPolicyType *aContentPolicyType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript,notxpcom] nsContentPolicyType internalContentPolicyType (); */
NS_IMETHODIMP_(nsContentPolicyType) nsLoadInfo::InternalContentPolicyType()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIURI baseURI; */
NS_IMETHODIMP nsLoadInfo::GetBaseURI(nsIURI * *aBaseURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [binaryname(BaseURI),noscript,nostdcall,notxpcom] nsIURI binaryBaseURI (); */
nsIURI * nsLoadInfo::BaseURI()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean upgradeInsecureRequests; */
NS_IMETHODIMP nsLoadInfo::GetUpgradeInsecureRequests(bool *aUpgradeInsecureRequests)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long long innerWindowID; */
NS_IMETHODIMP nsLoadInfo::GetInnerWindowID(uint64_t *aInnerWindowID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long long outerWindowID; */
NS_IMETHODIMP nsLoadInfo::GetOuterWindowID(uint64_t *aOuterWindowID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long long parentOuterWindowID; */
NS_IMETHODIMP nsLoadInfo::GetParentOuterWindowID(uint64_t *aParentOuterWindowID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute bool enforceSecurity; */
NS_IMETHODIMP nsLoadInfo::GetEnforceSecurity(bool *aEnforceSecurity)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadInfo::SetEnforceSecurity(bool aEnforceSecurity)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute bool initialSecurityCheckDone; */
NS_IMETHODIMP nsLoadInfo::GetInitialSecurityCheckDone(bool *aInitialSecurityCheckDone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadInfo::SetInitialSecurityCheckDone(bool aInitialSecurityCheckDone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void appendRedirectedPrincipal (in nsIPrincipal aPrincipal); */
NS_IMETHODIMP nsLoadInfo::AppendRedirectedPrincipal(nsIPrincipal *aPrincipal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [implicit_jscontext] readonly attribute jsval redirectChain; */
NS_IMETHODIMP nsLoadInfo::GetRedirectChain(JSContext* cx, JS::MutableHandleValue aRedirectChain)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [binaryname(RedirectChain),noscript,nostdcall,notxpcom] const_nsIPrincipalArray binaryRedirectChain (); */
const nsTArray<nsCOMPtr<nsIPrincipal>> & nsLoadInfo::RedirectChain()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsILoadInfo_h__ */
