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/. */
6 include MemoryReportTypes;
9 include protocol PProfiler;
11 #if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
12 include protocol PSandboxTesting;
15 include "mozilla/ipc/ByteBufUtils.h";
17 using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h";
23 // This protocol allows the UI process to talk to the Utility process. There is
24 // one instance of this protocol, with the UtilityProcessParent living on the main thread
25 // of the Utility process and the UtilityProcessChild living on the main thread of the UI
27 [NeedsOtherPid] protocol PUtilityProcess
30 async InitCrashReporter(NativeThreadId threadId);
32 async AddMemoryReport(MemoryReport aReport);
34 // Sent from time-to-time to limit the amount of telemetry vulnerable to loss
35 // Buffer contains bincoded Rust structs.
36 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/ipc.html
37 async FOGData(ByteBuf buf);
39 async InitCompleted();
42 async Init(FileDescriptor? sandboxBroker, bool canRecordReleaseTelemetry);
44 async InitProfiler(Endpoint<PProfilerChild> endpoint);
46 async RequestMemoryReport(uint32_t generation,
48 bool minimizeMemoryUsage,
49 FileDescriptor? DMDFile)
50 returns (uint32_t aGeneration);
52 async PreferenceUpdate(Pref pref);
54 // Tells the Utility process to flush any pending telemetry.
55 // Used in tests and ping assembly. Buffer contains bincoded Rust structs.
56 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/ipc.html
57 async FlushFOGData() returns (ByteBuf buf);
60 // Asks the Utility process to trigger test-only instrumentation.
61 // The unused returned value is to have a promise we can await.
62 async TestTriggerMetrics() returns (bool unused);
64 #if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
65 async InitSandboxTesting(Endpoint<PSandboxTestingChild> aEndpoint);
71 } // namespace mozilla