Generated file

Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/docshell/base/nsILoadContext.idl
*/
#ifndef __gen_nsILoadContext_h__
#define __gen_nsILoadContext_h__
#include "nsISupports.h"
#include "js/Value.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class mozIDOMWindowProxy; /* forward declaration */
namespace mozilla {
namespace dom {
class Element; /* webidl Element */
} // namespace dom
} // namespace mozilla
// %{C++:14-18
#ifdef MOZILLA_INTERNAL_API
namespace mozilla {
class OriginAttributes;
}
#endif
// %}
/* starting interface: nsILoadContext */
#define NS_ILOADCONTEXT_IID_STR "2813a7a3-d084-4d00-acd0-f76620315c02"
#define NS_ILOADCONTEXT_IID \
{0x2813a7a3, 0xd084, 0x4d00, \
{ 0xac, 0xd0, 0xf7, 0x66, 0x20, 0x31, 0x5c, 0x02 }}
class MOZ_BINDING(binding_to, idl, class, XPIDL_nsILoadContext) nsILoadContext : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_ILOADCONTEXT_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsILoadContext;
/* readonly attribute mozIDOMWindowProxy associatedWindow; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_associatedWindow)
NS_IMETHOD GetAssociatedWindow(mozIDOMWindowProxy **aAssociatedWindow) = 0;
/* readonly attribute mozIDOMWindowProxy topWindow; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_topWindow)
NS_IMETHOD GetTopWindow(mozIDOMWindowProxy **aTopWindow) = 0;
/* readonly attribute Element topFrameElement; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_topFrameElement)
NS_IMETHOD GetTopFrameElement(mozilla::dom::Element **aTopFrameElement) = 0;
/* readonly attribute boolean isContent; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_isContent)
NS_IMETHOD GetIsContent(bool *aIsContent) = 0;
/* attribute boolean usePrivateBrowsing; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_usePrivateBrowsing)
NS_IMETHOD GetUsePrivateBrowsing(bool *aUsePrivateBrowsing) = 0;
MOZ_BINDING(binding_to, idl, setter, XPIDL_nsILoadContext_usePrivateBrowsing)
NS_IMETHOD SetUsePrivateBrowsing(bool aUsePrivateBrowsing) = 0;
/* readonly attribute boolean useRemoteTabs; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useRemoteTabs)
NS_IMETHOD GetUseRemoteTabs(bool *aUseRemoteTabs) = 0;
/* readonly attribute boolean useRemoteSubframes; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useRemoteSubframes)
NS_IMETHOD GetUseRemoteSubframes(bool *aUseRemoteSubframes) = 0;
/* attribute boolean useTrackingProtection; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useTrackingProtection)
NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) = 0;
MOZ_BINDING(binding_to, idl, setter, XPIDL_nsILoadContext_useTrackingProtection)
NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) = 0;
// %{C++:88-117
/**
* De-XPCOMed getter to make call-sites cleaner.
*/
bool UsePrivateBrowsing()
{
bool usingPB = false;
GetUsePrivateBrowsing(&usingPB);
return usingPB;
}
bool UseRemoteTabs()
{
bool usingRT = false;
GetUseRemoteTabs(&usingRT);
return usingRT;
}
bool UseRemoteSubframes()
{
bool usingRSF = false;
GetUseRemoteSubframes(&usingRSF);
return usingRSF;
}
bool UseTrackingProtection()
{
bool usingTP = false;
GetUseTrackingProtection(&usingTP);
return usingTP;
}
// %}
/* [noscript] void SetPrivateBrowsing (in boolean aInPrivateBrowsing); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetPrivateBrowsing)
NS_IMETHOD SetPrivateBrowsing(bool aInPrivateBrowsing) = 0;
/* [noscript] void SetRemoteTabs (in boolean aUseRemoteTabs); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetRemoteTabs)
NS_IMETHOD SetRemoteTabs(bool aUseRemoteTabs) = 0;
/* [noscript] void SetRemoteSubframes (in boolean aUseRemoteSubframes); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetRemoteSubframes)
NS_IMETHOD SetRemoteSubframes(bool aUseRemoteSubframes) = 0;
/* [binaryname(ScriptableOriginAttributes),implicit_jscontext] readonly attribute jsval originAttributes; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_originAttributes)
NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) = 0;
/* [noscript,notxpcom] void GetOriginAttributes (out OriginAttributes aAttrs); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_GetOriginAttributes)
NS_IMETHOD_(void) GetOriginAttributes(mozilla::OriginAttributes & aAttrs) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILOADCONTEXT \
NS_IMETHOD GetAssociatedWindow(mozIDOMWindowProxy **aAssociatedWindow) override; \
NS_IMETHOD GetTopWindow(mozIDOMWindowProxy **aTopWindow) override; \
NS_IMETHOD GetTopFrameElement(mozilla::dom::Element **aTopFrameElement) override; \
NS_IMETHOD GetIsContent(bool *aIsContent) override; \
NS_IMETHOD GetUsePrivateBrowsing(bool *aUsePrivateBrowsing) override; \
NS_IMETHOD SetUsePrivateBrowsing(bool aUsePrivateBrowsing) override; \
NS_IMETHOD GetUseRemoteTabs(bool *aUseRemoteTabs) override; \
NS_IMETHOD GetUseRemoteSubframes(bool *aUseRemoteSubframes) override; \
NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override; \
NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override; \
NS_IMETHOD SetPrivateBrowsing(bool aInPrivateBrowsing) override; \
NS_IMETHOD SetRemoteTabs(bool aUseRemoteTabs) override; \
NS_IMETHOD SetRemoteSubframes(bool aUseRemoteSubframes) override; \
NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) override; \
NS_IMETHOD_(void) GetOriginAttributes(mozilla::OriginAttributes & aAttrs) 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_NSILOADCONTEXT \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_associatedWindow)\
nsresult GetAssociatedWindow(mozIDOMWindowProxy **aAssociatedWindow); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_topWindow)\
nsresult GetTopWindow(mozIDOMWindowProxy **aTopWindow); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_topFrameElement)\
nsresult GetTopFrameElement(mozilla::dom::Element **aTopFrameElement); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_isContent)\
nsresult GetIsContent(bool *aIsContent); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_usePrivateBrowsing)\
nsresult GetUsePrivateBrowsing(bool *aUsePrivateBrowsing); \
MOZ_BINDING(binding_to, idl, setter, XPIDL_nsILoadContext_usePrivateBrowsing)\
nsresult SetUsePrivateBrowsing(bool aUsePrivateBrowsing); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useRemoteTabs)\
nsresult GetUseRemoteTabs(bool *aUseRemoteTabs); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useRemoteSubframes)\
nsresult GetUseRemoteSubframes(bool *aUseRemoteSubframes); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_useTrackingProtection)\
nsresult GetUseTrackingProtection(bool *aUseTrackingProtection); \
MOZ_BINDING(binding_to, idl, setter, XPIDL_nsILoadContext_useTrackingProtection)\
nsresult SetUseTrackingProtection(bool aUseTrackingProtection); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetPrivateBrowsing)\
nsresult SetPrivateBrowsing(bool aInPrivateBrowsing); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetRemoteTabs)\
nsresult SetRemoteTabs(bool aUseRemoteTabs); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_SetRemoteSubframes)\
nsresult SetRemoteSubframes(bool aUseRemoteSubframes); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsILoadContext_originAttributes)\
nsresult GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsILoadContext_GetOriginAttributes)\
nsresult_(void) GetOriginAttributes(mozilla::OriginAttributes & aAttrs);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILOADCONTEXT(_to) \
NS_IMETHOD GetAssociatedWindow(mozIDOMWindowProxy **aAssociatedWindow) override { return _to GetAssociatedWindow(aAssociatedWindow); } \
NS_IMETHOD GetTopWindow(mozIDOMWindowProxy **aTopWindow) override { return _to GetTopWindow(aTopWindow); } \
NS_IMETHOD GetTopFrameElement(mozilla::dom::Element **aTopFrameElement) override { return _to GetTopFrameElement(aTopFrameElement); } \
NS_IMETHOD GetIsContent(bool *aIsContent) override { return _to GetIsContent(aIsContent); } \
NS_IMETHOD GetUsePrivateBrowsing(bool *aUsePrivateBrowsing) override { return _to GetUsePrivateBrowsing(aUsePrivateBrowsing); } \
NS_IMETHOD SetUsePrivateBrowsing(bool aUsePrivateBrowsing) override { return _to SetUsePrivateBrowsing(aUsePrivateBrowsing); } \
NS_IMETHOD GetUseRemoteTabs(bool *aUseRemoteTabs) override { return _to GetUseRemoteTabs(aUseRemoteTabs); } \
NS_IMETHOD GetUseRemoteSubframes(bool *aUseRemoteSubframes) override { return _to GetUseRemoteSubframes(aUseRemoteSubframes); } \
NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override { return _to GetUseTrackingProtection(aUseTrackingProtection); } \
NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override { return _to SetUseTrackingProtection(aUseTrackingProtection); } \
NS_IMETHOD SetPrivateBrowsing(bool aInPrivateBrowsing) override { return _to SetPrivateBrowsing(aInPrivateBrowsing); } \
NS_IMETHOD SetRemoteTabs(bool aUseRemoteTabs) override { return _to SetRemoteTabs(aUseRemoteTabs); } \
NS_IMETHOD SetRemoteSubframes(bool aUseRemoteSubframes) override { return _to SetRemoteSubframes(aUseRemoteSubframes); } \
NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) override { return _to GetScriptableOriginAttributes(cx, aOriginAttributes); } \
NS_IMETHOD_(void) GetOriginAttributes(mozilla::OriginAttributes & aAttrs) override { return _to GetOriginAttributes(aAttrs); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSILOADCONTEXT(_to) \
NS_IMETHOD GetAssociatedWindow(mozIDOMWindowProxy **aAssociatedWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAssociatedWindow(aAssociatedWindow); } \
NS_IMETHOD GetTopWindow(mozIDOMWindowProxy **aTopWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTopWindow(aTopWindow); } \
NS_IMETHOD GetTopFrameElement(mozilla::dom::Element **aTopFrameElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTopFrameElement(aTopFrameElement); } \
NS_IMETHOD GetIsContent(bool *aIsContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsContent(aIsContent); } \
NS_IMETHOD GetUsePrivateBrowsing(bool *aUsePrivateBrowsing) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsePrivateBrowsing(aUsePrivateBrowsing); } \
NS_IMETHOD SetUsePrivateBrowsing(bool aUsePrivateBrowsing) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUsePrivateBrowsing(aUsePrivateBrowsing); } \
NS_IMETHOD GetUseRemoteTabs(bool *aUseRemoteTabs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseRemoteTabs(aUseRemoteTabs); } \
NS_IMETHOD GetUseRemoteSubframes(bool *aUseRemoteSubframes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseRemoteSubframes(aUseRemoteSubframes); } \
NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseTrackingProtection(aUseTrackingProtection); } \
NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseTrackingProtection(aUseTrackingProtection); } \
NS_IMETHOD SetPrivateBrowsing(bool aInPrivateBrowsing) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrivateBrowsing(aInPrivateBrowsing); } \
NS_IMETHOD SetRemoteTabs(bool aUseRemoteTabs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRemoteTabs(aUseRemoteTabs); } \
NS_IMETHOD SetRemoteSubframes(bool aUseRemoteSubframes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRemoteSubframes(aUseRemoteSubframes); } \
NS_IMETHOD GetScriptableOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptableOriginAttributes(cx, aOriginAttributes); } \
NS_IMETHOD_(void) GetOriginAttributes(mozilla::OriginAttributes & aAttrs) override;
#endif /* __gen_nsILoadContext_h__ */