Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page...
[gecko.git] / dom / ipc / JSValidatorParent.h
blob66528a6470924107bdaa0455a6c67bd4046e93d5
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;
16 class IProtocol;
17 } // namespace mozilla::ipc
19 namespace mozilla::dom {
21 class JSValidatorParent final : public PJSValidatorParent {
22 public:
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)>&
29 aCallback);
31 void OnDataAvailable(const nsACString& aData);
33 void OnStopRequest(nsresult aResult, nsIRequest& aRequest);
35 private:
36 virtual ~JSValidatorParent() = default;
38 } // namespace mozilla::dom
40 #endif // defined(mozilla_dom_JSValidatorParent)