2018-08-07 21:20:34 +03:00
|
|
|
/* -*- 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_CHILD_H
|
|
|
|
#define GFX_VR_CHILD_H
|
|
|
|
|
|
|
|
#include "mozilla/gfx/PVRChild.h"
|
|
|
|
#include "mozilla/gfx/gfxVarReceiver.h"
|
|
|
|
#include "mozilla/VsyncDispatcher.h"
|
2018-12-29 01:09:44 +03:00
|
|
|
#include "gfxVR.h"
|
2018-08-07 21:20:34 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
2019-01-23 04:22:39 +03:00
|
|
|
namespace ipc {
|
|
|
|
class CrashReporterHost;
|
|
|
|
} // namespace ipc
|
2018-08-07 21:20:34 +03:00
|
|
|
namespace gfx {
|
|
|
|
|
|
|
|
class VRProcessParent;
|
|
|
|
class VRChild;
|
|
|
|
|
|
|
|
class VRChild final : public PVRChild, public gfxVarReceiver {
|
2019-02-06 18:57:37 +03:00
|
|
|
friend class PVRChild;
|
|
|
|
|
2018-08-07 21:20:34 +03:00
|
|
|
public:
|
|
|
|
explicit VRChild(VRProcessParent* aHost);
|
|
|
|
~VRChild() = default;
|
|
|
|
|
|
|
|
static void Destroy(UniquePtr<VRChild>&& aChild);
|
|
|
|
void Init();
|
|
|
|
virtual void OnVarChanged(const GfxVarUpdate& aVar) override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOpenVRControllerActionPathToParent(
|
|
|
|
const nsCString& aPath);
|
|
|
|
mozilla::ipc::IPCResult RecvOpenVRControllerManifestPathToParent(
|
|
|
|
const OpenVRControllerType& aType, const nsCString& aPath);
|
|
|
|
mozilla::ipc::IPCResult RecvInitCrashReporter(
|
|
|
|
Shmem&& shmem, const NativeThreadId& aThreadId);
|
2018-08-07 21:20:34 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
VRProcessParent* mHost;
|
2019-01-23 04:22:39 +03:00
|
|
|
UniquePtr<ipc::CrashReporterHost> mCrashReporter;
|
2018-08-07 21:20:34 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2019-02-06 18:57:37 +03:00
|
|
|
#endif // GFX_VR_CHILD_H
|