Bug 1854550 - pt 10. Allow LOG() with zero extra arguments r=glandium
[gecko.git] / dom / webauthn / WebAuthnTransactionParent.h
blobf117f1bbdb46bf60ad9eda13209f0c283260f3ce
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_WebAuthnTransactionParent_h
8 #define mozilla_dom_WebAuthnTransactionParent_h
10 #include "mozilla/dom/PWebAuthnTransactionParent.h"
11 #include "mozilla/dom/WebAuthnPromiseHolder.h"
14 * Parent process IPC implementation for WebAuthn.
17 namespace mozilla::dom {
19 class WebAuthnRegisterPromiseHolder;
20 class WebAuthnSignPromiseHolder;
22 class WebAuthnTransactionParent final : public PWebAuthnTransactionParent {
23 public:
24 NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionParent);
25 WebAuthnTransactionParent() = default;
27 mozilla::ipc::IPCResult RecvRequestRegister(
28 const uint64_t& aTransactionId,
29 const WebAuthnMakeCredentialInfo& aTransactionInfo);
31 mozilla::ipc::IPCResult RecvRequestSign(
32 const uint64_t& aTransactionId,
33 const WebAuthnGetAssertionInfo& aTransactionInfo);
35 mozilla::ipc::IPCResult RecvRequestCancel(
36 const Tainted<uint64_t>& aTransactionId);
38 mozilla::ipc::IPCResult RecvDestroyMe();
40 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
42 private:
43 ~WebAuthnTransactionParent() = default;
45 Maybe<uint64_t> mTransactionId;
46 MozPromiseRequestHolder<WebAuthnRegisterPromise> mRegisterPromiseRequest;
47 MozPromiseRequestHolder<WebAuthnSignPromise> mSignPromiseRequest;
50 } // namespace mozilla::dom
52 #endif // mozilla_dom_WebAuthnTransactionParent_h