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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
fuchsia_web / shell / cast_streaming_shell.cml [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
{
include: [
// CML shards intended for tests are used here because this component is
// launched as a test. While it doesn't fit the typical use-case for a test
// component, it's a useful way to be able to launch the component from a
// host tool and have it run somewhere it can get the capabilities it needs
// to function correctly.
// TODO(crbug.com/42050572): Run as a non-test component.
"//build/config/fuchsia/test/chromium_system_test_facet.shard.test-cml",
"//build/config/fuchsia/test/elf_test_runner.shard.test-cml",
"sys/component/realm_builder_absolute.shard.cml",
"syslog/client.shard.cml",
],
program: {
binary: "cast_streaming_shell_exe",
},
offer: [
{
// Required capabilities for WebInstanceHost in a child Component.
protocol: [
"fuchsia.feedback.ComponentDataRegister",
"fuchsia.feedback.CrashReportingProductRegister",
],
from: "parent",
to: "#realm_builder",
},
// Offered for use by the relaunched
// `fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml`
// TODO(crbug.com/42050572): Remove when running as a non-test component and
// thus the relaunch is no longer needed.
{
protocol: [
// Required to display the View in Scene Manager unless running in
// `--headless` mode.
"fuchsia.element.GraphicalPresenter",
],
from: "parent",
to: "#realm_builder",
availability: "optional",
},
// The remaining are offered from the parent to `web_instance.cm` via
// `RealmBuilder` when not in `--use-context-provider` mode.
{
// The chromium test realm offers the system-wide config-data dir to test
// components. Route the web_engine sub-directory of this as required by
// WebInstanceHost.
directory: "config-data",
from: "parent",
as: "config-data-for-web-instance",
to: "#realm_builder",
subdir: "web_engine",
availability: "optional",
},
{
// Holds ICU time zone data files.
// See:
// https://fuchsia.dev/fuchsia-src/concepts/process/namespaces?typical_directory_structure
directory: "tzdata-icu",
from: "parent",
to: "#realm_builder",
},
{
// Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
directory: "root-ssl-certificates",
from: "parent",
to: "#realm_builder",
},
{
// Required capabilities for all WebInstance configurations.
protocol: [
"fuchsia.buildinfo.Provider",
"fuchsia.device.NameProvider",
"fuchsia.fonts.Provider",
"fuchsia.hwinfo.Product",
"fuchsia.intl.PropertyProvider",
// "fuchsia.logger/LogSink", is included by the shard above.
"fuchsia.memorypressure.Provider",
"fuchsia.process.Launcher",
"fuchsia.sysmem.Allocator",
"fuchsia.sysmem2.Allocator",
],
from: "parent",
to: "#realm_builder",
},
{
protocol: [
// Allows CPU scheduling profiles to be applied to threads to
// tune their performance, especially for media rendering.
// TODO(crbug.com/42050308): Migrate to `fuchsia.scheduler`.
"fuchsia.media.ProfileProvider",
"fuchsia.scheduler.RoleManager",
// Optionally used by the tracing service.
// TODO(crbug.com/42050521): Offer only when enabled.
"fuchsia.tracing.perfetto.ProducerConnector",
],
from: "parent",
to: "#realm_builder",
availability: "optional",
},
{
protocol: [
// Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
"fuchsia.net.interfaces.State",
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
// Required by `fuchsia.web/ContextFeatureFlags.AUDIO`.
"fuchsia.media.Audio",
"fuchsia.media.AudioDeviceEnumerator",
"fuchsia.media.SessionAudioConsumerFactory",
// Required by `fuchsia.web/ContextFeatureFlags.VULKAN`.
// "fuchsia.tracing.provider.Registry" is optionally used by the
// tracing service.
"fuchsia.tracing.provider.Registry",
"fuchsia.vulkan.loader.Loader",
// Required by `fuchsia.web/ContextFeatureFlags.HARDWARE_VIDEO_DECODER`.
"fuchsia.mediacodec.CodecFactory",
],
from: "parent",
to: "#realm_builder",
},
{
protocol: [
// Required by the absence of
// `fuchsia.web/ContextFeatureFlags.HEADLESS`.
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.ui.composition.Allocator",
"fuchsia.ui.composition.Flatland",
],
from: "parent",
to: "#realm_builder",
},
{
protocol: [
// Required by the absence of
// `fuchsia.web/ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`.
"fuchsia.kernel.VmexResource",
],
from: "parent",
to: "#realm_builder",
},
],
facets: {
// TODO(crbug.com/42050572): Remove when converting to a non-test component.
"fuchsia.test": {
"deprecated-allowed-packages": [ "web_engine" ],
},
},
}