Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ContentProcess.h
Line
Count
Source (jump to first uncovered line)
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
7
#ifndef dom_tabs_ContentThread_h
8
#define dom_tabs_ContentThread_h 1
9
10
#include "mozilla/ipc/ProcessChild.h"
11
#include "mozilla/ipc/ScopedXREEmbed.h"
12
#include "ContentChild.h"
13
14
#if defined(XP_WIN)
15
#include "mozilla/mscom/MainThreadRuntime.h"
16
#endif
17
18
namespace mozilla {
19
namespace dom {
20
21
/**
22
 * ContentProcess is a singleton on the content process which represents
23
 * the main thread where tab instances live.
24
 */
25
class ContentProcess : public mozilla::ipc::ProcessChild
26
{
27
  typedef mozilla::ipc::ProcessChild ProcessChild;
28
29
public:
30
  explicit ContentProcess(ProcessId aParentPid)
31
    : ProcessChild(aParentPid)
32
0
  { }
33
34
  ~ContentProcess()
35
  { }
36
37
  virtual bool Init(int aArgc, char* aArgv[]) override;
38
  virtual void CleanUp() override;
39
40
private:
41
  ContentChild mContent;
42
  mozilla::ipc::ScopedXREEmbed mXREEmbed;
43
44
#if defined(XP_WIN)
45
  // This object initializes and configures COM.
46
  mozilla::mscom::MainThreadRuntime mCOMRuntime;
47
#endif
48
49
  DISALLOW_EVIL_CONSTRUCTORS(ContentProcess);
50
};
51
52
#ifdef ANDROID
53
// Android doesn't use -prefsHandle or -prefMapHandle. It gets those FDs
54
// another way.
55
void SetPrefsFd(int aFd);
56
void SetPrefMapFd(int aFd);
57
#endif
58
59
} // namespace dom
60
} // namespace mozilla
61
62
#endif  // ifndef dom_tabs_ContentThread_h