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