Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ProcessMessageManager.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 mozilla_dom_ProcessMessageManager_h
8
#define mozilla_dom_ProcessMessageManager_h
9
10
#include "mozilla/dom/MessageSender.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class ParentProcessMessageManager;
16
17
/**
18
 * ProcessMessageManager is used in a parent process to communicate with a child process
19
 * (or with the process itself in a single-process scenario).
20
 */
21
class ProcessMessageManager final : public MessageSender
22
{
23
public:
24
  ProcessMessageManager(ipc::MessageManagerCallback* aCallback,
25
                        ParentProcessMessageManager* aParentManager,
26
                        MessageManagerFlags aFlags=MessageManagerFlags::MM_NONE);
27
28
  virtual JSObject* WrapObject(JSContext* aCx,
29
                               JS::Handle<JSObject*> aGivenProto) override;
30
31
  // ProcessScriptLoader
32
  void LoadProcessScript(const nsAString& aUrl, bool aAllowDelayedLoad,
33
                         mozilla::ErrorResult& aError)
34
0
  {
35
0
    LoadScript(aUrl, aAllowDelayedLoad, false, aError);
36
0
  }
37
  void RemoveDelayedProcessScript(const nsAString& aURL)
38
0
  {
39
0
    RemoveDelayedScript(aURL);
40
0
  }
41
  void GetDelayedProcessScripts(JSContext* aCx,
42
                                nsTArray<nsTArray<JS::Value>>& aScripts,
43
                                mozilla::ErrorResult& aError)
44
0
  {
45
0
    GetDelayedScripts(aCx, aScripts, aError);
46
0
  }
47
};
48
49
} // namespace dom
50
} // namespace mozilla
51
52
#endif // mozilla_dom_ProcessMessageManager_h