Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/base/nsIAvailableMemoryWatcherBase.idl
*/
#ifndef __gen_nsIAvailableMemoryWatcherBase_h__
#define __gen_nsIAvailableMemoryWatcherBase_h__
#include "nsISupports.h"
#include "js/GCAnnotations.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsITabUnloader */
#define NS_ITABUNLOADER_IID_STR "2e530956-6054-464f-9f4c-0ae6f8de5523"
#define NS_ITABUNLOADER_IID \
{0x2e530956, 0x6054, 0x464f, \
{ 0x9f, 0x4c, 0x0a, 0xe6, 0xf8, 0xde, 0x55, 0x23 }}
class NS_NO_VTABLE nsITabUnloader : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITABUNLOADER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsITabUnloader;
/* void unloadTabAsync (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnloadTabAsync(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITabUnloader, NS_ITABUNLOADER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITABUNLOADER \
NS_IMETHOD UnloadTabAsync(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_NSITABUNLOADER \
nsresult UnloadTabAsync(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITABUNLOADER(_to) \
NS_IMETHOD UnloadTabAsync(void) override { return _to UnloadTabAsync(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITABUNLOADER(_to) \
NS_IMETHOD UnloadTabAsync(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnloadTabAsync(); }
/* starting interface: nsIAvailableMemoryWatcherBase */
#define NS_IAVAILABLEMEMORYWATCHERBASE_IID_STR "b0b5701e-239d-49db-9009-37e89f86441c"
#define NS_IAVAILABLEMEMORYWATCHERBASE_IID \
{0xb0b5701e, 0x239d, 0x49db, \
{ 0x90, 0x09, 0x37, 0xe8, 0x9f, 0x86, 0x44, 0x1c }}
class NS_NO_VTABLE nsIAvailableMemoryWatcherBase : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAVAILABLEMEMORYWATCHERBASE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAvailableMemoryWatcherBase;
/* void registerTabUnloader (in nsITabUnloader aTabUnloader); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterTabUnloader(nsITabUnloader *aTabUnloader) = 0;
/* void onUnloadAttemptCompleted (in nsresult aResult); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnUnloadAttemptCompleted(nsresult aResult) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAvailableMemoryWatcherBase, NS_IAVAILABLEMEMORYWATCHERBASE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAVAILABLEMEMORYWATCHERBASE \
NS_IMETHOD RegisterTabUnloader(nsITabUnloader *aTabUnloader) override; \
NS_IMETHOD OnUnloadAttemptCompleted(nsresult aResult) 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_NSIAVAILABLEMEMORYWATCHERBASE \
nsresult RegisterTabUnloader(nsITabUnloader *aTabUnloader); \
nsresult OnUnloadAttemptCompleted(nsresult aResult);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAVAILABLEMEMORYWATCHERBASE(_to) \
NS_IMETHOD RegisterTabUnloader(nsITabUnloader *aTabUnloader) override { return _to RegisterTabUnloader(aTabUnloader); } \
NS_IMETHOD OnUnloadAttemptCompleted(nsresult aResult) override { return _to OnUnloadAttemptCompleted(aResult); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAVAILABLEMEMORYWATCHERBASE(_to) \
NS_IMETHOD RegisterTabUnloader(nsITabUnloader *aTabUnloader) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterTabUnloader(aTabUnloader); } \
NS_IMETHOD OnUnloadAttemptCompleted(nsresult aResult) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnloadAttemptCompleted(aResult); }
#endif /* __gen_nsIAvailableMemoryWatcherBase_h__ */