/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/extensions/extIWebNavigation.idl */ #ifndef __gen_extIWebNavigation_h__ #define __gen_extIWebNavigation_h__ #include "nsISupports.h" #include "js/Value.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 namespace mozilla { namespace dom { class BrowsingContext; /* webidl BrowsingContext */ } // namespace dom } // namespace mozilla class nsIURI; /* forward declaration */ /* starting interface: extIWebNavigation */ #define EXTIWEBNAVIGATION_IID_STR "5cc10dac-cab3-41dd-b4ce-55e27c43cc40" #define EXTIWEBNAVIGATION_IID \ {0x5cc10dac, 0xcab3, 0x41dd, \ { 0xb4, 0xce, 0x55, 0xe2, 0x7c, 0x43, 0xcc, 0x40 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_extIWebNavigation) extIWebNavigation : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(EXTIWEBNAVIGATION_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = extIWebNavigation; /* void onDocumentChange (in BrowsingContext bc, in jsval transitionData, in nsIURI location); */ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onDocumentChange) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDocumentChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location) = 0; /* void onHistoryChange (in BrowsingContext bc, in jsval transitionData, in nsIURI location, in boolean isHistoryStateUpdated, in boolean isReferenceFragmentUpdated); */ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onHistoryChange) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnHistoryChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location, bool isHistoryStateUpdated, bool isReferenceFragmentUpdated) = 0; /* void onStateChange (in BrowsingContext bc, in nsIURI requestURI, in nsresult status, in unsigned long stateFlags); */ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onStateChange) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStateChange(mozilla::dom::BrowsingContext *bc, nsIURI *requestURI, nsresult status, uint32_t stateFlags) = 0; /* void onCreatedNavigationTarget (in BrowsingContext bc, in BrowsingContext sourceBC, in ACString url); */ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onCreatedNavigationTarget) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnCreatedNavigationTarget(mozilla::dom::BrowsingContext *bc, mozilla::dom::BrowsingContext *sourceBC, const nsACString& url) = 0; /* void onDOMContentLoaded (in BrowsingContext bc, in nsIURI documentURI); */ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onDOMContentLoaded) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDOMContentLoaded(mozilla::dom::BrowsingContext *bc, nsIURI *documentURI) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_EXTIWEBNAVIGATION \ NS_IMETHOD OnDocumentChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location) override; \ NS_IMETHOD OnHistoryChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location, bool isHistoryStateUpdated, bool isReferenceFragmentUpdated) override; \ NS_IMETHOD OnStateChange(mozilla::dom::BrowsingContext *bc, nsIURI *requestURI, nsresult status, uint32_t stateFlags) override; \ NS_IMETHOD OnCreatedNavigationTarget(mozilla::dom::BrowsingContext *bc, mozilla::dom::BrowsingContext *sourceBC, const nsACString& url) override; \ NS_IMETHOD OnDOMContentLoaded(mozilla::dom::BrowsingContext *bc, nsIURI *documentURI) 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_EXTIWEBNAVIGATION \ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onDocumentChange)\ nsresult OnDocumentChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location); \ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onHistoryChange)\ nsresult OnHistoryChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location, bool isHistoryStateUpdated, bool isReferenceFragmentUpdated); \ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onStateChange)\ nsresult OnStateChange(mozilla::dom::BrowsingContext *bc, nsIURI *requestURI, nsresult status, uint32_t stateFlags); \ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onCreatedNavigationTarget)\ nsresult OnCreatedNavigationTarget(mozilla::dom::BrowsingContext *bc, mozilla::dom::BrowsingContext *sourceBC, const nsACString& url); \ MOZ_BINDING(binding_to, idl, method, XPIDL_extIWebNavigation_onDOMContentLoaded)\ nsresult OnDOMContentLoaded(mozilla::dom::BrowsingContext *bc, nsIURI *documentURI); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_EXTIWEBNAVIGATION(_to) \ NS_IMETHOD OnDocumentChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location) override { return _to OnDocumentChange(bc, transitionData, location); } \ NS_IMETHOD OnHistoryChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location, bool isHistoryStateUpdated, bool isReferenceFragmentUpdated) override { return _to OnHistoryChange(bc, transitionData, location, isHistoryStateUpdated, isReferenceFragmentUpdated); } \ NS_IMETHOD OnStateChange(mozilla::dom::BrowsingContext *bc, nsIURI *requestURI, nsresult status, uint32_t stateFlags) override { return _to OnStateChange(bc, requestURI, status, stateFlags); } \ NS_IMETHOD OnCreatedNavigationTarget(mozilla::dom::BrowsingContext *bc, mozilla::dom::BrowsingContext *sourceBC, const nsACString& url) override { return _to OnCreatedNavigationTarget(bc, sourceBC, url); } \ NS_IMETHOD OnDOMContentLoaded(mozilla::dom::BrowsingContext *bc, nsIURI *documentURI) override { return _to OnDOMContentLoaded(bc, documentURI); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_EXTIWEBNAVIGATION(_to) \ NS_IMETHOD OnDocumentChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDocumentChange(bc, transitionData, location); } \ NS_IMETHOD OnHistoryChange(mozilla::dom::BrowsingContext *bc, JS::Handle transitionData, nsIURI *location, bool isHistoryStateUpdated, bool isReferenceFragmentUpdated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHistoryChange(bc, transitionData, location, isHistoryStateUpdated, isReferenceFragmentUpdated); } \ NS_IMETHOD OnStateChange(mozilla::dom::BrowsingContext *bc, nsIURI *requestURI, nsresult status, uint32_t stateFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStateChange(bc, requestURI, status, stateFlags); } \ NS_IMETHOD OnCreatedNavigationTarget(mozilla::dom::BrowsingContext *bc, mozilla::dom::BrowsingContext *sourceBC, const nsACString& url) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreatedNavigationTarget(bc, sourceBC, url); } \ NS_IMETHOD OnDOMContentLoaded(mozilla::dom::BrowsingContext *bc, nsIURI *documentURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDOMContentLoaded(bc, documentURI); } #endif /* __gen_extIWebNavigation_h__ */