From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- gfx/vr/ipc/VRParent.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gfx/vr/ipc/VRParent.h (limited to 'gfx/vr/ipc/VRParent.h') diff --git a/gfx/vr/ipc/VRParent.h b/gfx/vr/ipc/VRParent.h new file mode 100644 index 0000000000..ab44ce0072 --- /dev/null +++ b/gfx/vr/ipc/VRParent.h @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef GFX_VR_PARENT_H +#define GFX_VR_PARENT_H + +#include "mozilla/gfx/PVRParent.h" +#include "VRGPUParent.h" + +namespace mozilla { +namespace gfx { + +class VRService; +class VRSystemManagerExternal; + +class VRParent final : public PVRParent { + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRParent); + + friend class PVRParent; + + public: + explicit VRParent(); + + bool Init(base::ProcessId aParentPid, const char* aParentBuildID, + MessageLoop* aIOLoop, UniquePtr aChannel); + virtual void ActorDestroy(ActorDestroyReason aWhy) override; + bool GetOpenVRControllerActionPath(nsCString* aPath); + bool GetOpenVRControllerManifestPath(VRControllerType aType, + nsCString* aPath); + + protected: + ~VRParent() = default; + + mozilla::ipc::IPCResult RecvNewGPUVRManager( + Endpoint&& aEndpoint); + mozilla::ipc::IPCResult RecvInit(nsTArray&& vars, + const DevicePrefs& devicePrefs); + mozilla::ipc::IPCResult RecvNotifyVsync(const TimeStamp& vsyncTimestamp); + mozilla::ipc::IPCResult RecvUpdateVar(const GfxVarUpdate& pref); + mozilla::ipc::IPCResult RecvPreferenceUpdate(const Pref& pref); + mozilla::ipc::IPCResult RecvOpenVRControllerActionPathToVR( + const nsCString& aPath); + mozilla::ipc::IPCResult RecvOpenVRControllerManifestPathToVR( + const VRControllerType& aType, const nsCString& aPath); + mozilla::ipc::IPCResult RecvRequestMemoryReport( + const uint32_t& generation, const bool& anonymize, + const bool& minimizeMemoryUsage, + const Maybe& DMDFile, + const RequestMemoryReportResolver& aResolver); + + private: + nsCString mOpenVRControllerAction; + nsDataHashtable mOpenVRControllerManifest; + RefPtr mVRGPUParent; + DISALLOW_COPY_AND_ASSIGN(VRParent); +}; + +} // namespace gfx +} // namespace mozilla + +#endif // GFX_VR_PARENT_H -- cgit v1.2.3