1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_ImageCaptureError_h
8 #define mozilla_dom_ImageCaptureError_h
10 #include "mozilla/Attributes.h"
13 #include "nsWrapperCache.h"
15 namespace mozilla::dom
{
18 * This is the implementation of ImageCaptureError on W3C specification
19 * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html#idl-def-ImageCaptureError.
20 * This object should be generated by ImageCapture object only.
22 class ImageCaptureError final
: public nsISupports
, public nsWrapperCache
{
24 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
25 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ImageCaptureError
)
27 ImageCaptureError(nsISupports
* aParent
, uint16_t aCode
,
28 const nsAString
& aMessage
);
30 nsISupports
* GetParentObject() const;
32 virtual JSObject
* WrapObject(JSContext
* aCx
,
33 JS::Handle
<JSObject
*> aGivenProto
) override
;
35 uint16_t Code() const;
44 void GetMessage(nsAString
& retval
) const;
49 nsCOMPtr
<nsISupports
> mParent
;
54 } // namespace mozilla::dom
56 #endif // mozilla_dom_ImageCaptureError_h