Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / dom / webauthn / WebAuthnTransactionChild.h
blobfd2d4db90b28801724597f2f150a5279a9834c9b
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
17 * content.
20 namespace mozilla::dom {
22 class WebAuthnTransactionChild final : public PWebAuthnTransactionChild {
23 public:
24 NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionChild);
25 explicit WebAuthnTransactionChild(WebAuthnManagerBase* aManager);
27 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
28 // IPDL-generated things.
29 MOZ_CAN_RUN_SCRIPT_BOUNDARY
30 mozilla::ipc::IPCResult RecvConfirmRegister(
31 const uint64_t& aTransactionId,
32 const WebAuthnMakeCredentialResult& aResult);
34 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
35 // IPDL-generated things.
36 MOZ_CAN_RUN_SCRIPT_BOUNDARY
37 mozilla::ipc::IPCResult RecvConfirmSign(
38 const uint64_t& aTransactionId,
39 const WebAuthnGetAssertionResult& aResult);
41 // MOZ_CAN_RUN_SCRIPT_BOUNDARY until we can do MOZ_CAN_RUN_SCRIPT in
42 // IPDL-generated things.
43 MOZ_CAN_RUN_SCRIPT_BOUNDARY
44 mozilla::ipc::IPCResult RecvAbort(const uint64_t& aTransactionId,
45 const nsresult& aError);
47 void ActorDestroy(ActorDestroyReason why) override;
49 void Disconnect();
51 private:
52 ~WebAuthnTransactionChild() = default;
54 // Nulled by ~WebAuthnManager() when disconnecting.
55 WebAuthnManagerBase* mManager;
58 } // namespace mozilla::dom
60 #endif // mozilla_dom_WebAuthnTransactionChild_h