2017-10-27 01:08:41 +03: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 23:22:49 +03: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 03:07:01 +03:00
|
|
|
#ifndef mozilla_dom_AuthenticatorResponse_h
|
|
|
|
#define mozilla_dom_AuthenticatorResponse_h
|
2017-01-09 23:22:49 +03:00
|
|
|
|
|
|
|
#include "js/TypeDecls.h"
|
|
|
|
#include "mozilla/Attributes.h"
|
2017-05-17 03:07:01 +03:00
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
|
|
|
#include "mozilla/dom/CryptoBuffer.h"
|
2017-01-09 23:22:49 +03:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsWrapperCache.h"
|
2020-11-10 19:32:16 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsPIDOMWindow.h"
|
2017-01-09 23:22:49 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2017-05-17 03:07:01 +03:00
|
|
|
class AuthenticatorResponse : public nsISupports, public nsWrapperCache {
|
2017-01-09 23:22:49 +03:00
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2017-05-17 03:07:01 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AuthenticatorResponse)
|
2017-01-09 23:22:49 +03:00
|
|
|
|
2017-05-17 03:07:01 +03:00
|
|
|
explicit AuthenticatorResponse(nsPIDOMWindowInner* aParent);
|
2017-01-09 23:22:49 +03:00
|
|
|
|
|
|
|
protected:
|
2017-05-17 03:07:01 +03:00
|
|
|
virtual ~AuthenticatorResponse();
|
2017-01-09 23:22:49 +03:00
|
|
|
|
|
|
|
public:
|
2020-11-23 19:07:43 +03:00
|
|
|
nsISupports* GetParentObject() const;
|
2017-01-09 23:22:49 +03:00
|
|
|
|
2017-05-17 03:07:01 +03:00
|
|
|
void GetFormat(nsString& aRetVal) const;
|
2017-01-09 23:22:49 +03:00
|
|
|
|
2017-07-26 20:03:17 +03:00
|
|
|
void GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
2017-05-17 03:07:01 +03:00
|
|
|
|
|
|
|
nsresult SetClientDataJSON(CryptoBuffer& aBuffer);
|
2017-01-09 23:22:49 +03:00
|
|
|
|
|
|
|
private:
|
2017-04-07 01:30:54 +03:00
|
|
|
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
2017-05-17 03:07:01 +03:00
|
|
|
CryptoBuffer mClientDataJSON;
|
2017-07-26 20:03:17 +03:00
|
|
|
JS::Heap<JSObject*> mClientDataJSONCachedObj;
|
2017-01-09 23:22:49 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2017-05-17 03:07:01 +03:00
|
|
|
#endif // mozilla_dom_AuthenticatorResponse_h
|