VRProcessChild.h (1129B)
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_PROCESS_CHILD_H 8 #define GFX_VR_PROCESS_CHILD_H 9 10 #include "mozilla/ipc/ProcessChild.h" 11 #include "VRParent.h" 12 13 namespace mozilla { 14 namespace gfx { 15 16 /** 17 * Contains the VRChild object that facilitates IPC communication to/from 18 * the instance of the VR library that is run in this process. 19 */ 20 class VRProcessChild final : public mozilla::ipc::ProcessChild { 21 protected: 22 typedef mozilla::ipc::ProcessChild ProcessChild; 23 24 public: 25 using ProcessChild::ProcessChild; 26 ~VRProcessChild(); 27 28 // IPC channel for VR process talk to the parent process. 29 static VRParent* GetVRParent(); 30 31 // ProcessChild functions. 32 virtual bool Init(int aArgc, char* aArgv[]) override; 33 virtual void CleanUp() override; 34 }; 35 36 } // namespace gfx 37 } // namespace mozilla 38 39 #endif /* GFX_VR_PROCESS_CHILD_H */