Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=99: */
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 : #include "GPUProcessImpl.h"
7 : #include "mozilla/ipc/IOThreadChild.h"
8 : #include "nsXPCOM.h"
9 :
10 : #if defined(OS_WIN) && defined(MOZ_SANDBOX)
11 : #define TARGET_SANDBOX_EXPORTS
12 : #include "mozilla/sandboxTarget.h"
13 : #endif
14 :
15 : namespace mozilla {
16 : namespace gfx {
17 :
18 : using namespace ipc;
19 :
20 0 : GPUProcessImpl::GPUProcessImpl(ProcessId aParentPid)
21 0 : : ProcessChild(aParentPid)
22 : {
23 0 : }
24 :
25 0 : GPUProcessImpl::~GPUProcessImpl()
26 : {
27 0 : }
28 :
29 : bool
30 0 : GPUProcessImpl::Init(int aArgc, char* aArgv[])
31 : {
32 : #if defined(MOZ_SANDBOX) && defined(OS_WIN)
33 : mozilla::SandboxTarget::Instance()->StartSandbox();
34 : #endif
35 :
36 0 : return mGPU.Init(ParentPid(),
37 : IOThreadChild::message_loop(),
38 0 : IOThreadChild::channel());
39 : }
40 :
41 : void
42 0 : GPUProcessImpl::CleanUp()
43 : {
44 0 : NS_ShutdownXPCOM(nullptr);
45 0 : }
46 :
47 : } // namespace gfx
48 : } // namespace mozilla
|