Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / toolkit / xre / dllservices / WinDllServices.h
bloba5d4f9b3633735efc759dfd67c0234e732adc12f
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 https://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_WinDllServices_h
8 #define mozilla_WinDllServices_h
10 #include "mozilla/glue/WindowsDllServices.h"
11 #include "mozilla/Maybe.h"
12 #include "mozilla/MozPromise.h"
13 #include "mozilla/RefPtr.h"
15 namespace mozilla {
17 class UntrustedModulesData;
18 class UntrustedModulesProcessor;
20 using UntrustedModulesPromise =
21 MozPromise<Maybe<UntrustedModulesData>, nsresult, true>;
23 struct ModulePaths;
24 class ModulesMapResult;
26 using ModulesTrustPromise = MozPromise<ModulesMapResult, nsresult, true>;
28 class DllServices final : public glue::DllServices {
29 public:
30 static DllServices* Get();
32 virtual void DisableFull() override;
34 static const char* kTopicDllLoadedMainThread;
35 static const char* kTopicDllLoadedNonMainThread;
37 void StartUntrustedModulesProcessor(bool aIsReadyForBackgroundProcessing);
38 bool IsReadyForBackgroundProcessing() const;
40 RefPtr<UntrustedModulesPromise> GetUntrustedModulesData();
42 RefPtr<ModulesTrustPromise> GetModulesTrust(ModulePaths&& aModPaths,
43 bool aRunAtNormalPriority);
45 private:
46 DllServices() = default;
47 ~DllServices();
49 void NotifyDllLoad(glue::EnhancedModuleLoadInfo&& aModLoadInfo) override;
50 void NotifyModuleLoadBacklog(ModuleLoadInfoVec&& aEvents) override;
52 RefPtr<UntrustedModulesProcessor> mUntrustedModulesProcessor;
55 } // namespace mozilla
57 #endif // mozilla_WinDllServices_h