1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 import "media/mojo/mojom/frame_interface_factory.mojom";
8 import "media/mojo/mojom/interface_factory.mojom";
9 import "sandbox/policy/mojom/sandbox.mojom";
11 // Determined in BUILD.gn from //media/media_options.gni.
12 [EnableIf=mojo_media_in_browser]
13 const sandbox.mojom.Sandbox kMediaSandbox = sandbox.mojom.Sandbox.kNoSandbox;
14 [EnableIf=mojo_media_in_gpu]
15 const sandbox.mojom.Sandbox kMediaSandbox = sandbox.mojom.Sandbox.kGpu;
16 // This placeholder is required to allow compilation.
17 [EnableIf=mojo_media_service_unused]
18 const sandbox.mojom.Sandbox kMediaSandbox = sandbox.mojom.Sandbox.kService;
20 // A service to provide media InterfaceFactory, typically to the media pipeline
21 // running in the renderer process. The service itself runs in the process
22 // specified by the |mojo_media_host| gn build flag. The service is always
23 // connected from the browser process.
24 [ServiceSandbox=kMediaSandbox]
25 interface MediaService {
26 // Requests an InterfaceFactory. |frame_interfaces| can optionally be used to
27 // provide interfaces hosted by the caller to the remote InterfaceFactory
29 CreateInterfaceFactory(
30 pending_receiver<InterfaceFactory> factory,
31 pending_remote<FrameInterfaceFactory> frame_interfaces);