PGMP.ipdl (3131B)
1 /* -*- Mode: C++; tab-width: 2; 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 6 include CrashReporterInitArgs; 7 include PrefsTypes; 8 include protocol PGMPContent; 9 include protocol PGMPTimer; 10 include protocol PGMPStorage; 11 include protocol PProfiler; 12 13 #if defined(XP_WIN) 14 [MoveOnly] using mozilla::UntrustedModulesData from "mozilla/UntrustedModulesData.h"; 15 [MoveOnly] using mozilla::ModulePaths from "mozilla/UntrustedModulesData.h"; 16 [MoveOnly] using mozilla::ModulesMapResult from "mozilla/UntrustedModulesData.h"; 17 #endif 18 19 include "mozilla/ipc/ByteBufUtils.h"; 20 include "GMPParent.h"; 21 include "GMPChild.h"; 22 23 using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h"; 24 25 namespace mozilla { 26 namespace gmp { 27 28 [NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent", ChildProc=GMPlugin] 29 sync protocol PGMP 30 { 31 manages PGMPTimer; 32 manages PGMPStorage; 33 34 parent: 35 async InitCrashReporter(CrashReporterInitArgs aInitArgs); 36 async PGMPTimer(); 37 async PGMPStorage(); 38 39 async PGMPContentChildDestroyed(); 40 41 // Sent from time-to-time to limit the amount of telemetry vulnerable to loss 42 // Buffer contains bincoded Rust structs. 43 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/ipc.html 44 async FOGData(ByteBuf buf); 45 46 #if defined(XP_WIN) 47 async GetModulesTrust(ModulePaths aModPaths, bool aRunAtNormalPriority) 48 returns (ModulesMapResult? modMapResult); 49 #endif // defined(XP_WIN) 50 51 child: 52 async CrashPluginNow(); 53 [Nested=inside_sync] sync StartPlugin(nsString adapter); 54 async ProvideStorageId(nsCString storageId); 55 async PreloadLibs(nsCString libs); 56 async CloseActive(); 57 async InitGMPContentChild(Endpoint<PGMPContentChild> endpoint); 58 async InitProfiler(Endpoint<PProfilerChild> endpoint); 59 async PreferenceUpdate(Pref pref); 60 61 // Tells the GMP process to flush any pending telemetry. 62 // Used in tests and ping assembly. Buffer contains bincoded Rust structs. 63 // https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/ipc.html 64 async FlushFOGData() returns (ByteBuf buf); 65 66 #if defined(XP_WIN) 67 async InitDllServices(bool canRecordReleaseTelemetry, 68 bool aIsReadyForBackgroundProcessing); 69 70 async GetUntrustedModulesData() returns (UntrustedModulesData? data); 71 72 /** 73 * This method is used to notify a child process to start 74 * processing module loading events in UntrustedModulesProcessor. 75 * This should be called when the parent process has gone idle. 76 */ 77 async UnblockUntrustedModulesThread(); 78 #endif // defined(XP_WIN) 79 80 // Test-only method. 81 // Asks the GMP process to trigger test-only instrumentation. 82 // The unused returned value is to have a promise we can await. 83 async TestTriggerMetrics() returns (bool unused); 84 85 // Attempt a graceful shutdown and collect a profile if available. 86 async Shutdown() returns (nsCString profile); 87 }; 88 89 } // namespace gmp 90 } // namespace mozilla