1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6include GraphicsMessages;
7include MemoryReportTypes;
8include PrefsTypes;
9
10include protocol PProfiler;
11include protocol PRemoteDecoderManager;
12include protocol PVideoBridge;
13
14using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
15using moveonly mozilla::UntrustedModulesData from "mozilla/UntrustedModulesData.h";
16using moveonly mozilla::ModulePaths from "mozilla/UntrustedModulesData.h";
17using moveonly mozilla::ModulesMapResult from "mozilla/UntrustedModulesData.h";
18
19namespace mozilla {
20
21// This protocol allows the UI process to talk to the RDD
22// (RemoteDataDecoder) process. There is one instance of this protocol,
23// with the RDDParent living on the main thread of the RDD process and
24// the RDDChild living on the main thread of the UI process.
25protocol PRDD
26{
27parent:
28
29  async Init(GfxVarUpdate[] vars, FileDescriptor? sandboxBroker,
30             bool canRecordReleaseTelemetry);
31
32  async InitProfiler(Endpoint<PProfilerChild> endpoint);
33
34  async NewContentRemoteDecoderManager(
35            Endpoint<PRemoteDecoderManagerParent> endpoint);
36
37  async RequestMemoryReport(uint32_t generation,
38                            bool anonymize,
39                            bool minimizeMemoryUsage,
40                            FileDescriptor? DMDFile);
41
42  async PreferenceUpdate(Pref pref);
43
44  async UpdateVar(GfxVarUpdate var);
45
46  async InitVideoBridge(Endpoint<PVideoBridgeChild> endpoint);
47
48  async GetUntrustedModulesData() returns (UntrustedModulesData? data);
49
50child:
51
52  async InitCrashReporter(NativeThreadId threadId);
53
54  async AddMemoryReport(MemoryReport aReport);
55  async FinishMemoryReport(uint32_t aGeneration);
56
57  async GetModulesTrust(ModulePaths aModPaths, bool aRunAtNormalPriority)
58      returns (ModulesMapResult? modMapResult);
59};
60
61} // namespace mozilla
62