/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/docshell/base/nsIDocShellTreeOwner.idl
 */

#ifndef __gen_nsIDocShellTreeOwner_h__
#define __gen_nsIDocShellTreeOwner_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
class nsIDocShellTreeItem; /* forward declaration */

class nsIRemoteTab; /* forward declaration */

namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla


/* starting interface:    nsIDocShellTreeOwner */
#define NS_IDOCSHELLTREEOWNER_IID_STR "0e3dc4b1-4cea-4a37-af71-79f0afd07574"

#define NS_IDOCSHELLTREEOWNER_IID \
  {0x0e3dc4b1, 0x4cea, 0x4a37, \
    { 0xaf, 0x71, 0x79, 0xf0, 0xaf, 0xd0, 0x75, 0x74 }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIDocShellTreeOwner) nsIDocShellTreeOwner : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IDOCSHELLTREEOWNER_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsIDocShellTreeOwner;

  /* void contentShellAdded (in nsIDocShellTreeItem aContentShell, in boolean aPrimary); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_contentShellAdded)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ContentShellAdded(nsIDocShellTreeItem *aContentShell, bool aPrimary) = 0;

  /* void contentShellRemoved (in nsIDocShellTreeItem aContentShell); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_contentShellRemoved)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ContentShellRemoved(nsIDocShellTreeItem *aContentShell) = 0;

  /* readonly attribute nsIDocShellTreeItem primaryContentShell; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryContentShell)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryContentShell(nsIDocShellTreeItem **aPrimaryContentShell) = 0;

  /* void remoteTabAdded (in nsIRemoteTab aTab, in boolean aPrimary); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_remoteTabAdded)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoteTabAdded(nsIRemoteTab *aTab, bool aPrimary) = 0;

  /* void remoteTabRemoved (in nsIRemoteTab aTab); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_remoteTabRemoved)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoteTabRemoved(nsIRemoteTab *aTab) = 0;

  /* readonly attribute nsIRemoteTab primaryRemoteTab; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryRemoteTab)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryRemoteTab(nsIRemoteTab **aPrimaryRemoteTab) = 0;

  /* readonly attribute BrowsingContext primaryContentBrowsingContext; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryContentBrowsingContext)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryContentBrowsingContext(mozilla::dom::BrowsingContext **aPrimaryContentBrowsingContext) = 0;

  /* [can_run_script] void sizeShellTo (in nsIDocShellTreeItem shell, in long cx, in long cy); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_sizeShellTo)
  JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD SizeShellTo(nsIDocShellTreeItem *shell, int32_t cx, int32_t cy) = 0;

  /* void getPrimaryContentSize (out long width, out long height); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_getPrimaryContentSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryContentSize(int32_t *width, int32_t *height) = 0;

  /* void setPrimaryContentSize (in long width, in long height); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_setPrimaryContentSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrimaryContentSize(int32_t width, int32_t height) = 0;

  /* void getRootShellSize (out long width, out long height); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_getRootShellSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetRootShellSize(int32_t *width, int32_t *height) = 0;

  /* void setRootShellSize (in long width, in long height); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_setRootShellSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetRootShellSize(int32_t width, int32_t height) = 0;

  /* readonly attribute boolean hasPrimaryContent; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_hasPrimaryContent)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHasPrimaryContent(bool *aHasPrimaryContent) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCSHELLTREEOWNER \
  NS_IMETHOD ContentShellAdded(nsIDocShellTreeItem *aContentShell, bool aPrimary) override; \
  NS_IMETHOD ContentShellRemoved(nsIDocShellTreeItem *aContentShell) override; \
  NS_IMETHOD GetPrimaryContentShell(nsIDocShellTreeItem **aPrimaryContentShell) override; \
  NS_IMETHOD RemoteTabAdded(nsIRemoteTab *aTab, bool aPrimary) override; \
  NS_IMETHOD RemoteTabRemoved(nsIRemoteTab *aTab) override; \
  NS_IMETHOD GetPrimaryRemoteTab(nsIRemoteTab **aPrimaryRemoteTab) override; \
  NS_IMETHOD GetPrimaryContentBrowsingContext(mozilla::dom::BrowsingContext **aPrimaryContentBrowsingContext) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SizeShellTo(nsIDocShellTreeItem *shell, int32_t cx, int32_t cy) override; \
  NS_IMETHOD GetPrimaryContentSize(int32_t *width, int32_t *height) override; \
  NS_IMETHOD SetPrimaryContentSize(int32_t width, int32_t height) override; \
  NS_IMETHOD GetRootShellSize(int32_t *width, int32_t *height) override; \
  NS_IMETHOD SetRootShellSize(int32_t width, int32_t height) override; \
  NS_IMETHOD GetHasPrimaryContent(bool *aHasPrimaryContent) 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_NSIDOCSHELLTREEOWNER \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_contentShellAdded)\
  nsresult ContentShellAdded(nsIDocShellTreeItem *aContentShell, bool aPrimary); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_contentShellRemoved)\
  nsresult ContentShellRemoved(nsIDocShellTreeItem *aContentShell); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryContentShell)\
  nsresult GetPrimaryContentShell(nsIDocShellTreeItem **aPrimaryContentShell); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_remoteTabAdded)\
  nsresult RemoteTabAdded(nsIRemoteTab *aTab, bool aPrimary); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_remoteTabRemoved)\
  nsresult RemoteTabRemoved(nsIRemoteTab *aTab); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryRemoteTab)\
  nsresult GetPrimaryRemoteTab(nsIRemoteTab **aPrimaryRemoteTab); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_primaryContentBrowsingContext)\
  nsresult GetPrimaryContentBrowsingContext(mozilla::dom::BrowsingContext **aPrimaryContentBrowsingContext); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_sizeShellTo)\
  MOZ_CAN_RUN_SCRIPT nsresult SizeShellTo(nsIDocShellTreeItem *shell, int32_t cx, int32_t cy); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_getPrimaryContentSize)\
  nsresult GetPrimaryContentSize(int32_t *width, int32_t *height); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_setPrimaryContentSize)\
  nsresult SetPrimaryContentSize(int32_t width, int32_t height); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_getRootShellSize)\
  nsresult GetRootShellSize(int32_t *width, int32_t *height); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocShellTreeOwner_setRootShellSize)\
  nsresult SetRootShellSize(int32_t width, int32_t height); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocShellTreeOwner_hasPrimaryContent)\
  nsresult GetHasPrimaryContent(bool *aHasPrimaryContent); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOCSHELLTREEOWNER(_to) \
  NS_IMETHOD ContentShellAdded(nsIDocShellTreeItem *aContentShell, bool aPrimary) override { return _to ContentShellAdded(aContentShell, aPrimary); } \
  NS_IMETHOD ContentShellRemoved(nsIDocShellTreeItem *aContentShell) override { return _to ContentShellRemoved(aContentShell); } \
  NS_IMETHOD GetPrimaryContentShell(nsIDocShellTreeItem **aPrimaryContentShell) override { return _to GetPrimaryContentShell(aPrimaryContentShell); } \
  NS_IMETHOD RemoteTabAdded(nsIRemoteTab *aTab, bool aPrimary) override { return _to RemoteTabAdded(aTab, aPrimary); } \
  NS_IMETHOD RemoteTabRemoved(nsIRemoteTab *aTab) override { return _to RemoteTabRemoved(aTab); } \
  NS_IMETHOD GetPrimaryRemoteTab(nsIRemoteTab **aPrimaryRemoteTab) override { return _to GetPrimaryRemoteTab(aPrimaryRemoteTab); } \
  NS_IMETHOD GetPrimaryContentBrowsingContext(mozilla::dom::BrowsingContext **aPrimaryContentBrowsingContext) override { return _to GetPrimaryContentBrowsingContext(aPrimaryContentBrowsingContext); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SizeShellTo(nsIDocShellTreeItem *shell, int32_t cx, int32_t cy) override { return _to SizeShellTo(shell, cx, cy); } \
  NS_IMETHOD GetPrimaryContentSize(int32_t *width, int32_t *height) override { return _to GetPrimaryContentSize(width, height); } \
  NS_IMETHOD SetPrimaryContentSize(int32_t width, int32_t height) override { return _to SetPrimaryContentSize(width, height); } \
  NS_IMETHOD GetRootShellSize(int32_t *width, int32_t *height) override { return _to GetRootShellSize(width, height); } \
  NS_IMETHOD SetRootShellSize(int32_t width, int32_t height) override { return _to SetRootShellSize(width, height); } \
  NS_IMETHOD GetHasPrimaryContent(bool *aHasPrimaryContent) override { return _to GetHasPrimaryContent(aHasPrimaryContent); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOCSHELLTREEOWNER(_to) \
  NS_IMETHOD ContentShellAdded(nsIDocShellTreeItem *aContentShell, bool aPrimary) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ContentShellAdded(aContentShell, aPrimary); } \
  NS_IMETHOD ContentShellRemoved(nsIDocShellTreeItem *aContentShell) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ContentShellRemoved(aContentShell); } \
  NS_IMETHOD GetPrimaryContentShell(nsIDocShellTreeItem **aPrimaryContentShell) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryContentShell(aPrimaryContentShell); } \
  NS_IMETHOD RemoteTabAdded(nsIRemoteTab *aTab, bool aPrimary) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoteTabAdded(aTab, aPrimary); } \
  NS_IMETHOD RemoteTabRemoved(nsIRemoteTab *aTab) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoteTabRemoved(aTab); } \
  NS_IMETHOD GetPrimaryRemoteTab(nsIRemoteTab **aPrimaryRemoteTab) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryRemoteTab(aPrimaryRemoteTab); } \
  NS_IMETHOD GetPrimaryContentBrowsingContext(mozilla::dom::BrowsingContext **aPrimaryContentBrowsingContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryContentBrowsingContext(aPrimaryContentBrowsingContext); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SizeShellTo(nsIDocShellTreeItem *shell, int32_t cx, int32_t cy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeShellTo(shell, cx, cy); } \
  NS_IMETHOD GetPrimaryContentSize(int32_t *width, int32_t *height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryContentSize(width, height); } \
  NS_IMETHOD SetPrimaryContentSize(int32_t width, int32_t height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrimaryContentSize(width, height); } \
  NS_IMETHOD GetRootShellSize(int32_t *width, int32_t *height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRootShellSize(width, height); } \
  NS_IMETHOD SetRootShellSize(int32_t width, int32_t height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRootShellSize(width, height); } \
  NS_IMETHOD GetHasPrimaryContent(bool *aHasPrimaryContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasPrimaryContent(aHasPrimaryContent); } 


#endif /* __gen_nsIDocShellTreeOwner_h__ */
