/work/obj-fuzz/dist/include/mozilla/dom/ChromeMessageSender.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_ChromeMessageSender_h |
8 | | #define mozilla_dom_ChromeMessageSender_h |
9 | | |
10 | | #include "mozilla/dom/MessageSender.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | class MessageBroadcaster; |
16 | | |
17 | | class ChromeMessageSender final : public MessageSender |
18 | | { |
19 | | public: |
20 | | explicit ChromeMessageSender(MessageBroadcaster* aParentManager) |
21 | | : MessageSender(nullptr, aParentManager, MessageManagerFlags::MM_CHROME) |
22 | 0 | { |
23 | 0 | // This is a bit hackish, we wait until the child process is running before attaching |
24 | 0 | // to the parent manager (see MessageSender::InitWithCallback). |
25 | 0 | } |
26 | | |
27 | | virtual JSObject* WrapObject(JSContext* aCx, |
28 | | JS::Handle<JSObject*> aGivenProto) override; |
29 | | |
30 | | // FrameScriptLoader |
31 | | void LoadFrameScript(const nsAString& aUrl, bool aAllowDelayedLoad, |
32 | | bool aRunInGlobalScope, mozilla::ErrorResult& aError) |
33 | 0 | { |
34 | 0 | LoadScript(aUrl, aAllowDelayedLoad, aRunInGlobalScope, aError); |
35 | 0 | } |
36 | | void RemoveDelayedFrameScript(const nsAString& aURL) |
37 | 0 | { |
38 | 0 | RemoveDelayedScript(aURL); |
39 | 0 | } |
40 | | void GetDelayedFrameScripts(JSContext* aCx, |
41 | | nsTArray<nsTArray<JS::Value>>& aScripts, |
42 | | mozilla::ErrorResult& aError) |
43 | 0 | { |
44 | 0 | GetDelayedScripts(aCx, aScripts, aError); |
45 | 0 | } |
46 | | }; |
47 | | |
48 | | } // namespace dom |
49 | | } // namespace mozilla |
50 | | |
51 | | #endif // mozilla_dom_ChromeMessageSender_h |