Bug 1691109 [wpt PR 27513] - Increase timeout duration for wpt/fetch/api/basic/keepal...
[gecko.git] / dom / webauthn / WebAuthnTransactionChild.h
blobe7c3798a0e40a66e72fe60d9c2a0f0be79e1a4bd
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 {
21 namespace dom {
23 class WebAuthnTransactionChild final : public PWebAuthnTransactionChild {
24 public:
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;
50 void Disconnect();
52 private:
53 ~WebAuthnTransactionChild() = default;
55 // Nulled by ~WebAuthnManager() when disconnecting.
56 WebAuthnManagerBase* mManager;
59 } // namespace dom
60 } // namespace mozilla
62 #endif // mozilla_dom_WebAuthnTransactionChild_h