Bug 1866777 - Disable test_race_cache_with_network.js on windows opt for frequent...
[gecko.git] / gfx / vr / ipc / VRParent.h
blob0943232d7e501fa1442965194a2fd120006ab934
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 GFX_VR_PARENT_H
8 #define GFX_VR_PARENT_H
10 #include "mozilla/gfx/PVRParent.h"
11 #include "VRGPUParent.h"
13 namespace mozilla {
14 namespace gfx {
16 class VRService;
17 class VRSystemManagerExternal;
19 class VRParent final : public PVRParent {
20 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRParent, final);
22 friend class PVRParent;
24 public:
25 explicit VRParent();
27 bool Init(mozilla::ipc::UntypedEndpoint&& aEndpoint,
28 const char* aParentBuildID);
29 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
30 bool GetOpenVRControllerActionPath(nsCString* aPath);
31 bool GetOpenVRControllerManifestPath(VRControllerType aType,
32 nsCString* aPath);
34 protected:
35 ~VRParent() = default;
37 mozilla::ipc::IPCResult RecvNewGPUVRManager(
38 Endpoint<PVRGPUParent>&& aEndpoint);
39 mozilla::ipc::IPCResult RecvInit(nsTArray<GfxVarUpdate>&& vars,
40 const DevicePrefs& devicePrefs);
41 mozilla::ipc::IPCResult RecvNotifyVsync(const TimeStamp& vsyncTimestamp);
42 mozilla::ipc::IPCResult RecvUpdateVar(const GfxVarUpdate& pref);
43 mozilla::ipc::IPCResult RecvPreferenceUpdate(const Pref& pref);
44 mozilla::ipc::IPCResult RecvOpenVRControllerActionPathToVR(
45 const nsCString& aPath);
46 mozilla::ipc::IPCResult RecvOpenVRControllerManifestPathToVR(
47 const VRControllerType& aType, const nsCString& aPath);
48 mozilla::ipc::IPCResult RecvRequestMemoryReport(
49 const uint32_t& generation, const bool& anonymize,
50 const bool& minimizeMemoryUsage,
51 const Maybe<ipc::FileDescriptor>& DMDFile,
52 const RequestMemoryReportResolver& aResolver);
54 private:
55 nsCString mOpenVRControllerAction;
56 nsTHashMap<nsUint32HashKey, nsCString> mOpenVRControllerManifest;
57 RefPtr<VRGPUParent> mVRGPUParent;
58 DISALLOW_COPY_AND_ASSIGN(VRParent);
61 } // namespace gfx
62 } // namespace mozilla
64 #endif // GFX_VR_PARENT_H