// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module media.mojom; import "media/mojo/interfaces/content_decryption_module.mojom"; import "mojo/public/mojom/base/file_path.mojom"; import "services/service_manager/public/mojom/interface_provider.mojom"; [EnableIf=is_mac] import "sandbox/mac/mojom/seatbelt_extension_token.mojom"; // A service to create a CdmFactory that can provide CDM service, typically // to the media pipeline running in the renderer process. The service itself // runs in the CDM (utility) process. The service is always connected from the // browser process. interface CdmService { // Loads the CDM at |cdm_path| into the process. Must be called before // CreateCdmFactory(). Since the client will not know whether LoadCdm() has // been called by a previous CdmService instance, the client should always // call it after service connection. If the CDM is already loaded, this will // be a no-op. // |token_provider| can be used to get a sandbox seatbelt extension token // synchronously so that the CdmService instance can load the CDM and other // needed files within the Mac sandbox. LoadCdm(mojo_base.mojom.FilePath cdm_path, [EnableIf=is_mac] SeatbeltExtensionTokenProvider? token_provider); // Requests an CdmFactory. |host_interfaces| can optionally be used to provide // interfaces hosted by the caller to the remote CdmFactory implementation. CreateCdmFactory( CdmFactory& factory, service_manager.mojom.InterfaceProvider? host_interfaces); }; // An interface to provide a sandbox seatbelt extension token synchronously. [EnableIf=is_mac] interface SeatbeltExtensionTokenProvider { [Sync] GetTokens() => (array tokens); };