VRGPUParent.h (1463B)
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/. */ 6 7 #ifndef GFX_VR_GPU_PARENT_H 8 #define GFX_VR_GPU_PARENT_H 9 10 #include "mozilla/gfx/PVRGPUParent.h" 11 #include "VRService.h" 12 13 namespace mozilla { 14 namespace gfx { 15 16 class VRGPUParent final : public PVRGPUParent { 17 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VRGPUParent, final) 18 19 friend class PVRGPUParent; 20 21 public: 22 static RefPtr<VRGPUParent> CreateForGPU(Endpoint<PVRGPUParent>&& aEndpoint); 23 virtual void ActorDestroy(ActorDestroyReason aWhy) override; 24 bool IsClosed(); 25 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(); 33 34 private: 35 explicit VRGPUParent(ipc::EndpointProcInfo aChildProcess); 36 ~VRGPUParent(); 37 38 void DeferredDestroy(); 39 40 #if !defined(MOZ_WIDGET_ANDROID) 41 RefPtr<VRService> mVRService; 42 #endif 43 bool mClosed; 44 45 DISALLOW_COPY_AND_ASSIGN(VRGPUParent); 46 }; 47 48 } // namespace gfx 49 } // namespace mozilla 50 51 #endif // GFX_VR_CONTENT_PARENT_H