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_JSValidatorParent
8 #define mozilla_dom_JSValidatorParent
10 #include "mozilla/MozPromise.h"
11 #include "mozilla/ProcInfo.h"
12 #include "mozilla/dom/PJSValidatorParent.h"
14 namespace mozilla::ipc
{
15 class UtilityProcessParent
;
17 } // namespace mozilla::ipc
19 namespace mozilla::dom
{
21 class JSValidatorParent final
: public PJSValidatorParent
{
23 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(JSValidatorParent
, override
);
25 static already_AddRefed
<JSValidatorParent
> Create();
27 void IsOpaqueResponseAllowed(
28 const std::function
<void(Maybe
<mozilla::ipc::Shmem
>, ValidatorResult
)>&
31 void OnDataAvailable(const nsACString
& aData
);
33 void OnStopRequest(nsresult aResult
, nsIRequest
& aRequest
);
36 virtual ~JSValidatorParent() = default;
38 } // namespace mozilla::dom
40 #endif // defined(mozilla_dom_JSValidatorParent)