2017-10-26 22:08:41 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2017-01-09 20:22:49 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2017-05-17 00:07:01 +00:00
|
|
|
#ifndef mozilla_dom_AuthenticatorResponse_h
|
|
|
|
#define mozilla_dom_AuthenticatorResponse_h
|
2017-01-09 20:22:49 +00:00
|
|
|
|
|
|
|
#include "js/TypeDecls.h"
|
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
#include "mozilla/ErrorResult.h"
|
2017-05-17 00:07:01 +00:00
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
|
|
|
#include "mozilla/dom/CryptoBuffer.h"
|
2017-01-09 20:22:49 +00:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2017-05-17 00:07:01 +00:00
|
|
|
class AuthenticatorResponse : public nsISupports, public nsWrapperCache {
|
2017-01-09 20:22:49 +00:00
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2017-05-17 00:07:01 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AuthenticatorResponse)
|
2017-01-09 20:22:49 +00:00
|
|
|
|
2017-05-17 00:07:01 +00:00
|
|
|
explicit AuthenticatorResponse(nsPIDOMWindowInner* aParent);
|
2017-01-09 20:22:49 +00:00
|
|
|
|
|
|
|
protected:
|
2017-05-17 00:07:01 +00:00
|
|
|
virtual ~AuthenticatorResponse();
|
2017-01-09 20:22:49 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
nsISupports* GetParentObject() const { return mParent; }
|
|
|
|
|
2017-05-17 00:07:01 +00:00
|
|
|
void GetFormat(nsString& aRetVal) const;
|
2017-01-09 20:22:49 +00:00
|
|
|
|
2017-07-26 17:03:17 +00:00
|
|
|
void GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
2017-05-17 00:07:01 +00:00
|
|
|
|
|
|
|
nsresult SetClientDataJSON(CryptoBuffer& aBuffer);
|
2017-01-09 20:22:49 +00:00
|
|
|
|
|
|
|
private:
|
2017-04-06 22:30:54 +00:00
|
|
|
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
2017-05-17 00:07:01 +00:00
|
|
|
CryptoBuffer mClientDataJSON;
|
2017-07-26 17:03:17 +00:00
|
|
|
JS::Heap<JSObject*> mClientDataJSONCachedObj;
|
2017-01-09 20:22:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2017-05-17 00:07:01 +00:00
|
|
|
#endif // mozilla_dom_AuthenticatorResponse_h
|