/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/media/nsIMediaPictureInPictureProvider.idl
*/
#ifndef __gen_nsIMediaPictureInPictureProvider_h__
#define __gen_nsIMediaPictureInPictureProvider_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 Element; /* webidl Element */
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class PictureInPictureWindow; /* webidl PictureInPictureWindow */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIMediaPictureInPictureProvider */
#define NS_IMEDIAPICTUREINPICTUREPROVIDER_IID_STR "b6d8b8d7-8b81-493d-806d-fb10072e3afd"
#define NS_IMEDIAPICTUREINPICTUREPROVIDER_IID \
{0xb6d8b8d7, 0x8b81, 0x493d, \
{ 0x80, 0x6d, 0xfb, 0x10, 0x07, 0x2e, 0x3a, 0xfd }}
class NS_NO_VTABLE nsIMediaPictureInPictureProvider : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IMEDIAPICTUREINPICTUREPROVIDER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIMediaPictureInPictureProvider;
/* [implicit_jscontext] Promise openMediaPictureInPictureWindow (in Element videoElement, in PictureInPictureWindow pictureInPictureWindow); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OpenMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, mozilla::dom::PictureInPictureWindow *pictureInPictureWindow, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise closeMediaPictureInPictureWindow (in Element videoElement); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CloseMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMEDIAPICTUREINPICTUREPROVIDER \
NS_IMETHOD OpenMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, mozilla::dom::PictureInPictureWindow *pictureInPictureWindow, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD CloseMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, JSContext* cx, ::mozilla::dom::Promise * * _retval) 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_NSIMEDIAPICTUREINPICTUREPROVIDER \
nsresult OpenMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, mozilla::dom::PictureInPictureWindow *pictureInPictureWindow, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult CloseMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, JSContext* cx, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMEDIAPICTUREINPICTUREPROVIDER(_to) \
NS_IMETHOD OpenMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, mozilla::dom::PictureInPictureWindow *pictureInPictureWindow, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to OpenMediaPictureInPictureWindow(videoElement, pictureInPictureWindow, cx, _retval); } \
NS_IMETHOD CloseMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to CloseMediaPictureInPictureWindow(videoElement, cx, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMEDIAPICTUREINPICTUREPROVIDER(_to) \
NS_IMETHOD OpenMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, mozilla::dom::PictureInPictureWindow *pictureInPictureWindow, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMediaPictureInPictureWindow(videoElement, pictureInPictureWindow, cx, _retval); } \
NS_IMETHOD CloseMediaPictureInPictureWindow(mozilla::dom::Element *videoElement, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseMediaPictureInPictureWindow(videoElement, cx, _retval); }
#endif /* __gen_nsIMediaPictureInPictureProvider_h__ */