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_ipc_glue_UtilityProcessImpl_h__
7 #define _include_ipc_glue_UtilityProcessImpl_h__
8 #include "mozilla/ipc/ProcessChild.h"
11 # include "mozilla/mscom/ProcessRuntime.h"
14 #include "mozilla/ipc/UtilityProcessChild.h"
16 namespace mozilla::ipc
{
18 // This class owns the subprocess instance of a PUtilityProcess - which in this
19 // case, is a UtilityProcessParent. It is instantiated as a singleton in
20 // XRE_InitChildProcess.
21 class UtilityProcessImpl final
: public ipc::ProcessChild
{
23 using ipc::ProcessChild::ProcessChild
;
24 ~UtilityProcessImpl();
26 bool Init(int aArgc
, char* aArgv
[]) override
;
27 void CleanUp() override
;
30 static void LoadLibraryOrCrash(LPCWSTR aLib
);
31 #endif // defined(XP_WIN)
34 RefPtr
<UtilityProcessChild
> mUtility
= UtilityProcessChild::GetSingleton();
37 mozilla::mscom::ProcessRuntime mCOMRuntime
;
41 } // namespace mozilla::ipc
43 #endif // _include_ipc_glue_UtilityProcessImpl_h__