GMPProcessChild.h (1090B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef GMPProcessChild_h_ 7 #define GMPProcessChild_h_ 8 9 #include "GMPChild.h" 10 #include "mozilla/ipc/ProcessChild.h" 11 12 namespace mozilla::gmp { 13 14 class GMPLoader; 15 16 class GMPProcessChild final : public mozilla::ipc::ProcessChild { 17 protected: 18 typedef mozilla::ipc::ProcessChild ProcessChild; 19 20 public: 21 using ProcessChild::ProcessChild; 22 ~GMPProcessChild(); 23 24 static void InitStatics(int aArgc, char* aArgv[]); 25 static bool UseNativeEventProcessing() { return sUseNativeEventProcessing; } 26 static bool UseXPCOM() { return sUseXpcom; } 27 28 bool Init(int aArgc, char* aArgv[]) override; 29 void CleanUp() override; 30 31 private: 32 const RefPtr<GMPChild> mPlugin = new GMPChild; 33 34 static bool sUseXpcom; 35 static bool sUseNativeEventProcessing; 36 }; 37 38 } // namespace mozilla::gmp 39 40 #endif // GMPProcessChild_h_