UtilityMediaServiceParent.h (2028B)
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_UtilityMediaServiceParent_h_ 7 #define _include_ipc_glue_UtilityMediaServiceParent_h_ 8 9 #include "mozilla/PRemoteMediaManagerParent.h" 10 #include "mozilla/ProfilerMarkers.h" 11 12 #include "mozilla/ipc/Endpoint.h" 13 #include "mozilla/ipc/PUtilityMediaServiceParent.h" 14 15 #include "mozilla/ipc/UtilityProcessSandboxing.h" 16 17 #include "nsThreadManager.h" 18 19 namespace mozilla::ipc { 20 21 // This is in charge of handling the utility child process side to perform 22 // audio decoding 23 class UtilityMediaServiceParent final : public PUtilityMediaServiceParent { 24 public: 25 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UtilityMediaServiceParent, override); 26 27 explicit UtilityMediaServiceParent( 28 nsTArray<mozilla::gfx::GfxVarUpdate>&& aUpdates); 29 30 static void GenericPreloadForSandbox(); 31 static void WMFPreloadForSandbox(); 32 33 void Start(Endpoint<PUtilityMediaServiceParent>&& aEndpoint); 34 35 mozilla::ipc::IPCResult RecvNewContentRemoteMediaManager( 36 Endpoint<PRemoteMediaManagerParent>&& aEndpoint, 37 const ContentParentId& aParentId); 38 39 #ifdef MOZ_WMF_MEDIA_ENGINE 40 mozilla::ipc::IPCResult RecvInitVideoBridge( 41 Endpoint<PVideoBridgeChild>&& aEndpoint, 42 const ContentDeviceData& aContentDeviceData); 43 #endif 44 45 IPCResult RecvUpdateVar(const nsTArray<mozilla::gfx::GfxVarUpdate>& aUpdate); 46 47 #ifdef MOZ_WMF_CDM 48 IPCResult RecvGetKeySystemCapabilities( 49 GetKeySystemCapabilitiesResolver&& aResolver); 50 51 IPCResult RecvUpdateWidevineL1Path(const nsString& aPath); 52 #endif 53 54 private: 55 ~UtilityMediaServiceParent(); 56 57 const SandboxingKind mKind; 58 TimeStamp mUtilityMediaServiceParentStart; 59 }; 60 61 } // namespace mozilla::ipc 62 63 #endif // _include_ipc_glue_UtilityMediaServiceParent_h_