Backed out changeset 62d0239c5141 (bug 1936381) for causing build bustages @updater...
[gecko.git] / gfx / vr / ipc / VRGPUParent.h
blobdd5230721027c8129e8e44796b7b0dd5ec509522
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_GPU_PARENT_H
8 #define GFX_VR_GPU_PARENT_H
10 #include "mozilla/gfx/PVRGPUParent.h"
11 #include "VRService.h"
13 namespace mozilla {
14 namespace gfx {
16 class VRGPUParent final : public PVRGPUParent {
17 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRGPUParent, final)
19 friend class PVRGPUParent;
21 public:
22 static RefPtr<VRGPUParent> CreateForGPU(Endpoint<PVRGPUParent>&& aEndpoint);
23 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
24 bool IsClosed();
26 protected:
27 void Bind(Endpoint<PVRGPUParent>&& aEndpoint);
28 mozilla::ipc::IPCResult RecvStartVRService();
29 mozilla::ipc::IPCResult RecvStopVRService();
30 mozilla::ipc::IPCResult RecvPuppetReset();
31 mozilla::ipc::IPCResult RecvPuppetSubmit(const nsTArray<uint64_t>& aBuffer);
32 mozilla::ipc::IPCResult RecvPuppetCheckForCompletion();
34 private:
35 explicit VRGPUParent(ipc::EndpointProcInfo aChildProcess);
36 ~VRGPUParent();
38 void DeferredDestroy();
40 #if !defined(MOZ_WIDGET_ANDROID)
41 RefPtr<VRService> mVRService;
42 #endif
43 bool mClosed;
45 DISALLOW_COPY_AND_ASSIGN(VRGPUParent);
48 } // namespace gfx
49 } // namespace mozilla
51 #endif // GFX_VR_CONTENT_PARENT_H