RDDProcessImpl.h (1196B)
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 #ifndef _include_dom_media_ipc_RDDProcessImpl_h__ 7 #define _include_dom_media_ipc_RDDProcessImpl_h__ 8 #include "mozilla/ipc/ProcessChild.h" 9 10 #if defined(XP_WIN) 11 # include "mozilla/mscom/ProcessRuntime.h" 12 #endif 13 14 #include "RDDParent.h" 15 16 namespace mozilla { 17 18 // This class owns the subprocess instance of a PRDD - which in this case, 19 // is a RDDParent. It is instantiated as a singleton in XRE_InitChildProcess. 20 class RDDProcessImpl final : public ipc::ProcessChild { 21 public: 22 using ipc::ProcessChild::ProcessChild; 23 ~RDDProcessImpl(); 24 25 bool Init(int aArgc, char* aArgv[]) override; 26 void CleanUp() override; 27 28 private: 29 RefPtr<RDDParent> mRDD = new RDDParent; 30 31 #if defined(XP_WIN) 32 // This object initializes and configures COM. 33 mozilla::mscom::ProcessRuntime mCOMRuntime; 34 #endif 35 }; 36 37 } // namespace mozilla 38 39 #endif // _include_dom_media_ipc_RDDProcessImpl_h__