Bug 1908670 - Home and newtab topic personalization needs region controls r=home...
[gecko.git] / ipc / glue / UtilityAudioDecoderParent.h
blob7279582fdc26a126b5c93c7db8f761ac226ae9f1
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 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 #ifndef _include_ipc_glue_UtilityAudioDecoderParent_h_
7 #define _include_ipc_glue_UtilityAudioDecoderParent_h_
9 #include "mozilla/PRemoteDecoderManagerParent.h"
10 #include "mozilla/ProfilerMarkers.h"
11 #include "mozilla/UniquePtr.h"
13 #include "mozilla/ipc/Endpoint.h"
14 #include "mozilla/ipc/PUtilityAudioDecoderParent.h"
16 #include "mozilla/ipc/UtilityProcessSandboxing.h"
18 #include "nsThreadManager.h"
20 namespace mozilla::ipc {
22 // This is in charge of handling the utility child process side to perform
23 // audio decoding
24 class UtilityAudioDecoderParent final : public PUtilityAudioDecoderParent {
25 public:
26 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UtilityAudioDecoderParent, override);
28 explicit UtilityAudioDecoderParent(
29 nsTArray<mozilla::gfx::GfxVarUpdate>&& aUpdates);
31 static void GenericPreloadForSandbox();
32 static void WMFPreloadForSandbox();
34 void Start(Endpoint<PUtilityAudioDecoderParent>&& aEndpoint);
36 mozilla::ipc::IPCResult RecvNewContentRemoteDecoderManager(
37 Endpoint<PRemoteDecoderManagerParent>&& aEndpoint,
38 const ContentParentId& aParentId);
40 #ifdef MOZ_WMF_MEDIA_ENGINE
41 mozilla::ipc::IPCResult RecvInitVideoBridge(
42 Endpoint<PVideoBridgeChild>&& aEndpoint,
43 const ContentDeviceData& aContentDeviceData);
45 IPCResult RecvUpdateVar(const mozilla::gfx::GfxVarUpdate& aUpdate);
46 #endif
48 #ifdef MOZ_WMF_CDM
49 IPCResult RecvGetKeySystemCapabilities(
50 GetKeySystemCapabilitiesResolver&& aResolver);
52 IPCResult RecvUpdateWidevineL1Path(const nsString& aPath);
53 #endif
55 private:
56 ~UtilityAudioDecoderParent();
58 const SandboxingKind mKind;
59 TimeStamp mAudioDecoderParentStart;
62 } // namespace mozilla::ipc
64 #endif // _include_ipc_glue_UtilityAudioDecoderParent_h_