/work/obj-fuzz/dist/include/mozilla/dom/ParentProcessMessageManager.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_ParentProcessMessageManager_h |
8 | | #define mozilla_dom_ParentProcessMessageManager_h |
9 | | |
10 | | #include "mozilla/dom/MessageBroadcaster.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | /** |
16 | | * Implementation for the WebIDL ParentProcessMessageManager interface. |
17 | | * ParentProcessMessageManager is used in a parent process to communicate with all the |
18 | | * child processes. |
19 | | */ |
20 | | class ParentProcessMessageManager final : public MessageBroadcaster |
21 | | { |
22 | | public: |
23 | | ParentProcessMessageManager(); |
24 | | |
25 | | virtual JSObject* WrapObject(JSContext* aCx, |
26 | | JS::Handle<JSObject*> aGivenProto) override; |
27 | | |
28 | | // ProcessScriptLoader |
29 | | void LoadProcessScript(const nsAString& aUrl, bool aAllowDelayedLoad, |
30 | | mozilla::ErrorResult& aError) |
31 | 0 | { |
32 | 0 | LoadScript(aUrl, aAllowDelayedLoad, false, aError); |
33 | 0 | } |
34 | | void RemoveDelayedProcessScript(const nsAString& aURL) |
35 | 0 | { |
36 | 0 | RemoveDelayedScript(aURL); |
37 | 0 | } |
38 | | void GetDelayedProcessScripts(JSContext* aCx, |
39 | | nsTArray<nsTArray<JS::Value>>& aScripts, |
40 | | mozilla::ErrorResult& aError) |
41 | 0 | { |
42 | 0 | GetDelayedScripts(aCx, aScripts, aError); |
43 | 0 | } |
44 | | |
45 | | // GlobalProcessScriptLoader |
46 | | using nsFrameMessageManager::GetInitialProcessData; |
47 | | |
48 | | private: |
49 | | virtual ~ParentProcessMessageManager(); |
50 | | }; |
51 | | |
52 | | } // namespace dom |
53 | | } // namespace mozilla |
54 | | |
55 | | #endif // mozilla_dom_ParentProcessMessageManager_h |