Source code

Revision control

Other Tools

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/. */
6
7
#ifndef mozilla_dom_AuthenticatorAttestationResponse_h
8
#define mozilla_dom_AuthenticatorAttestationResponse_h
9
10
#include "js/TypeDecls.h"
11
#include "mozilla/Attributes.h"
12
#include "mozilla/ErrorResult.h"
13
#include "mozilla/dom/AuthenticatorResponse.h"
14
#include "mozilla/dom/BindingDeclarations.h"
15
#include "mozilla/dom/CryptoBuffer.h"
16
#include "nsCycleCollectionParticipant.h"
17
#include "nsWrapperCache.h"
18
19
namespace mozilla {
20
namespace dom {
21
22
class AuthenticatorAttestationResponse final : public AuthenticatorResponse {
23
public:
24
NS_DECL_ISUPPORTS_INHERITED
25
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
26
AuthenticatorAttestationResponse, AuthenticatorResponse)
27
28
explicit AuthenticatorAttestationResponse(nsPIDOMWindowInner* aParent);
29
30
protected:
31
~AuthenticatorAttestationResponse() override;
32
33
public:
34
virtual JSObject* WrapObject(JSContext* aCx,
35
JS::Handle<JSObject*> aGivenProto) override;
36
37
void GetAttestationObject(JSContext* aCx,
38
JS::MutableHandle<JSObject*> aRetVal);
39
40
nsresult SetAttestationObject(CryptoBuffer& aBuffer);
41
42
private:
43
CryptoBuffer mAttestationObject;
44
JS::Heap<JSObject*> mAttestationObjectCachedObj;
45
};
46
47
} // namespace dom
48
} // namespace mozilla
49
50
#endif // mozilla_dom_AuthenticatorAttestationResponse_h