Bug 1708193 - Remove mozapps/extensions/internal/Content.js r=rpl
[gecko.git] / dom / webauthn / AuthenticatorAttestationResponse.h
blob45f96c7026676e589e680b052304a91582709c98
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_AuthenticatorAttestationResponse_h
8 #define mozilla_dom_AuthenticatorAttestationResponse_h
10 #include "js/TypeDecls.h"
11 #include "mozilla/Attributes.h"
12 #include "mozilla/dom/AuthenticatorResponse.h"
13 #include "mozilla/dom/BindingDeclarations.h"
14 #include "mozilla/dom/CryptoBuffer.h"
15 #include "nsCycleCollectionParticipant.h"
16 #include "nsWrapperCache.h"
18 namespace mozilla {
19 namespace dom {
21 class AuthenticatorAttestationResponse final : public AuthenticatorResponse {
22 public:
23 NS_DECL_ISUPPORTS_INHERITED
24 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
25 AuthenticatorAttestationResponse, AuthenticatorResponse)
27 explicit AuthenticatorAttestationResponse(nsPIDOMWindowInner* aParent);
29 protected:
30 ~AuthenticatorAttestationResponse() override;
32 public:
33 virtual JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
36 void GetAttestationObject(JSContext* aCx,
37 JS::MutableHandle<JSObject*> aRetVal);
39 nsresult SetAttestationObject(CryptoBuffer& aBuffer);
41 private:
42 CryptoBuffer mAttestationObject;
43 JS::Heap<JSObject*> mAttestationObjectCachedObj;
46 } // namespace dom
47 } // namespace mozilla
49 #endif // mozilla_dom_AuthenticatorAttestationResponse_h