// Copyright 2020 The Chromium Authors // 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/mojom/cdm_storage.mojom"; import "media/mojo/mojom/provision_fetcher.mojom"; import "mojo/public/mojom/base/generic_pending_receiver.mojom"; import "url/mojom/origin.mojom"; [EnableIf=is_win] import "media/mojo/mojom/dcomp_surface_registry.mojom"; // Implemented by things like audio playback in the utility process to respond // to mute state changes (e.g. the user checks "Mute Site" or "Unmute Site" on a // tab). [EnableIf=is_win] interface MuteStateObserver { // Notifies mute state change. OnMuteStateChange(bool muted); }; // A factory providing extra services for media mojo services running remotely. // The implementation of this interface lives in the browser process and // is bound to a RenderFrameHost (see MediaInterfaceProxy). Interfaces created // via this interface also live in the browser process and are mostly bound to // a document's lifetime. interface FrameInterfaceFactory { // Binds the ProvisionFetcher for the frame. CreateProvisionFetcher(pending_receiver provision_fetcher); // Binds the CdmStorage for the frame. This requires that the frame have // CDM storage available. CreateCdmStorage(pending_receiver cdm_storage); // Registers `site_mute_observer` to get notified of site mute state changes. [EnableIf=is_win] RegisterMuteStateObserver( pending_remote site_mute_observer); // Binds a DCOMPSurfaceRegistry to register a surface handle in GPU process. [EnableIf=is_win] CreateDCOMPSurfaceRegistry(pending_receiver registry); // Gets the origin of the frame associated with the CDM. [Sync] GetCdmOrigin() => (url.mojom.Origin cdm_origin); // Binds a generic media frame-bound interface. This is to allow //content // embedders to provide additional interfaces. BindEmbedderReceiver(mojo_base.mojom.GenericPendingReceiver receiver); };