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

#ifndef __gen_nsIDocumentViewer_h__
#define __gen_nsIDocumentViewer_h__


#include "nsISupports.h"

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

class nsISHEntry; /* forward declaration */

class nsIPrintSettings; /* forward declaration */

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

class nsINode; /* webidl Node */

// %{C++:14-32
#include "mozilla/Maybe.h"
#include "nsTArray.h"
#include "nsRect.h"
#include "Units.h"

class nsIWidget;
class nsPresContext;
class nsSubDocumentFrame;
class nsDOMNavigationTiming;
namespace mozilla {
class Encoding;
class PresShell;
namespace dom {
class WindowGlobalChild;
} // namespace dom
namespace layout {
class RemotePrintJobChild;
} // namespace layout
} // namespace mozilla
// %}

/* starting interface:    nsIDocumentViewer */
#define NS_IDOCUMENTVIEWER_IID_STR "48118355-e9a5-4452-ab18-59cc426fb817"

#define NS_IDOCUMENTVIEWER_IID \
  {0x48118355, 0xe9a5, 0x4452, \
    { 0xab, 0x18, 0x59, 0xcc, 0x42, 0x6f, 0xb8, 0x17 }}

class MOZ_BINDING(binding_to, idl, class, XPIDL_nsIDocumentViewer) nsIDocumentViewer : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENTVIEWER_IID)

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

  /* [can_run_script,noscript] void init (in nsIWidgetPtr aParentWidget, [const] in LayoutDeviceIntRectRef aBounds, in WindowGlobalChildPtr aWindowActor); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_init)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIWidget * aParentWidget, const mozilla::LayoutDeviceIntRect & aBounds, mozilla::dom::WindowGlobalChild * aWindowActor) = 0;

  /* attribute nsIDocShell container; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_container)
  NS_IMETHOD GetContainer(nsIDocShell **aContainer) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_container)
  NS_IMETHOD SetContainer(nsIDocShell *aContainer) = 0;

  /* [noscript,nostdcall,notxpcom] void loadStart (in Document aDoc); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_loadStart)
  virtual void LoadStart(mozilla::dom::Document *aDoc) = 0;

  /* [can_run_script] void loadComplete (in nsresult aStatus); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_loadComplete)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD LoadComplete(nsresult aStatus) = 0;

  /* [nostdcall,notxpcom] readonly attribute boolean loadCompleted; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_loadCompleted)
  virtual bool GetLoadCompleted() = 0;

  /* [nostdcall,notxpcom] readonly attribute boolean isStopped; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isStopped)
  virtual bool GetIsStopped() = 0;

  enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIDocumentViewer_PermitUnloadAction) PermitUnloadAction : uint8_t {
    ePrompt MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadAction_ePrompt) = 0,
    eDontPromptAndDontUnload MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadAction_eDontPromptAndDontUnload) = 1,
    eDontPromptAndUnload MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadAction_eDontPromptAndUnload) = 2,
  };

  enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIDocumentViewer_PermitUnloadResult) PermitUnloadResult : uint8_t {
    eContinue MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadResult_eContinue) = 0,
    eCanceledByBeforeUnload MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadResult_eCanceledByBeforeUnload) = 1,
    eCanceledByNavigate MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_PermitUnloadResult_eCanceledByNavigate) = 2,
  };

// %{C++:96-98
    nsresult PermitUnload(bool* canUnload) {
      return PermitUnload(ePrompt, canUnload);
    }
// %}
  /* boolean permitUnload ([optional] in nsIDocumentViewer_PermitUnloadAction aAction); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_permitUnload)
  NS_IMETHOD PermitUnload(nsIDocumentViewer::PermitUnloadAction aAction, bool *_retval) = 0;

  /* readonly attribute boolean inPermitUnload; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_inPermitUnload)
  NS_IMETHOD GetInPermitUnload(bool *aInPermitUnload) = 0;

  /* [noscript,nostdcall,notxpcom] nsIDocumentViewer_PermitUnloadResult dispatchBeforeUnload (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_dispatchBeforeUnload)
  virtual nsIDocumentViewer::PermitUnloadResult DispatchBeforeUnload(void) = 0;

  /* readonly attribute boolean beforeUnloadFiring; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_beforeUnloadFiring)
  NS_IMETHOD GetBeforeUnloadFiring(bool *aBeforeUnloadFiring) = 0;

  /* [can_run_script] void pageHide (in boolean isUnload); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_pageHide)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD PageHide(bool isUnload) = 0;

  /* void close (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_close)
  NS_IMETHOD Close(void) = 0;

  /* void destroy (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_destroy)
  NS_IMETHOD Destroy(void) = 0;

  /* void stop (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_stop)
  NS_IMETHOD Stop(void) = 0;

  /* readonly attribute Document DOMDocument; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_DOMDocument)
  NS_IMETHOD GetDOMDocument(mozilla::dom::Document **aDOMDocument) = 0;

  /* [noscript,nostdcall,notxpcom] Document getDocument (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getDocument)
  virtual mozilla::dom::Document * GetDocument(void) = 0;

  /* [can_run_script,noscript,nostdcall] void setDocument (in Document aDocument); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setDocument)
  MOZ_CAN_RUN_SCRIPT virtual nsresult SetDocument(mozilla::dom::Document *aDocument) = 0;

  /* [noscript] void getBounds (in LayoutDeviceIntRectRef aBounds); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getBounds)
  NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect & aBounds) = 0;

  /* [noscript] void setBounds ([const] in LayoutDeviceIntRectRef aBounds); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setBounds)
  NS_IMETHOD SetBounds(const mozilla::LayoutDeviceIntRect & aBounds) = 0;

  enum {
    eDelayResize MOZ_BINDING(binding_to, idl, const, XPIDL_nsIDocumentViewer_eDelayResize) = 1U
  };

  /* [noscript] void setBoundsWithFlags ([const] in LayoutDeviceIntRectRef aBounds, in unsigned long aFlags); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setBoundsWithFlags)
  NS_IMETHOD SetBoundsWithFlags(const mozilla::LayoutDeviceIntRect & aBounds, uint32_t aFlags) = 0;

  /* [nostdcall,notxpcom] attribute nsIDocumentViewer previousViewer; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_previousViewer)
  virtual nsIDocumentViewer * GetPreviousViewer() = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_previousViewer)
  virtual void SetPreviousViewer(nsIDocumentViewer *aPreviousViewer) = 0;

  /* void move (in long aX, in long aY); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_move)
  NS_IMETHOD Move(int32_t aX, int32_t aY) = 0;

  /* void show (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_show)
  NS_IMETHOD Show(void) = 0;

  /* void hide (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_hide)
  NS_IMETHOD Hide(void) = 0;

  /* attribute boolean sticky; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_sticky)
  NS_IMETHOD GetSticky(bool *aSticky) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_sticky)
  NS_IMETHOD SetSticky(bool aSticky) = 0;

  /* [can_run_script] void open (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_open)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Open(void) = 0;

  /* void clearHistoryEntry (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_clearHistoryEntry)
  NS_IMETHOD ClearHistoryEntry(void) = 0;

  /* [can_run_script] void setPageModeForTesting (in boolean aPageMode, in nsIPrintSettings aPrintSettings); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setPageModeForTesting)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPageModeForTesting(bool aPageMode, nsIPrintSettings *aPrintSettings) = 0;

  /* [can_run_script,noscript] void setPrintSettingsForSubdocument (in nsIPrintSettings aPrintSettings, in RemotePrintJobChildPtr aRemotePrintJob); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setPrintSettingsForSubdocument)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrintSettingsForSubdocument(nsIPrintSettings *aPrintSettings, mozilla::layout::RemotePrintJobChild * aRemotePrintJob) = 0;

  /* readonly attribute boolean isTabModalPromptAllowed; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isTabModalPromptAllowed)
  NS_IMETHOD GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed) = 0;

  /* attribute boolean isHidden; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isHidden)
  NS_IMETHOD GetIsHidden(bool *aIsHidden) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_isHidden)
  NS_IMETHOD SetIsHidden(bool aIsHidden) = 0;

  /* [nostdcall,notxpcom] readonly attribute PresShellPtr presShell; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_presShell)
  virtual mozilla::PresShell * GetPresShell() = 0;

  /* [nostdcall,notxpcom] readonly attribute nsPresContextPtr presContext; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_presContext)
  virtual nsPresContext * GetPresContext() = 0;

  /* [can_run_script,noscript] void setDocumentInternal (in Document aDocument, in boolean aForceReuseInnerWindow); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setDocumentInternal)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetDocumentInternal(mozilla::dom::Document *aDocument, bool aForceReuseInnerWindow) = 0;

  /* [noscript,nostdcall,notxpcom] nsSubDocumentFramePtr findContainerFrame (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_findContainerFrame)
  virtual nsSubDocumentFrame * FindContainerFrame(void) = 0;

  /* [noscript,nostdcall,notxpcom] void setNavigationTiming (in nsDOMNavigationTimingPtr aTiming); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setNavigationTiming)
  virtual void SetNavigationTiming(nsDOMNavigationTiming * aTiming) = 0;

  /* readonly attribute float deviceFullZoomForTest; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_deviceFullZoomForTest)
  NS_IMETHOD GetDeviceFullZoomForTest(float *aDeviceFullZoomForTest) = 0;

  /* attribute boolean authorStyleDisabled; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_authorStyleDisabled)
  NS_IMETHOD GetAuthorStyleDisabled(bool *aAuthorStyleDisabled) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_authorStyleDisabled)
  NS_IMETHOD SetAuthorStyleDisabled(bool aAuthorStyleDisabled) = 0;

  /* void getContentSize (in long maxWidth, in long maxHeight, in long prefWidth, out long width, out long height); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getContentSize)
  NS_IMETHOD GetContentSize(int32_t maxWidth, int32_t maxHeight, int32_t prefWidth, int32_t *width, int32_t *height) = 0;

// %{C++:278-285
  mozilla::Maybe<mozilla::CSSIntSize> GetContentSize(int32_t aMaxWidth = 0, int32_t aMaxHeight = 0, int32_t aPrefWidth = 0) {
    int32_t w = 0;
    int32_t h = 0;
    if (NS_SUCCEEDED(GetContentSize(aMaxWidth, aMaxHeight, aPrefWidth, &w, &h))) {
      return mozilla::Some(mozilla::CSSIntSize(w, h));
    }
    return mozilla::Nothing();
  }
// %}
  /* [noscript,notxpcom] Encoding getReloadEncodingAndSource (out int32_t aSource); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getReloadEncodingAndSource)
  NS_IMETHOD_(const mozilla::Encoding *) GetReloadEncodingAndSource(int32_t *aSource) = 0;

  /* [noscript,notxpcom] void setReloadEncodingAndSource (in Encoding aEncoding, in int32_t aSource); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setReloadEncodingAndSource)
  NS_IMETHOD_(void) SetReloadEncodingAndSource(const mozilla::Encoding * aEncoding, int32_t aSource) = 0;

  /* [noscript,notxpcom] void forgetReloadEncoding (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_forgetReloadEncoding)
  NS_IMETHOD_(void) ForgetReloadEncoding(void) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCUMENTVIEWER \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIWidget * aParentWidget, const mozilla::LayoutDeviceIntRect & aBounds, mozilla::dom::WindowGlobalChild * aWindowActor) override; \
  NS_IMETHOD GetContainer(nsIDocShell **aContainer) override; \
  NS_IMETHOD SetContainer(nsIDocShell *aContainer) override; \
  virtual void LoadStart(mozilla::dom::Document *aDoc) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD LoadComplete(nsresult aStatus) override; \
  virtual bool GetLoadCompleted() override; \
  virtual bool GetIsStopped() override; \
  NS_IMETHOD PermitUnload(nsIDocumentViewer::PermitUnloadAction aAction, bool *_retval) override; \
  NS_IMETHOD GetInPermitUnload(bool *aInPermitUnload) override; \
  virtual nsIDocumentViewer::PermitUnloadResult DispatchBeforeUnload(void) override; \
  NS_IMETHOD GetBeforeUnloadFiring(bool *aBeforeUnloadFiring) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD PageHide(bool isUnload) override; \
  NS_IMETHOD Close(void) override; \
  NS_IMETHOD Destroy(void) override; \
  NS_IMETHOD Stop(void) override; \
  NS_IMETHOD GetDOMDocument(mozilla::dom::Document **aDOMDocument) override; \
  virtual mozilla::dom::Document * GetDocument(void) override; \
  MOZ_CAN_RUN_SCRIPT virtual nsresult SetDocument(mozilla::dom::Document *aDocument) override; \
  NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect & aBounds) override; \
  NS_IMETHOD SetBounds(const mozilla::LayoutDeviceIntRect & aBounds) override; \
  NS_IMETHOD SetBoundsWithFlags(const mozilla::LayoutDeviceIntRect & aBounds, uint32_t aFlags) override; \
  virtual nsIDocumentViewer * GetPreviousViewer() override; \
  virtual void SetPreviousViewer(nsIDocumentViewer *aPreviousViewer) override; \
  NS_IMETHOD Move(int32_t aX, int32_t aY) override; \
  NS_IMETHOD Show(void) override; \
  NS_IMETHOD Hide(void) override; \
  NS_IMETHOD GetSticky(bool *aSticky) override; \
  NS_IMETHOD SetSticky(bool aSticky) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Open(void) override; \
  NS_IMETHOD ClearHistoryEntry(void) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPageModeForTesting(bool aPageMode, nsIPrintSettings *aPrintSettings) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrintSettingsForSubdocument(nsIPrintSettings *aPrintSettings, mozilla::layout::RemotePrintJobChild * aRemotePrintJob) override; \
  NS_IMETHOD GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed) override; \
  NS_IMETHOD GetIsHidden(bool *aIsHidden) override; \
  NS_IMETHOD SetIsHidden(bool aIsHidden) override; \
  virtual mozilla::PresShell * GetPresShell() override; \
  virtual nsPresContext * GetPresContext() override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetDocumentInternal(mozilla::dom::Document *aDocument, bool aForceReuseInnerWindow) override; \
  virtual nsSubDocumentFrame * FindContainerFrame(void) override; \
  virtual void SetNavigationTiming(nsDOMNavigationTiming * aTiming) override; \
  NS_IMETHOD GetDeviceFullZoomForTest(float *aDeviceFullZoomForTest) override; \
  NS_IMETHOD GetAuthorStyleDisabled(bool *aAuthorStyleDisabled) override; \
  NS_IMETHOD SetAuthorStyleDisabled(bool aAuthorStyleDisabled) override; \
  NS_IMETHOD GetContentSize(int32_t maxWidth, int32_t maxHeight, int32_t prefWidth, int32_t *width, int32_t *height) override; \
  NS_IMETHOD_(const mozilla::Encoding *) GetReloadEncodingAndSource(int32_t *aSource) override; \
  NS_IMETHOD_(void) SetReloadEncodingAndSource(const mozilla::Encoding * aEncoding, int32_t aSource) override; \
  NS_IMETHOD_(void) ForgetReloadEncoding(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_NSIDOCUMENTVIEWER \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_init)\
  MOZ_CAN_RUN_SCRIPT nsresult Init(nsIWidget * aParentWidget, const mozilla::LayoutDeviceIntRect & aBounds, mozilla::dom::WindowGlobalChild * aWindowActor); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_container)\
  nsresult GetContainer(nsIDocShell **aContainer); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_container)\
  nsresult SetContainer(nsIDocShell *aContainer); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_loadStart)\
  void LoadStart(mozilla::dom::Document *aDoc); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_loadComplete)\
  MOZ_CAN_RUN_SCRIPT nsresult LoadComplete(nsresult aStatus); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_loadCompleted)\
  bool GetLoadCompleted(); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isStopped)\
  bool GetIsStopped(); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_permitUnload)\
  nsresult PermitUnload(nsIDocumentViewer::PermitUnloadAction aAction, bool *_retval); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_inPermitUnload)\
  nsresult GetInPermitUnload(bool *aInPermitUnload); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_dispatchBeforeUnload)\
  nsIDocumentViewer::PermitUnloadResult DispatchBeforeUnload(void); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_beforeUnloadFiring)\
  nsresult GetBeforeUnloadFiring(bool *aBeforeUnloadFiring); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_pageHide)\
  MOZ_CAN_RUN_SCRIPT nsresult PageHide(bool isUnload); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_close)\
  nsresult Close(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_destroy)\
  nsresult Destroy(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_stop)\
  nsresult Stop(void); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_DOMDocument)\
  nsresult GetDOMDocument(mozilla::dom::Document **aDOMDocument); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getDocument)\
  mozilla::dom::Document * GetDocument(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setDocument)\
  MOZ_CAN_RUN_SCRIPT nsresult SetDocument(mozilla::dom::Document *aDocument); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getBounds)\
  nsresult GetBounds(mozilla::LayoutDeviceIntRect & aBounds); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setBounds)\
  nsresult SetBounds(const mozilla::LayoutDeviceIntRect & aBounds); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setBoundsWithFlags)\
  nsresult SetBoundsWithFlags(const mozilla::LayoutDeviceIntRect & aBounds, uint32_t aFlags); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_previousViewer)\
  nsIDocumentViewer * GetPreviousViewer(); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_previousViewer)\
  void SetPreviousViewer(nsIDocumentViewer *aPreviousViewer); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_move)\
  nsresult Move(int32_t aX, int32_t aY); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_show)\
  nsresult Show(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_hide)\
  nsresult Hide(void); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_sticky)\
  nsresult GetSticky(bool *aSticky); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_sticky)\
  nsresult SetSticky(bool aSticky); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_open)\
  MOZ_CAN_RUN_SCRIPT nsresult Open(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_clearHistoryEntry)\
  nsresult ClearHistoryEntry(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setPageModeForTesting)\
  MOZ_CAN_RUN_SCRIPT nsresult SetPageModeForTesting(bool aPageMode, nsIPrintSettings *aPrintSettings); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setPrintSettingsForSubdocument)\
  MOZ_CAN_RUN_SCRIPT nsresult SetPrintSettingsForSubdocument(nsIPrintSettings *aPrintSettings, mozilla::layout::RemotePrintJobChild * aRemotePrintJob); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isTabModalPromptAllowed)\
  nsresult GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_isHidden)\
  nsresult GetIsHidden(bool *aIsHidden); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_isHidden)\
  nsresult SetIsHidden(bool aIsHidden); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_presShell)\
  mozilla::PresShell * GetPresShell(); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_presContext)\
  nsPresContext * GetPresContext(); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setDocumentInternal)\
  MOZ_CAN_RUN_SCRIPT nsresult SetDocumentInternal(mozilla::dom::Document *aDocument, bool aForceReuseInnerWindow); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_findContainerFrame)\
  nsSubDocumentFrame * FindContainerFrame(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setNavigationTiming)\
  void SetNavigationTiming(nsDOMNavigationTiming * aTiming); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_deviceFullZoomForTest)\
  nsresult GetDeviceFullZoomForTest(float *aDeviceFullZoomForTest); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIDocumentViewer_authorStyleDisabled)\
  nsresult GetAuthorStyleDisabled(bool *aAuthorStyleDisabled); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIDocumentViewer_authorStyleDisabled)\
  nsresult SetAuthorStyleDisabled(bool aAuthorStyleDisabled); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getContentSize)\
  nsresult GetContentSize(int32_t maxWidth, int32_t maxHeight, int32_t prefWidth, int32_t *width, int32_t *height); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_getReloadEncodingAndSource)\
  nsresult_(const mozilla::Encoding *) GetReloadEncodingAndSource(int32_t *aSource); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_setReloadEncodingAndSource)\
  nsresult_(void) SetReloadEncodingAndSource(const mozilla::Encoding * aEncoding, int32_t aSource); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIDocumentViewer_forgetReloadEncoding)\
  nsresult_(void) ForgetReloadEncoding(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOCUMENTVIEWER(_to) \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIWidget * aParentWidget, const mozilla::LayoutDeviceIntRect & aBounds, mozilla::dom::WindowGlobalChild * aWindowActor) override { return _to Init(aParentWidget, aBounds, aWindowActor); } \
  NS_IMETHOD GetContainer(nsIDocShell **aContainer) override { return _to GetContainer(aContainer); } \
  NS_IMETHOD SetContainer(nsIDocShell *aContainer) override { return _to SetContainer(aContainer); } \
  virtual void LoadStart(mozilla::dom::Document *aDoc) override { return _to LoadStart(aDoc); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD LoadComplete(nsresult aStatus) override { return _to LoadComplete(aStatus); } \
  virtual bool GetLoadCompleted() override { return _to GetLoadCompleted(); } \
  virtual bool GetIsStopped() override { return _to GetIsStopped(); } \
  NS_IMETHOD PermitUnload(nsIDocumentViewer::PermitUnloadAction aAction, bool *_retval) override { return _to PermitUnload(aAction, _retval); } \
  NS_IMETHOD GetInPermitUnload(bool *aInPermitUnload) override { return _to GetInPermitUnload(aInPermitUnload); } \
  virtual nsIDocumentViewer::PermitUnloadResult DispatchBeforeUnload(void) override { return _to DispatchBeforeUnload(); } \
  NS_IMETHOD GetBeforeUnloadFiring(bool *aBeforeUnloadFiring) override { return _to GetBeforeUnloadFiring(aBeforeUnloadFiring); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD PageHide(bool isUnload) override { return _to PageHide(isUnload); } \
  NS_IMETHOD Close(void) override { return _to Close(); } \
  NS_IMETHOD Destroy(void) override { return _to Destroy(); } \
  NS_IMETHOD Stop(void) override { return _to Stop(); } \
  NS_IMETHOD GetDOMDocument(mozilla::dom::Document **aDOMDocument) override { return _to GetDOMDocument(aDOMDocument); } \
  virtual mozilla::dom::Document * GetDocument(void) override { return _to GetDocument(); } \
  MOZ_CAN_RUN_SCRIPT virtual nsresult SetDocument(mozilla::dom::Document *aDocument) override { return _to SetDocument(aDocument); } \
  NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect & aBounds) override { return _to GetBounds(aBounds); } \
  NS_IMETHOD SetBounds(const mozilla::LayoutDeviceIntRect & aBounds) override { return _to SetBounds(aBounds); } \
  NS_IMETHOD SetBoundsWithFlags(const mozilla::LayoutDeviceIntRect & aBounds, uint32_t aFlags) override { return _to SetBoundsWithFlags(aBounds, aFlags); } \
  virtual nsIDocumentViewer * GetPreviousViewer() override { return _to GetPreviousViewer(); } \
  virtual void SetPreviousViewer(nsIDocumentViewer *aPreviousViewer) override { return _to SetPreviousViewer(aPreviousViewer); } \
  NS_IMETHOD Move(int32_t aX, int32_t aY) override { return _to Move(aX, aY); } \
  NS_IMETHOD Show(void) override { return _to Show(); } \
  NS_IMETHOD Hide(void) override { return _to Hide(); } \
  NS_IMETHOD GetSticky(bool *aSticky) override { return _to GetSticky(aSticky); } \
  NS_IMETHOD SetSticky(bool aSticky) override { return _to SetSticky(aSticky); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Open(void) override { return _to Open(); } \
  NS_IMETHOD ClearHistoryEntry(void) override { return _to ClearHistoryEntry(); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPageModeForTesting(bool aPageMode, nsIPrintSettings *aPrintSettings) override { return _to SetPageModeForTesting(aPageMode, aPrintSettings); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrintSettingsForSubdocument(nsIPrintSettings *aPrintSettings, mozilla::layout::RemotePrintJobChild * aRemotePrintJob) override { return _to SetPrintSettingsForSubdocument(aPrintSettings, aRemotePrintJob); } \
  NS_IMETHOD GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed) override { return _to GetIsTabModalPromptAllowed(aIsTabModalPromptAllowed); } \
  NS_IMETHOD GetIsHidden(bool *aIsHidden) override { return _to GetIsHidden(aIsHidden); } \
  NS_IMETHOD SetIsHidden(bool aIsHidden) override { return _to SetIsHidden(aIsHidden); } \
  virtual mozilla::PresShell * GetPresShell() override { return _to GetPresShell(); } \
  virtual nsPresContext * GetPresContext() override { return _to GetPresContext(); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetDocumentInternal(mozilla::dom::Document *aDocument, bool aForceReuseInnerWindow) override { return _to SetDocumentInternal(aDocument, aForceReuseInnerWindow); } \
  virtual nsSubDocumentFrame * FindContainerFrame(void) override { return _to FindContainerFrame(); } \
  virtual void SetNavigationTiming(nsDOMNavigationTiming * aTiming) override { return _to SetNavigationTiming(aTiming); } \
  NS_IMETHOD GetDeviceFullZoomForTest(float *aDeviceFullZoomForTest) override { return _to GetDeviceFullZoomForTest(aDeviceFullZoomForTest); } \
  NS_IMETHOD GetAuthorStyleDisabled(bool *aAuthorStyleDisabled) override { return _to GetAuthorStyleDisabled(aAuthorStyleDisabled); } \
  NS_IMETHOD SetAuthorStyleDisabled(bool aAuthorStyleDisabled) override { return _to SetAuthorStyleDisabled(aAuthorStyleDisabled); } \
  NS_IMETHOD GetContentSize(int32_t maxWidth, int32_t maxHeight, int32_t prefWidth, int32_t *width, int32_t *height) override { return _to GetContentSize(maxWidth, maxHeight, prefWidth, width, height); } \
  NS_IMETHOD_(const mozilla::Encoding *) GetReloadEncodingAndSource(int32_t *aSource) override { return _to GetReloadEncodingAndSource(aSource); } \
  NS_IMETHOD_(void) SetReloadEncodingAndSource(const mozilla::Encoding * aEncoding, int32_t aSource) override { return _to SetReloadEncodingAndSource(aEncoding, aSource); } \
  NS_IMETHOD_(void) ForgetReloadEncoding(void) override { return _to ForgetReloadEncoding(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOCUMENTVIEWER(_to) \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIWidget * aParentWidget, const mozilla::LayoutDeviceIntRect & aBounds, mozilla::dom::WindowGlobalChild * aWindowActor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aParentWidget, aBounds, aWindowActor); } \
  NS_IMETHOD GetContainer(nsIDocShell **aContainer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContainer(aContainer); } \
  NS_IMETHOD SetContainer(nsIDocShell *aContainer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContainer(aContainer); } \
  virtual void LoadStart(mozilla::dom::Document *aDoc) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD LoadComplete(nsresult aStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadComplete(aStatus); } \
  virtual bool GetLoadCompleted() override; \
  virtual bool GetIsStopped() override; \
  NS_IMETHOD PermitUnload(nsIDocumentViewer::PermitUnloadAction aAction, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PermitUnload(aAction, _retval); } \
  NS_IMETHOD GetInPermitUnload(bool *aInPermitUnload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInPermitUnload(aInPermitUnload); } \
  virtual nsIDocumentViewer::PermitUnloadResult DispatchBeforeUnload(void) override; \
  NS_IMETHOD GetBeforeUnloadFiring(bool *aBeforeUnloadFiring) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBeforeUnloadFiring(aBeforeUnloadFiring); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD PageHide(bool isUnload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PageHide(isUnload); } \
  NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  NS_IMETHOD Destroy(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Destroy(); } \
  NS_IMETHOD Stop(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); } \
  NS_IMETHOD GetDOMDocument(mozilla::dom::Document **aDOMDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMDocument(aDOMDocument); } \
  virtual mozilla::dom::Document * GetDocument(void) override; \
  MOZ_CAN_RUN_SCRIPT virtual nsresult SetDocument(mozilla::dom::Document *aDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocument(aDocument); } \
  NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect & aBounds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBounds(aBounds); } \
  NS_IMETHOD SetBounds(const mozilla::LayoutDeviceIntRect & aBounds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBounds(aBounds); } \
  NS_IMETHOD SetBoundsWithFlags(const mozilla::LayoutDeviceIntRect & aBounds, uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBoundsWithFlags(aBounds, aFlags); } \
  virtual nsIDocumentViewer * GetPreviousViewer() override; \
  virtual void SetPreviousViewer(nsIDocumentViewer *aPreviousViewer) override; \
  NS_IMETHOD Move(int32_t aX, int32_t aY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Move(aX, aY); } \
  NS_IMETHOD Show(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Show(); } \
  NS_IMETHOD Hide(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Hide(); } \
  NS_IMETHOD GetSticky(bool *aSticky) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSticky(aSticky); } \
  NS_IMETHOD SetSticky(bool aSticky) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSticky(aSticky); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Open(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(); } \
  NS_IMETHOD ClearHistoryEntry(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearHistoryEntry(); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPageModeForTesting(bool aPageMode, nsIPrintSettings *aPrintSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPageModeForTesting(aPageMode, aPrintSettings); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetPrintSettingsForSubdocument(nsIPrintSettings *aPrintSettings, mozilla::layout::RemotePrintJobChild * aRemotePrintJob) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrintSettingsForSubdocument(aPrintSettings, aRemotePrintJob); } \
  NS_IMETHOD GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsTabModalPromptAllowed(aIsTabModalPromptAllowed); } \
  NS_IMETHOD GetIsHidden(bool *aIsHidden) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsHidden(aIsHidden); } \
  NS_IMETHOD SetIsHidden(bool aIsHidden) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsHidden(aIsHidden); } \
  virtual mozilla::PresShell * GetPresShell() override; \
  virtual nsPresContext * GetPresContext() override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetDocumentInternal(mozilla::dom::Document *aDocument, bool aForceReuseInnerWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentInternal(aDocument, aForceReuseInnerWindow); } \
  virtual nsSubDocumentFrame * FindContainerFrame(void) override; \
  virtual void SetNavigationTiming(nsDOMNavigationTiming * aTiming) override; \
  NS_IMETHOD GetDeviceFullZoomForTest(float *aDeviceFullZoomForTest) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDeviceFullZoomForTest(aDeviceFullZoomForTest); } \
  NS_IMETHOD GetAuthorStyleDisabled(bool *aAuthorStyleDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAuthorStyleDisabled(aAuthorStyleDisabled); } \
  NS_IMETHOD SetAuthorStyleDisabled(bool aAuthorStyleDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAuthorStyleDisabled(aAuthorStyleDisabled); } \
  NS_IMETHOD GetContentSize(int32_t maxWidth, int32_t maxHeight, int32_t prefWidth, int32_t *width, int32_t *height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentSize(maxWidth, maxHeight, prefWidth, width, height); } \
  NS_IMETHOD_(const mozilla::Encoding *) GetReloadEncodingAndSource(int32_t *aSource) override; \
  NS_IMETHOD_(void) SetReloadEncodingAndSource(const mozilla::Encoding * aEncoding, int32_t aSource) override; \
  NS_IMETHOD_(void) ForgetReloadEncoding(void) override; 

// %{C++:294-301
namespace mozilla {
namespace dom {

using XPCOMPermitUnloadAction = nsIDocumentViewer::PermitUnloadAction;
using PermitUnloadResult = nsIDocumentViewer::PermitUnloadResult;

} // namespace dom
} // namespace mozilla
// %}

#endif /* __gen_nsIDocumentViewer_h__ */
