Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/browser/components/shell/nsIOpenTabsProvider.idl
*/
#ifndef __gen_nsIOpenTabsProvider_h__
#define __gen_nsIOpenTabsProvider_h__
#include "nsISupports.h"
#include "nsTArray.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: nsIOpenTabsProvider */
#define NS_IOPENTABSPROVIDER_IID_STR "46e3e300-a45a-45b0-ac68-016e9496bf98"
#define NS_IOPENTABSPROVIDER_IID \
{0x46e3e300, 0xa45a, 0x45b0, \
{ 0xac, 0x68, 0x01, 0x6e, 0x94, 0x96, 0xbf, 0x98 }}
class NS_NO_VTABLE nsIOpenTabsProvider : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOPENTABSPROVIDER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIOpenTabsProvider;
/* Array<AUTF8String> getOpenTabs (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetOpenTabs(nsTArray<nsCString >& _retval) = 0;
/* void switchToOpenTab (in AUTF8String url); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SwitchToOpenTab(const nsACString& url) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIOpenTabsProvider, NS_IOPENTABSPROVIDER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIOPENTABSPROVIDER \
NS_IMETHOD GetOpenTabs(nsTArray<nsCString >& _retval) override; \
NS_IMETHOD SwitchToOpenTab(const nsACString& url) 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_NSIOPENTABSPROVIDER \
nsresult GetOpenTabs(nsTArray<nsCString >& _retval); \
nsresult SwitchToOpenTab(const nsACString& url);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIOPENTABSPROVIDER(_to) \
NS_IMETHOD GetOpenTabs(nsTArray<nsCString >& _retval) override { return _to GetOpenTabs(_retval); } \
NS_IMETHOD SwitchToOpenTab(const nsACString& url) override { return _to SwitchToOpenTab(url); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIOPENTABSPROVIDER(_to) \
NS_IMETHOD GetOpenTabs(nsTArray<nsCString >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOpenTabs(_retval); } \
NS_IMETHOD SwitchToOpenTab(const nsACString& url) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SwitchToOpenTab(url); }
#endif /* __gen_nsIOpenTabsProvider_h__ */