1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
media / mojo / mojom / frame_interface_factory.mojom [blame]
// 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<ProvisionFetcher> provision_fetcher);
// Binds the CdmStorage for the frame. This requires that the frame have
// CDM storage available.
CreateCdmStorage(pending_receiver<CdmStorage> cdm_storage);
// Registers `site_mute_observer` to get notified of site mute state changes.
[EnableIf=is_win]
RegisterMuteStateObserver(
pending_remote<MuteStateObserver> site_mute_observer);
// Binds a DCOMPSurfaceRegistry to register a surface handle in GPU process.
[EnableIf=is_win]
CreateDCOMPSurfaceRegistry(pending_receiver<DCOMPSurfaceRegistry> registry);
// Gets the origin of the frame associated with the CDM.
[Sync]
GetCdmOrigin() => (url.mojom.Origin cdm_origin);
// Gets the UKMSourceId of the frame associated with the CDM.
[Sync]
GetPageUkmSourceId() => (int64 ukm_source_id);
// Binds a generic media frame-bound interface. This is to allow //content
// embedders to provide additional interfaces.
BindEmbedderReceiver(mojo_base.mojom.GenericPendingReceiver receiver);
};