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_WebAuthnTransactionChild_h
8 #define mozilla_dom_WebAuthnTransactionChild_h
10 #include "mozilla/dom/PWebAuthnTransactionChild.h"
11 #include "mozilla/dom/WebAuthnManagerBase.h"
14 * Child process IPC implementation for WebAuthn API. Receives results of
15 * WebAuthn transactions from the parent process, and sends them to the
16 * WebAuthnManager either cancel the transaction, or be formatted and relayed to
23 class WebAuthnTransactionChild final
: public PWebAuthnTransactionChild
{
25 NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionChild
);
26 explicit WebAuthnTransactionChild(WebAuthnManagerBase
* aManager
);
28 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
29 // IPDL-generated things.
30 MOZ_CAN_RUN_SCRIPT_BOUNDARY
31 mozilla::ipc::IPCResult
RecvConfirmRegister(
32 const uint64_t& aTransactionId
,
33 const WebAuthnMakeCredentialResult
& aResult
);
35 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
36 // IPDL-generated things.
37 MOZ_CAN_RUN_SCRIPT_BOUNDARY
38 mozilla::ipc::IPCResult
RecvConfirmSign(
39 const uint64_t& aTransactionId
,
40 const WebAuthnGetAssertionResult
& aResult
);
42 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
43 // IPDL-generated things.
44 MOZ_CAN_RUN_SCRIPT_BOUNDARY
45 mozilla::ipc::IPCResult
RecvAbort(const uint64_t& aTransactionId
,
46 const nsresult
& aError
);
48 void ActorDestroy(ActorDestroyReason why
) override
;
53 ~WebAuthnTransactionChild() = default;
55 // Nulled by ~WebAuthnManager() when disconnecting.
56 WebAuthnManagerBase
* mManager
;
60 } // namespace mozilla
62 #endif // mozilla_dom_WebAuthnTransactionChild_h