tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AuthenticatorResponse.h (1461B)


      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_AuthenticatorResponse_h
      8 #define mozilla_dom_AuthenticatorResponse_h
      9 
     10 #include "js/TypeDecls.h"
     11 #include "mozilla/ErrorResult.h"
     12 #include "mozilla/dom/BindingDeclarations.h"
     13 #include "nsCOMPtr.h"
     14 #include "nsCycleCollectionParticipant.h"
     15 #include "nsPIDOMWindow.h"
     16 #include "nsWrapperCache.h"
     17 
     18 namespace mozilla::dom {
     19 
     20 class AuthenticatorResponse : public nsISupports, public nsWrapperCache {
     21 public:
     22  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     23  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AuthenticatorResponse)
     24 
     25  explicit AuthenticatorResponse(nsPIDOMWindowInner* aParent);
     26 
     27 protected:
     28  virtual ~AuthenticatorResponse();
     29 
     30 public:
     31  nsISupports* GetParentObject() const;
     32 
     33  void GetFormat(nsString& aRetVal) const;
     34 
     35  void GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aValue,
     36                         ErrorResult& aRv);
     37 
     38  void SetClientDataJSON(const nsCString& aBuffer);
     39 
     40 protected:
     41  nsCString mClientDataJSON;
     42 
     43 private:
     44  nsCOMPtr<nsPIDOMWindowInner> mParent;
     45  JS::Heap<JSObject*> mClientDataJSONCachedObj;
     46 };
     47 
     48 }  // namespace mozilla::dom
     49 
     50 #endif  // mozilla_dom_AuthenticatorResponse_h