TestShellChild.h (1217B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifndef ipc_testshell_TestShellChild_h 6 #define ipc_testshell_TestShellChild_h 1 7 8 #include "mozilla/ipc/ProtocolUtils.h" 9 #include "mozilla/ipc/PTestShellChild.h" 10 #include "mozilla/ipc/PTestShellCommandChild.h" 11 #include "mozilla/ipc/XPCShellEnvironment.h" 12 13 namespace mozilla { 14 15 namespace ipc { 16 17 class XPCShellEnvironment; 18 19 class TestShellChild : public PTestShellChild { 20 public: 21 NS_INLINE_DECL_REFCOUNTING(TestShellChild, override) 22 23 TestShellChild(); 24 25 mozilla::ipc::IPCResult RecvExecuteCommand(const nsAString& aCommand); 26 27 PTestShellCommandChild* AllocPTestShellCommandChild( 28 const nsAString& aCommand); 29 30 mozilla::ipc::IPCResult RecvPTestShellCommandConstructor( 31 PTestShellCommandChild* aActor, const nsAString& aCommand) override; 32 33 bool DeallocPTestShellCommandChild(PTestShellCommandChild* aCommand); 34 35 private: 36 ~TestShellChild() = default; 37 38 UniquePtr<XPCShellEnvironment> mXPCShell; 39 }; 40 41 } /* namespace ipc */ 42 } /* namespace mozilla */ 43 44 #endif /* ipc_testshell_TestShellChild_h */