class CreateContextParams
Defined at line 1042 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
Parameters specifying the configuration for a new [`Context`].
Public Members
static const fidl_type_t * FidlType
Public Methods
bool IsEmpty ()
Returns whether no field is set.
CreateContextParams & set_service_directory (::fidl::InterfaceHandle< ::fuchsia::io::Directory> _value)
CreateContextParams & set_data_directory (::fidl::InterfaceHandle< ::fuchsia::io::Directory> _value)
CreateContextParams & set_user_agent_product (::std::string _value)
CreateContextParams & set_user_agent_version (::std::string _value)
CreateContextParams & set_remote_debugging_port (uint16_t _value)
CreateContextParams & set_content_directories (::std::vector< ::fuchsia::web::ContentDirectoryProvider> _value)
CreateContextParams & set_features (::fuchsia::web::ContextFeatureFlags _value)
CreateContextParams & set_playready_key_system (::std::string _value)
CreateContextParams & set_unsafely_treat_insecure_origins_as_secure (::std::vector< ::std::string> _value)
CreateContextParams & set_cors_exempt_headers (::std::vector< ::std::vector<uint8_t>> _value)
CreateContextParams & set_cdm_data_directory (::fidl::InterfaceHandle< ::fuchsia::io::Directory> _value)
CreateContextParams & set_cdm_data_quota_bytes (uint64_t _value)
CreateContextParams & set_data_quota_bytes (uint64_t _value)
void CreateContextParams ()
void CreateContextParams (CreateContextParams && other)
void ~CreateContextParams ()
CreateContextParams & operator= (CreateContextParams && other)
::std::unique_ptr<CreateContextParams> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, CreateContextParams * _value, size_t _offset)
zx_status_t Clone (CreateContextParams * _result)
const ::fidl::InterfaceHandle< ::fuchsia::io::Directory> & service_directory ()
Service directory to be used by the context.
The following services must be present in the service directory:
- [`fuchsia.buildinfo/Provider`]
- [`fuchsia.device/NameProvider`]
- [`fuchsia.fonts/Provider`]
- [`fuchsia.hwinfo.Product`]
- [`fuchsia.intl/PropertyProvider`]
- [`fuchsia.kernel/VmexResource`] (unless [`ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`] is set)
- [`fuchsia.logger/LogSink`]
- [`fuchsia.memorypressure/Provider`]
- [`fuchsia.process/Launcher`]
- [`fuchsia.sysmem/Allocator`]
The following services are recommended to be present in order to allow CPU scheduling
profiles to be applied to threads to tune their performance, especially for media rendering.
- [`fuchsia.media.ProfileProvider`] (requirement will be removed in 2025)
- [`fuchsia.scheduler.RoleManager`]
The following services must be present in order to render web content in a Scenic view
using [`Frame.CreateView`], [`Frame.CreateViewWithViewRef`] or [`Frame.CreateView2`]]:
- [`fuchsia.accessibility.semantics/SemanticsManager`]
- [`fuchsia.ui.composition/Allocator`]
- [`fuchsia.ui.composition/Flatland`]
- [`fuchsia.ui.scenic/Scenic`]
The following service must be present in order to collect diagnostic tracing data.
- [`fuchsia.tracing.perfetto.ProducerConnector`]
Defined at line 1077 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_service_directory ()
Defined at line 1081 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::fidl::InterfaceHandle< ::fuchsia::io::Directory> * mutable_service_directory ()
Service directory to be used by the context.
The following services must be present in the service directory:
- [`fuchsia.buildinfo/Provider`]
- [`fuchsia.device/NameProvider`]
- [`fuchsia.fonts/Provider`]
- [`fuchsia.hwinfo.Product`]
- [`fuchsia.intl/PropertyProvider`]
- [`fuchsia.kernel/VmexResource`] (unless [`ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`] is set)
- [`fuchsia.logger/LogSink`]
- [`fuchsia.memorypressure/Provider`]
- [`fuchsia.process/Launcher`]
- [`fuchsia.sysmem/Allocator`]
The following services are recommended to be present in order to allow CPU scheduling
profiles to be applied to threads to tune their performance, especially for media rendering.
- [`fuchsia.media.ProfileProvider`] (requirement will be removed in 2025)
- [`fuchsia.scheduler.RoleManager`]
The following services must be present in order to render web content in a Scenic view
using [`Frame.CreateView`], [`Frame.CreateViewWithViewRef`] or [`Frame.CreateView2`]]:
- [`fuchsia.accessibility.semantics/SemanticsManager`]
- [`fuchsia.ui.composition/Allocator`]
- [`fuchsia.ui.composition/Flatland`]
- [`fuchsia.ui.scenic/Scenic`]
The following service must be present in order to collect diagnostic tracing data.
- [`fuchsia.tracing.perfetto.ProducerConnector`]
Defined at line 1114 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_service_directory ()
Defined at line 1122 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::fidl::InterfaceHandle< ::fuchsia::io::Directory> & data_directory ()
Handle to the directory that will contain the [`Context`]'s persistent data. If it is left
unset, then the created [`Context`] will be stateless, with all of its data discarded upon
[`Context`] destruction.
If set, `data_directory` must not be shared with any other [`Context`].
Defined at line 1135 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_data_directory ()
Defined at line 1139 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::fidl::InterfaceHandle< ::fuchsia::io::Directory> * mutable_data_directory ()
Handle to the directory that will contain the [`Context`]'s persistent data. If it is left
unset, then the created [`Context`] will be stateless, with all of its data discarded upon
[`Context`] destruction.
If set, `data_directory` must not be shared with any other [`Context`].
Defined at line 1148 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_data_directory ()
Defined at line 1156 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::string & user_agent_product ()
Optional string describing the embedding product to append to the User-Agent string.
See the specification for the
[HTTP User-Agent header](https://tools.ietf.org/html/rfc7231#section-5.5.3).
Requires that `user_agent_version` is also specified.
Defined at line 1168 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_user_agent_product ()
Defined at line 1172 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::string * mutable_user_agent_product ()
Optional string describing the embedding product to append to the User-Agent string.
See the specification for the
[HTTP User-Agent header](https://tools.ietf.org/html/rfc7231#section-5.5.3).
Requires that `user_agent_version` is also specified.
Defined at line 1180 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_user_agent_product ()
Defined at line 1188 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::string & user_agent_version ()
Optional version for the embedding product to append to the User-Agent string.
Requires that `user_agent_product` is also specified.
Defined at line 1199 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_user_agent_version ()
Defined at line 1203 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::string * mutable_user_agent_version ()
Optional version for the embedding product to append to the User-Agent string.
Requires that `user_agent_product` is also specified.
Defined at line 1210 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_user_agent_version ()
Defined at line 1218 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const uint16_t & remote_debugging_port ()
Enables Frames to be created with remote debugging enabled using the DevTools protocol. If
`port` is 0, then an ephemeral port will be used, which can be queried via the
[`Context.GetRemoteDebuggingPort`] API.
Because remote debugging uses TCP, it is not valid to set a remote
debugging port without having also set [`ContextFeatureFlags.NETWORK`]
for the context.
Defined at line 1233 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_remote_debugging_port ()
Defined at line 1237 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
uint16_t * mutable_remote_debugging_port ()
Enables Frames to be created with remote debugging enabled using the DevTools protocol. If
`port` is 0, then an ephemeral port will be used, which can be queried via the
[`Context.GetRemoteDebuggingPort`] API.
Because remote debugging uses TCP, it is not valid to set a remote
debugging port without having also set [`ContextFeatureFlags.NETWORK`]
for the context.
Defined at line 1248 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_remote_debugging_port ()
Defined at line 1256 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::vector< ::fuchsia::web::ContentDirectoryProvider> & content_directories ()
List of providers whose contents will be served by `fuchsia-dir://` URLs.
Defined at line 1265 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_content_directories ()
Defined at line 1269 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::vector< ::fuchsia::web::ContentDirectoryProvider> * mutable_content_directories ()
List of providers whose contents will be served by `fuchsia-dir://` URLs.
Defined at line 1274 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_content_directories ()
Defined at line 1282 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::fuchsia::web::ContextFeatureFlags & features ()
Optional features that should be enabled for this context. Some features may also require
additional services in `service_directory`.
Defined at line 1292 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_features ()
Defined at line 1296 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::fuchsia::web::ContextFeatureFlags * mutable_features ()
Optional features that should be enabled for this context. Some features may also require
additional services in `service_directory`.
Defined at line 1302 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_features ()
Defined at line 1310 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::string & playready_key_system ()
Enables PlayReady CDM for the Context using the specified string as a key system
string. The string should be a reverse domain name, as required by
[EME API](https://www.w3.org/TR/encrypted-media/#key-system).
- Requires [`fuchsia.media.drm/PlayReady`] service.
- Requires that a `cdm_data_directory` be specified in [`CreateContextParams`].
Defined at line 1324 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_playready_key_system ()
Defined at line 1328 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::string * mutable_playready_key_system ()
Enables PlayReady CDM for the Context using the specified string as a key system
string. The string should be a reverse domain name, as required by
[EME API](https://www.w3.org/TR/encrypted-media/#key-system).
- Requires [`fuchsia.media.drm/PlayReady`] service.
- Requires that a `cdm_data_directory` be specified in [`CreateContextParams`].
Defined at line 1338 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_playready_key_system ()
Defined at line 1346 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::vector< ::std::string> & unsafely_treat_insecure_origins_as_secure ()
Treat given insecure origins as secure origins. For the definition of secure contexts, see
[Secure Contexts](https://w3c.github.io/webappsec-secure-contexts/) and
[origin trustworthiness](https://www.w3.org/TR/powerful-features/#is-origin-trustworthy).
Example value: `{"http://a.com", "http://b.com"}`.
Defined at line 1359 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_unsafely_treat_insecure_origins_as_secure ()
Defined at line 1363 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::vector< ::std::string> * mutable_unsafely_treat_insecure_origins_as_secure ()
Treat given insecure origins as secure origins. For the definition of secure contexts, see
[Secure Contexts](https://w3c.github.io/webappsec-secure-contexts/) and
[origin trustworthiness](https://www.w3.org/TR/powerful-features/#is-origin-trustworthy).
Example value: `{"http://a.com", "http://b.com"}`.
Defined at line 1372 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_unsafely_treat_insecure_origins_as_secure ()
Defined at line 1380 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::std::vector< ::std::vector<uint8_t>> & cors_exempt_headers ()
Specifies a set of header names for which [Cross-Origin Resource Sharing
(CORS)](https://www.w3.org/TR/cors/) checks should not be enforced.
Defined at line 1390 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_cors_exempt_headers ()
Defined at line 1394 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::std::vector< ::std::vector<uint8_t>> * mutable_cors_exempt_headers ()
Specifies a set of header names for which [Cross-Origin Resource Sharing
(CORS)](https://www.w3.org/TR/cors/) checks should not be enforced.
Defined at line 1400 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_cors_exempt_headers ()
Defined at line 1408 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const ::fidl::InterfaceHandle< ::fuchsia::io::Directory> & cdm_data_directory ()
Specifies the storage to use to persistent content licensing related data (e.g.
provisioning data, persistent session data). By default these data will be placed under the
`data_directory`, if specified.
If neither `data_directory` nor `cdm_data_directory` are specified, then content licensing
features requiring persistent storage (e.g. persistent licensing sessions) will not be
available to the [`Context`].
Note that not all content licensing systems support persistent sessions, regardless of
whether persistent storage is provided.
Defined at line 1426 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_cdm_data_directory ()
Defined at line 1430 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
::fidl::InterfaceHandle< ::fuchsia::io::Directory> * mutable_cdm_data_directory ()
Specifies the storage to use to persistent content licensing related data (e.g.
provisioning data, persistent session data). By default these data will be placed under the
`data_directory`, if specified.
If neither `data_directory` nor `cdm_data_directory` are specified, then content licensing
features requiring persistent storage (e.g. persistent licensing sessions) will not be
available to the [`Context`].
Note that not all content licensing systems support persistent sessions, regardless of
whether persistent storage is provided.
Defined at line 1444 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_cdm_data_directory ()
Defined at line 1452 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const uint64_t & cdm_data_quota_bytes ()
Specifies a target maximum size for `cdm_data_directory` contents, in bytes. If the amount
of persisted CDM data exceeds this threshold, then the [`Context`] will attempt to purge
some data to meet the specified quota.
Defined at line 1463 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_cdm_data_quota_bytes ()
Defined at line 1467 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
uint64_t * mutable_cdm_data_quota_bytes ()
Specifies a target maximum size for `cdm_data_directory` contents, in bytes. If the amount
of persisted CDM data exceeds this threshold, then the [`Context`] will attempt to purge
some data to meet the specified quota.
Defined at line 1474 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_cdm_data_quota_bytes ()
Defined at line 1482 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
const uint64_t & data_quota_bytes ()
Specifies a target maximum size for `data_directory` contents, in bytes.
The [`Context`] will attempt to limit browsing state (e.g. cookies, LocalStorage) to
not exceed the specified size.
Defined at line 1493 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
bool has_data_quota_bytes ()
Defined at line 1497 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
uint64_t * mutable_data_quota_bytes ()
Specifies a target maximum size for `data_directory` contents, in bytes.
The [`Context`] will attempt to limit browsing state (e.g. cookies, LocalStorage) to
not exceed the specified size.
Defined at line 1504 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h
void clear_data_quota_bytes ()
Defined at line 1512 of file fidling/gen/sdk/fidl/fuchsia.web/fuchsia.web/hlcpp/fuchsia/web/cpp/fidl.h