PROTOCOLS
Context
Defined in fuchsia.web/context.fidl
Manages browsing state (e.g. LocalStorage, cookies, etc) associated with a set of Frame.
CreateFrame
Creates a new Frame under this Context. Destruction of a Context triggers the destruction of all of its associated Frame. Frame can be transferred to another component but cannot be shared across multiple components.
frame
: An interface request that will be bound to the created Frame.
Request
Name | Type |
---|---|
frame |
request<Frame>
|
CreateFrameWithParams
Similar to Context.CreateFrame, with extra parameters.
params
: The configuration used to create the Frame. This method will fail withZX_ERR_INVALID_ARGS
if the table is not clonable.frame
: An interface request that will be bound to the created Frame.
Request
Name | Type |
---|---|
params |
CreateFrameParams
|
frame |
request<Frame>
|
GetCookieManager
Used to observe cookies for sites hosted under this Context.
Request
Name | Type |
---|---|
manager |
request<CookieManager>
|
GetRemoteDebuggingPort
Waits until debugging is available on one or more Frames, and returns the DevTools port number. Multiple calls may be queued to received the port number.
If an error occured, the ContextError will be set to this value:
REMOTE_DEBUGGING_PORT_NOT_OPENED
:remote_debugging_port
was not set in CreateContextParams or the remote debugging service failed to start.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
result |
Context_GetRemoteDebuggingPort_Result
|
ContextProvider
Defined in fuchsia.web/context.fidl
The top-level service interface which allows for the creation of Context resources.
Create
Creates a new browser Context whose state is wholly independent and isolated from other
Context(Contexts
).
params
: The configuration used to create the Context.context
: An interface request which will receive a bound Context service.
Request
Name | Type |
---|---|
params |
CreateContextParams
|
context |
request<Context>
|
CookieManager
Defined in fuchsia.web/cookie.fidl
Provides methods for monitoring and accessing browser cookie state.
GetCookieList
Returns a list of Cookies, optionally limited to those matching url
, and optionally
name
. cookies
iterates over the matching cookies, including their value
s.
Request
Name | Type |
---|---|
url |
Url
|
name |
CookieName
|
cookies |
request<CookiesIterator>
|
ObserveCookieChanges
Observe changes to all cookies named name
that would be sent in a request to url
.
If neither url
nor name
are set then all cookies are observed. If only url
is set
then all cookies for that URL are observed. If both are set then only cookies matching both
fields are observed.
changes
iterates over a stream of cookie changes. Additions or updates are expressed as
complete cookies, while deletions are expressed as cookies with no value
set.
Request
Name | Type |
---|---|
url |
Url
|
name |
CookieName
|
changes |
request<CookiesIterator>
|
CookiesIterator
Defined in fuchsia.web/cookie.fidl
Used to iterator over a set of cookies, or a stream of changes to cookies.
GetNext
Fetches the next batch of cookies, or of changes to cookies. RFC6265 does not specify an upper-bound on the number of cookies which may be stored.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
changed_cookies |
vector<Cookie>
|
Debug
Defined in fuchsia.web/debug.fidl
The debug service which allows to enable the DevTools service on Contexts.
EnableDevTools
Enables the DevTools service on every subsequent Context creation and delivers
subsequent DevTools events to the supplied listener
. The callback indicates when the
WebEngine is in a debuggable state. Events will be sent to every listener
registered with
this method.
Request
Name | Type |
---|---|
listener |
DevToolsListener
|
Response
Name | Type |
---|
DevToolsListener
Defined in fuchsia.web/debug.fidl
Interface used to observe DevTools service availability events.
OnContextDevToolsAvailable
Called when the DevTools service is available on a new Context.
listener
: Channel over which DevTools events for the new Context will be delivered. This channel will disconnect when the Context is destroyed.
Request
Name | Type |
---|---|
listener |
request<DevToolsPerContextListener>
|
DevToolsPerContextListener
Defined in fuchsia.web/debug.fidl
Interface supplied by the debugging component to observe the DevTools service opening event.
OnHttpPortOpen
Called when the DevTools service starts accepting TCP connections on port
. port
will
remain open until the Context is destroyed.
port
: The port used by the service.
Request
Name | Type |
---|---|
port |
uint16
|
Frame
Defined in fuchsia.web/frame.fidl
AddBeforeLoadJavaScript
Executes a UTF-8 encoded script
for every subsequent page load where the Frame's URL
has an origin reflected in origins
. The script is executed early, prior to the execution
of the document's scripts.
Scripts are identified by a client-managed identifier id
. Any script previously injected
using the same id
will be replaced.
The order in which multiple bindings are executed is the same as the order in which the
bindings were added. If a script is added which clobbers an existing script of the same
id
, the previous script's precedence in the injection order will be preserved.
At least one origins
entry must be specified. If a wildcard "*"
is specified in
origins
, then the script will be evaluated unconditionally.
If an error occured, the FrameError will be set to one of these values:
BUFFER_NOT_UTF8
:script
is not UTF-8 encoded.INVALID_ORIGIN
:origins
is an empty vector.
Request
Name | Type |
---|---|
id |
uint64
|
origins |
vector<string>
|
script |
fuchsia.mem/Buffer
|
Response
Name | Type |
---|---|
result |
Frame_AddBeforeLoadJavaScript_Result
|
ConfigureInputTypes
Enables or disables the processing of the specified types
of user inputs.
allow
specifies whether to enable or disable the specified types
.
All input types are enabled by default.
Request
Name | Type |
---|---|
types |
InputTypes
|
allow |
AllowInputState
|
CreateView
Creates a new view using the specified view_token
. Caller should pass the other end of
the token to fuchsia.ui.gfx/ViewHolderArgs to attach the new view to a view tree.
See the description of CreateContextParams.service_directory for additional services that must be present when using this method.
Request
Name | Type |
---|---|
view_token |
fuchsia.ui.views/ViewToken
|
CreateViewWithViewRef
Creates a new view using the specified view_token
. Caller should pass the other end of
the token to fuchsia.ui.gfx/ViewHolderArgs to attach the new view to a view tree.
view_ref
can be cloned before passing it to this method, which will allow clients to
track the view.
view_ref_control
must not have the ZX_RIGHT_DUPLICATE
set, or view creation will fail
and view_token
will be closed.
See the description of CreateContextParams.service_directory for additional services that must be present when using this method.
Request
Name | Type |
---|---|
view_token |
fuchsia.ui.views/ViewToken
|
view_ref_control |
fuchsia.ui.views/ViewRefControl
|
view_ref |
fuchsia.ui.views/ViewRef
|
DisableHeadlessRendering
Stops headless rendering of the Frame.
May only be used on a Context created with the HEADLESS
feature flag.
Request
Name | Type |
---|
EnableHeadlessRendering
Enables headless rendering of the Frame.
This is used when content depends on layout and/or animation events firing normally.
May only be used on a Context created with the HEADLESS
feature flag.
Request
Name | Type |
---|
ExecuteJavaScript
Executes a UTF-8 encoded script
in the Frame if the Frame's URL has an origin
which matches entries in origins
.
At least one origins
entry must be specified. If a wildcard "*"
is specified in
origins
, then the script will be evaluated unconditionally.
Returns the result of executing script
, as a JSON-encoded string.
Note that scripts share the same execution context as the document, meaning that document may modify variables, classes, or objects set by the script in arbitrary or unpredictable ways.
If an error occured, the FrameError will be set to one of these values:
BUFFER_NOT_UTF8
:script
is not UTF-8 encoded.INVALID_ORIGIN
: The Frame's current URL does not match any of the values inorigins
ororigins
is an empty vector.
Request
Name | Type |
---|---|
origins |
vector<string>
|
script |
fuchsia.mem/Buffer
|
Response
Name | Type |
---|---|
result |
Frame_ExecuteJavaScript_Result
|
ExecuteJavaScriptNoResult
Variant of Frame.ExecuteJavaScript which executes the supplied script without returning a result.
Request
Name | Type |
---|---|
origins |
vector<string>
|
script |
fuchsia.mem/Buffer
|
Response
Name | Type |
---|---|
result |
Frame_ExecuteJavaScriptNoResult_Result
|
ForceContentDimensions
Overrides the dimensions reported to web content. The devicePixelRatio reported to
web content will be adjusted in response to changes in the pixel size of the View,
rather than changing the size reported to the content. Call with null web_dips
to
remove any prior forced content dimensions.
Request
Name | Type |
---|---|
web_dips |
fuchsia.ui.gfx/vec2?
|
GetMediaPlayer
Returns a fuchsia.media.sessions2/Player interface through which media (i.e. video/audio) playback in the frame may be observed, and/or controlled. Only one fuchsia.media.sessions2/Player may be active at a time, for each Frame.
Request
Name | Type |
---|---|
player |
request<fuchsia.media.sessions2/Player>
|
GetNavigationController
Returns an interface through which the Frame may be navigated to a desired URL, reloaded, etc.
controller
: An asynchronous interface request for the Frame's NavigationController.
Request
Name | Type |
---|---|
controller |
request<NavigationController>
|
GetPrivateMemorySize
Returns the amount of private (non-shared) physical memory used by the Frame's main document. The returned size might not reflect the memory usage of embedded iframes.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
size_bytes |
uint64
|
PostMessage
Posts a message to the frame's onMessage handler.
target_origin
restricts message delivery to the specified origin. If target_origin
is
"*"
, then the message will be sent to the document regardless of its origin.
See the
HTML spec
section 9.4.3 for more details on how the target origin policy is applied.
If an error occured, the FrameError will be set to one of these values:
INTERNAL_ERROR
: The WebEngine failed to create a message pipe.BUFFER_NOT_UTF8
: The script inmessage
'sdata
property is not UTF-8 encoded.INVALID_ORIGIN
:origins
is an empty vector.NO_DATA_IN_MESSAGE
: Thedata
property is missing inmessage
.
Request
Name | Type |
---|---|
target_origin |
Url
|
message |
WebMessage
|
Response
Name | Type |
---|---|
result |
Frame_PostMessage_Result
|
RemoveBeforeLoadJavaScript
Removes a previously added JavaScript snippet identified by id
. This is a no-op if there
is no JavaScript snippet identified by id
.
Request
Name | Type |
---|---|
id |
uint64
|
SetBlockMediaLoading
Sets whether to block all HTMLMediaElements in the frame from fetching and loading media resources.
May be used, for example, to prevent loading media in frames that are not visible.
While media loading is blocked, elements with autoplay
set to true
will not start
playback. The promises returned by calls to play()
will remain unresolved until loading is
unblocked by a call to this method.
When media loading is unblocked, elements will begin fetching, resource, loading, and playing as appropriate.
Any elements that have begun fetching or loading media resources for the current source
before media loading was blocked will continue to fetch, load, and start playback as
appropriate. This includes calls to play()
even after media loading is blocked.
Request
Name | Type |
---|---|
blocked |
bool
|
SetConsoleLogSink
Specifies where to emit console
log output to. By default log output will be routed to a
fuchsia.logger/LogSink obtained via the Context's service directory.
sink
: The fuchsia.logger/LogSink to use to emit logs. Passing anull
handle resets logging to use the default fuchsia.logger/LogSink.
Request
Name | Type |
---|---|
sink |
fuchsia.logger/LogSink?
|
SetJavaScriptLogLevel
If set to a value other than ConsoleLogLevel.NONE, allows web content to log messages
to the fuchsia.logger/LogSink configured for this Frame, via the
console
object (e.g. using debug()
, log()
, info()
, warn()
and
error()
).
The default value is ConsoleLogLevel.NONE.
As the system log may be persisted, it is recommended that ConsoleLogLevel.NONE be used in Incognito and other private browsing modes.
Log lines are written to the fuchsia.logger/LogsSink configured for this Frame, with severities mapped as follows:
debug()
,log()
andinfo()
are logged atINFO
severity.warn()
is logged atWARN
severity.error()
is logged atERROR
severity.
Request
Name | Type |
---|---|
level |
ConsoleLogLevel
|
SetMediaSessionId
Sets session_id
to pass to the fuchsia.media/AudioConsumer when playing audio. The
specified value is not applied retroactively to audio streams that were started before this
message is processed. If the caller needs to ensure the value is applied to all streams it
should call this method before Frame.GetNavigationController.
Request
Name | Type |
---|---|
session_id |
uint64
|
SetNavigationEventListener
Sets the listener for handling page navigation events.
listener
: The observer to use. Unregisters any existing listener if null.
Request
Name | Type |
---|---|
listener |
NavigationEventListener?
|
SetNavigationPolicyProvider
Sets the navigation policy provider for the Frame. When set, the Frame sends
NavigationPolicyProvider.EvaluateRequestedNavigation when processing navigation
requests. params
defines when the message is sent. After sending the
EvaluateRequestedNavigation
message, the Frame blocks the corresponding navigation
until it receives a response.
Should be called before GetNavigationController
to ensure that it is applied to all
navigations including the first NavigationController.LoadURL request.
Request
Name | Type |
---|---|
params |
NavigationPolicyProviderParams
|
provider |
NavigationPolicyProvider
|
SetPermissionState
Sets the permission state for the specified permission
and web_origin
. By default, all
permissions are denied.
Request
Name | Type |
---|---|
permission |
PermissionDescriptor
|
web_origin |
Url
|
state |
PermissionState
|
SetPopupFrameCreationListener
Sets the listener for handling popup frame opened by web content. If no listener is present, then any new popup frame will be blocked.
listener
: The listener to use. Unregisters any existing listener if null.
Request
Name | Type |
---|---|
listener |
PopupFrameCreationListener?
|
SetPreferredTheme
Specifies the color theme reported to web content via the prefers-color-scheme
media
query.
Specifying AUTO
requires that the Context have the fuchsia.settings.Display
service. If the service is not available, the Frame will disconnect with
ZX_ERR_INVALID_ARGS
.
Valid themes are LIGHT
, DARK
, and AUTO
. The default color scheme is LIGHT
.
If DEFAULT is specified, the <a class='link' href='#Frame'>Frame</a> will disconnect with
ZX_ERR_INVALID_ARGS`.
Request
Name | Type |
---|---|
theme |
fuchsia.settings/ThemeType
|
SetUrlRequestRewriteRules
Supplies a set of UrlRequestRewriteRule to apply on every subsequent URL request.
rules
are cumulative and applied in order.rules
will be validated before being applied. Ifrules
are invalid, the Frame will be closed withERR_INVALID_ARGS
.- Frame.SetUrlRequestRewriteRules must not be called again until its acknowledgement
callback has been processed. If this happens, the Frame will be closed with
ERR_BAD_STATE
.
Request
Name | Type |
---|---|
rules |
vector<UrlRequestRewriteRule>[4096]
|
Response
Name | Type |
---|
FrameHost
Defined in fuchsia.web/context.fidl
Used by Context clients to delegate Frame hosting capabilities to selected peers.
CreateFrameWithParams
Behaves identically to Context.CreateFrameWithParams.
Request
Name | Type |
---|---|
params |
CreateFrameParams
|
frame |
request<Frame>
|
MessagePort
Defined in fuchsia.web/frame.fidl
Represents one end of an HTML5 MessageChannel. Can be used to send and exchange Messages with the peered MessagePort in the Frame's script context. The port is destroyed when either end of the MessagePort channel is torn down.
PostMessage
Sends a WebMessage to the peer. These are processed in order, one at a time. It is not necessary for the caller to wait for the completion callback before calling MessagePort.PostMessage again.
If an error occured, the FrameError will be set to one of these value:
BUFFER_NOT_UTF8
: The script inmessage
'sdata
property is not UTF-8 encoded.NO_DATA_IN_MESSAGE
: Thedata
property is missing inmessage
.
Request
Name | Type |
---|---|
message |
WebMessage
|
Response
Name | Type |
---|---|
result |
MessagePort_PostMessage_Result
|
ReceiveMessage
Asynchronously reads the next message from the channel. The client should invoke the callback when it is ready to process another message. Unreceived messages are buffered on the sender's side and bounded by its available resources.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
message |
WebMessage
|
NavigationController
Defined in fuchsia.web/navigation.fidl
Provides methods for controlling and querying the navigation state of a Frame.
GetVisibleEntry
Returns information for the currently visible content regardless of loading state, or an empty entry if no content is being displayed.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
entry |
NavigationState
|
GoBack
Tells the Frame to navigate to the previous page in its history, if any.
Request
Name | Type |
---|
GoForward
Tells the Frame to navigate to the next page in its history, if any.
Request
Name | Type |
---|
LoadUrl
Tells the Frame to navigate to a url
.
url
: The address to navigate to.params
: Additional parameters that affect how the resource will be loaded (e.g. cookies, HTTP headers, etc.)
If an error occured, the NavigationControllerError will be set to one of these values:
INVALID_URL
: Theurl
parameter is invalid.INVALID_HEADER
: At least one of the headers in LoadUrlParams.headers is invalid.
Request
Name | Type |
---|---|
url |
Url
|
params |
LoadUrlParams
|
Response
Name | Type |
---|---|
result |
NavigationController_LoadUrl_Result
|
Reload
Tells the Frame to reload the current page.
Request
Name | Type |
---|---|
type |
ReloadType
|
Stop
Tells the Frame to stop the current navigation if a navigation is ongoing.
Request
Name | Type |
---|
NavigationEventListener
Defined in fuchsia.web/navigation.fidl
Interface supplied by the embedder for receiving notifications about navigation events in a Frame.
OnNavigationStateChanged
Called when user-visible navigation state has changed since Frame creation or the last
acknowledgement callback, whichever occurred last. change
will contain all the
differences in navigation state since the last acknowledgement. Any unchanged properties
will be left unset in change
.
Implementer must call the acknowledgement callback to receive new navigation events.
Request
Name | Type |
---|---|
change |
NavigationState
|
Response
Name | Type |
---|
NavigationPolicyProvider
Defined in fuchsia.web/navigation.fidl
EvaluateRequestedNavigation
Called when the Frame is processing a navigation request in one of the phase(s) specified in NavigationPolicyProviderParams. Navigation is paused until the result is received. The returned NavigationDecision defines how the navigation should proceed.
Request
Name | Type |
---|---|
requested_navigation |
RequestedNavigation
|
Response
Name | Type |
---|---|
decision |
NavigationDecision
|
PopupFrameCreationListener
Defined in fuchsia.web/frame.fidl
OnPopupFrameCreated
Called when a Frame has created a new popup frame
. Information about the popup frame,
and how it was created, is provided via info
. Additional popup frames are delivered after
the acknowledgement callback is invoked.
Request
Name | Type |
---|---|
frame |
Frame
|
info |
PopupFrameCreationInfo
|
Response
Name | Type |
---|
STRUCTS
Context_GetRemoteDebuggingPort_Response
Defined in fuchsia.web/context.fidl
Name | Type | Description | Default |
---|---|---|---|
port |
uint16
|
No default |
Frame_AddBeforeLoadJavaScript_Response
Defined in fuchsia.web/frame.fidl
Name | Type | Description | Default |
---|
Frame_ExecuteJavaScriptNoResult_Response
Defined in fuchsia.web/frame.fidl
Name | Type | Description | Default |
---|
Frame_ExecuteJavaScript_Response
Defined in fuchsia.web/frame.fidl
Name | Type | Description | Default |
---|---|---|---|
result |
fuchsia.mem/Buffer
|
No default |
Frame_PostMessage_Response
Defined in fuchsia.web/frame.fidl
Name | Type | Description | Default |
---|
MessagePort_PostMessage_Response
Defined in fuchsia.web/frame.fidl
Name | Type | Description | Default |
---|
NavigationController_LoadUrl_Response
Defined in fuchsia.web/navigation.fidl
Name | Type | Description | Default |
---|
NoArgumentsAction
Defined in fuchsia.web/navigation.fidl
Empty struct used in NavigationDecision for actions that don't hav any arguments.
Name | Type | Description | Default |
---|
ENUMS
AllowInputState
Type: int32
Defined in fuchsia.web/frame.fidl
Controls whether Frame.ConfigureInputTypes() should allow or deny processing of the specified InputTypes.
Name | Value | Description |
---|---|---|
ALLOW |
1 |
|
DENY |
2 |
AutoplayPolicy
Type: int32
Defined in fuchsia.web/context.fidl
Specifies the policy for automatic (non user-initiated) playback of video and audio content.
Name | Value | Description |
---|---|---|
ALLOW |
1 |
All media is permitted to autoplay. |
REQUIRE_USER_ACTIVATION |
2 |
Allow autoplay when the document has received a user activation. This can be the result of user action or LoadUrlParams.was_user_activated being set. |
ConsoleLogLevel
Type: int32
Defined in fuchsia.web/frame.fidl
Name | Value | Description |
---|---|---|
NONE |
100 |
No logging. |
DEBUG |
-1 |
Outputs messages from |
INFO |
0 |
Outputs messages from |
WARN |
1 |
Outputs messages from |
ERROR |
2 |
Outputs messages from |
ContextError
Type: int32
Defined in fuchsia.web/context.fidl
Name | Value | Description |
---|---|---|
REMOTE_DEBUGGING_PORT_NOT_OPENED |
1 |
The remote debugging service was not opened. |
FrameError
Type: int32
Defined in fuchsia.web/frame.fidl
Represents the return status of a Frame method.
Name | Value | Description |
---|---|---|
INTERNAL_ERROR |
1 |
An internal error occured. |
BUFFER_NOT_UTF8 |
2 |
The provided buffer is not UTF-8 encoded. |
INVALID_ORIGIN |
3 |
The Frame's URL does not match any of the origins provided by the caller. |
NO_DATA_IN_MESSAGE |
4 |
The required |
LoadUrlReason
Type: uint32
Defined in fuchsia.web/navigation.fidl
Characterizes the origin of a NavigationController.LoadUrl request.
Name | Value | Description |
---|---|---|
LINK |
0 |
Navigation was initiated by the user following a link. |
TYPED |
1 |
Navigation was initiated by a user-provided URL. |
NavigationControllerError
Type: int32
Defined in fuchsia.web/navigation.fidl
Represents the return status of a NavigationController method.
Name | Value | Description |
---|---|---|
INVALID_URL |
1 |
The provided URL is invalid. |
INVALID_HEADER |
2 |
At least one of the provided headers was invalid. |
PageType
Type: uint32
Defined in fuchsia.web/navigation.fidl
Characterizes the page type in a NavigationState.
Name | Value | Description |
---|---|---|
NORMAL |
0 |
Regular web page. |
ERROR |
1 |
Error page. |
PermissionState
Type: uint8
Defined in fuchsia.web/frame.fidl
A state for a web permission.
Name | Value | Description |
---|---|---|
DENIED |
1 |
Permission is denied. |
GRANTED |
2 |
Permission is granted. |
PermissionType
Type: uint16
Defined in fuchsia.web/frame.fidl
Identifies a type of permission that may be granted to a web origin.
Name | Value | Description |
---|---|---|
MICROPHONE |
1 |
Permission to access microphone(s). |
CAMERA |
2 |
Permission to access camera(s). |
PROTECTED_MEDIA_IDENTIFIER |
3 |
Permission to use device identifier(s) for EME. |
PERSISTENT_STORAGE |
4 |
Permission to use persistent storage. |
ReloadType
Type: uint32
Defined in fuchsia.web/navigation.fidl
Characterizes the type of reload.
Name | Value | Description |
---|---|---|
PARTIAL_CACHE |
0 |
Reloads the current entry, bypassing the cache for the main resource. |
NO_CACHE |
1 |
Reloads the current entry, bypassing the cache entirely. |
UrlRequestAction
Type: int32
Defined in fuchsia.web/url_request_rewrite_rules.fidl
Name | Value | Description |
---|---|---|
ALLOW |
1 |
Allow the request to be processed. |
DENY |
2 |
Block the request. |
TABLES
ContentDirectoryProvider
Defined in fuchsia.web/context.fidl
Defines a provider which hosts resources from a fuchsia.io/Directory. Content can GET
resource files via the provider, but not enumerate directories. Resources can be accessed by
their URLs: fuchsia-dir://<provider-name>/<path/to/resource>
By default the MIME types of files are determined automatically by "sniffing" the contents of
the files. No content encoding will be declared, which browsers will interpret as meaning
"text/plain"
.
Content type and encoding metadata may optionally be specified explicitly by metadata files,
which reside alongside the file. Metadata is expressed in JSON files, named after the files
they describe with a "._metadata"
suffix.
For example, the file "index.html"
would have the a metadata file called
"index.html._metadata"
, with the following contents:
{
"charset": "utf-8",
"mime": "text/html"
}
Ordinal | Name | Type | Description |
---|---|---|---|
1 | name |
string[255]
|
Name of the provider. Must be non-empty and composed solely of alphanumerics, dots, and dashes. |
2 | directory |
fuchsia.io/Directory
|
Directory containing the files served by this provider. |
Cookie
Defined in fuchsia.web/cookie.fidl
Ordinal | Name | Type | Description |
---|---|---|---|
1 | id |
CookieId
|
A table with fields to identify a cookie. |
2 | value |
string
|
The cookie value. RFC6265 does not specify an upper limit on cookie size, but recommends that at least 4096 bytes are supported. |
CookieId
Defined in fuchsia.web/cookie.fidl
Ordinal | Name | Type | Description |
---|---|---|---|
1 | name |
CookieName
|
An RFC2616 "token" chosen by the site to identify the cookie. |
2 | domain |
string[255]
|
The RFC1034 "subdomain" to which this cookie is scoped. e.g. "example.com" allows access from all *.example.com sub-domains. |
3 | path |
string[65536]
|
The URL "path" prefix to which this cookie is scoped. e.g. "/" allows access from all paths. |
CreateContextParams
Defined in fuchsia.web/context.fidl
Parameters specifying the configuration for a new Context.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | service_directory |
fuchsia.io/Directory
|
Service directory to be used by the context. The following services must be present in the directory:
The following services must be present in order to render web content in a Scenic view using Frame.CreateView or Frame.CreateViewWithViewRef: |
2 | data_directory |
fuchsia.io/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, |
3 | user_agent_product |
string[128]
|
Optional string describing the embedding product to append to the User-Agent string.
See the specification for the
HTTP User-Agent header.
Requires that |
4 | user_agent_version |
string[128]
|
Optional version for the embedding product to append to the User-Agent string. Requires that |
5 | remote_debugging_port |
uint16
|
Enables Frames to be created with remote debugging enabled using the DevTools protocol. If
|
6 | content_directories |
vector<ContentDirectoryProvider>[100]
|
List of providers whose contents will be served by |
7 | features |
ContextFeatureFlags
|
Optional features that should be enabled for this context. Some features may also require
additional services in |
8 | playready_key_system |
string[128]
|
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.
|
9 | unsafely_treat_insecure_origins_as_secure |
vector<string>[100]
|
Treat given insecure origins as secure origins. For the definition of secure contexts, see Secure Contexts and origin trustworthiness. Example value: |
10 | cors_exempt_headers |
vector<vector<uint8>>
|
Specifies a set of header names for which Cross-Origin Resource Sharing (CORS) checks should not be enforced. |
11 | cdm_data_directory |
fuchsia.io/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
If neither Note that not all content licensing systems support persistent sessions, regardless of whether persistent storage is provided. |
12 | cdm_data_quota_bytes |
uint64
|
Specifies a target maximum size for |
13 | data_quota_bytes |
uint64
|
Specifies a target maximum size for |
CreateFrameParams
Defined in fuchsia.web/context.fidl
Parameters specifying the configuration for a new Frame.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | enable_remote_debugging |
bool
|
Set to true to enable remote debugging. The Frame will be closed with
|
2 | debug_name |
string
|
Set to give the Frame a name to help distinguish it in debug contexts , such as system log output. For example, the name may be added to messages from web content when they are logged to the system logger. The name does not affect user- or web-visible behavior. Popup Frames created by the Frame will have a name derived from the parent Frame's name. |
3 | autoplay_policy |
AutoplayPolicy
|
Sets the autoplay policy for the Frame. If omitted, the default policy is
|
4 | explicit_sites_filter_error_page |
fuchsia.mem/Data
|
Enables automatic blocking of navigations to explicit sites, and specifies the error page
content, in HTML, to be loaded in the Frame when a navigation is canceled by the filter.
Applies to navigations in all frames within the Frame.
When navigation of the main document is canceled, the Frame's NavigationState.PageType
is |
LoadUrlParams
Defined in fuchsia.web/navigation.fidl
Additional parameters for modifying the behavior of NavigationController.LoadUrl.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | type |
LoadUrlReason
|
Provides a hint to the browser UI about how NavigationController.LoadUrl was triggered. |
2 | referrer_url |
Url
|
The URL that linked to the resource being requested. |
3 | was_user_activated |
bool
|
Should be set to true to propagate user activation to the frame. User activation implies that the user is interacting with the web frame. It enables some web features that are not available otherwise. For example, autoplay will work only when this flag is set to true. |
4 | headers |
vector<fuchsia.net.http/Header>
|
Custom HTTP headers. RFC7540 does not specify a limit on the number nor size of headers. |
NavigationPolicyProviderParams
Defined in fuchsia.web/navigation.fidl
Used to specify which navigation events should be delegated to NavigationPolicyProvider.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | main_frame_phases |
NavigationPhase
|
Specifies the set of navigation phases in the main frame that should be evaluated. |
2 | subframe_phases |
NavigationPhase
|
Specifies the set of navigation phases in subframes that should be evaluated. |
NavigationState
Defined in fuchsia.web/navigation.fidl
Contains information about the Frame's navigation state.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | url |
Url
|
The page's URL. |
2 | title |
string
|
The user-visible page title. While W3C style recommendation is that HTML TITLE tags not exceed 64 characters in length, there is no actual limit. |
3 | page_type |
PageType
|
Indicates whether this was a navigation to an error page. |
4 | can_go_forward |
bool
|
Indicates if there is a following navigation. |
5 | can_go_back |
bool
|
Indicates if there is a previous navigation. |
6 | is_main_document_loaded |
bool
|
Indicates that the main document's statically declared resources have been loaded. |
PermissionDescriptor
Defined in fuchsia.web/frame.fidl
Describes a web permission. In the future, it may be extended with type-specific fields.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | type |
PermissionType
|
PopupFrameCreationInfo
Defined in fuchsia.web/frame.fidl
Specifies additional information about a newly created popup frame.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | initial_url |
Url
|
The URL to which the popup frame was initially navigated. |
2 | initiated_by_user |
bool
|
Set if the popup frame was created in response to UI interaction from the user (e.g. a link was clicked). |
RequestedNavigation
Defined in fuchsia.web/navigation.fidl
Ordinal | Name | Type | Description |
---|---|---|---|
1 | id |
NavigationId
|
Unique ID of the navigation. |
2 | phase |
NavigationPhase
|
Current navigation phase. Exactly one bit will be set. |
3 | is_main_frame |
bool
|
Whether the navigation is taking place in the main frame versus in a subframe. |
4 | is_same_document |
bool
|
Whether the navigation happened without changing the document. |
5 | is_http_post |
bool
|
Whether the navigation is a POST request. |
6 | url |
Url
|
The current target URL of the navigation. This may change for the same navigation after encountering a server redirect. |
7 | has_gesture |
bool
|
Whether the navigation was initiated by a user gesture. |
8 | was_server_redirect |
bool
|
Whether the navigation has encountered a server redirect or not. |
UrlRequestRewriteAddHeaders
Defined in fuchsia.web/url_request_rewrite_rules.fidl
Adds headers
to the URL request. If a header is already present in the original URL request,
it will be overwritten.
headers
must be set.- Each fuchsia.net.http/Header in
headers
must have a valid HTTP header name and value, per RFC 7230 section 3.2.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | headers |
vector<fuchsia.net.http/Header>[4096]
|
UrlRequestRewriteAppendToQuery
Defined in fuchsia.web/url_request_rewrite_rules.fidl
Appends query
to the URL query. If the URL request already has a query, query
will be
appended to it, preceded by &
. Otherwise, the URL's query will be set to query
.
query
must be set.query
must be a valid URL-query string.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | query |
Url
|
UrlRequestRewriteRemoveHeader
Defined in fuchsia.web/url_request_rewrite_rules.fidl
If query_pattern
in the URL query, removes header_name
from the list of headers. If
query_pattern
is not set, removes header_name
from the list of headers unconditionally.
header_name
must be set.header_name
must be a valid HTTP header name, per RFC 7230 section 3.2.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | query_pattern |
Url
|
|
2 | header_name |
vector<uint8>[4096]
|
UrlRequestRewriteReplaceUrl
Defined in fuchsia.web/url_request_rewrite_rules.fidl
If the URL in the URL request ends with url_ends_with
, rewrites the URL to new_url
.
url_ends_with
andnew_url
must be set.url_ends_with
must be a valid path-relative-URL string.new_url
must be a valid URL string.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | url_ends_with |
Url
|
|
2 | new_url |
Url
|
UrlRequestRewriteRule
Defined in fuchsia.web/url_request_rewrite_rules.fidl
Ordinal | Name | Type | Description |
---|---|---|---|
1 | hosts_filter |
vector<string>[4096]
|
Set of hosts to apply the rules to. If not set, the rule will apply to every request, independent of host. |
2 | schemes_filter |
vector<string>[4096]
|
Set of schemes to apply the rules to. If not set, the rule will apply to every request, independent of scheme. |
3 | rewrites |
vector<UrlRequestRewrite>[4096]
|
URL request rewrites to apply. |
4 | action |
UrlRequestAction
|
Specifies the action to take for requests matching the filter criteria. Requests are allowed by default. |
UrlRequestRewriteSubstituteQueryPattern
Defined in fuchsia.web/url_request_rewrite_rules.fidl
If pattern
is found in the URL request query, replaces it with substitution
.
pattern
andsubstitution
must be set.substitution
must be a valid URL-query string.
Ordinal | Name | Type | Description |
---|---|---|---|
1 | pattern |
Url
|
|
2 | substitution |
Url
|
WebMessage
Defined in fuchsia.web/frame.fidl
Ordinal | Name | Type | Description |
---|---|---|---|
1 | data |
fuchsia.mem/Buffer
|
The message payload, encoded as an UTF-8 string. This is a required property. |
2 | incoming_transfer |
vector<IncomingTransferable>
|
Optional list of objects transferred into the MessagePort from the FIDL client. |
3 | outgoing_transfer |
vector<OutgoingTransferable>
|
Optional list of objects transferred out of the MessagePort to the FIDL client. |
UNIONS
Context_GetRemoteDebuggingPort_Result
Defined in fuchsia.web/context.fidl
Name | Type | Description |
---|---|---|
response |
Context_GetRemoteDebuggingPort_Response
|
|
err |
ContextError
|
Frame_AddBeforeLoadJavaScript_Result
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
response |
Frame_AddBeforeLoadJavaScript_Response
|
|
err |
FrameError
|
Frame_ExecuteJavaScriptNoResult_Result
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
response |
Frame_ExecuteJavaScriptNoResult_Response
|
|
err |
FrameError
|
Frame_ExecuteJavaScript_Result
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
response |
Frame_ExecuteJavaScript_Response
|
|
err |
FrameError
|
Frame_PostMessage_Result
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
response |
Frame_PostMessage_Response
|
|
err |
FrameError
|
IncomingTransferable
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
message_port |
MessagePort
|
MessagePort_PostMessage_Result
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
response |
MessagePort_PostMessage_Response
|
|
err |
FrameError
|
NavigationController_LoadUrl_Result
Defined in fuchsia.web/navigation.fidl
Name | Type | Description |
---|---|---|
response |
NavigationController_LoadUrl_Response
|
|
err |
NavigationControllerError
|
NavigationDecision
Defined in fuchsia.web/navigation.fidl
Navigation action that should be taken in response to a navigation request. Returned from NavigationPolicyProvider.EvaluateRequestedNavigation.
Name | Type | Description |
---|---|---|
proceed |
NoArgumentsAction
|
Navigation should proceed normally. |
abort |
NoArgumentsAction
|
Navigation should be aborted. The frame should stay on the current page. |
OutgoingTransferable
Defined in fuchsia.web/frame.fidl
Name | Type | Description |
---|---|---|
message_port |
request<MessagePort>
|
UrlRequestRewrite
Defined in fuchsia.web/url_request_rewrite_rules.fidl
Name | Type | Description |
---|---|---|
add_headers |
UrlRequestRewriteAddHeaders
|
Adds a set of headers to a URL request. |
remove_header |
UrlRequestRewriteRemoveHeader
|
Removes a header based on the presence of a pattern in the URL query. |
substitute_query_pattern |
UrlRequestRewriteSubstituteQueryPattern
|
Substitutes a pattern in the URL query. |
replace_url |
UrlRequestRewriteReplaceUrl
|
Replaces a URL if the original URL ends with a pattern. |
append_to_query |
UrlRequestRewriteAppendToQuery
|
Appends to the URL query. |
BITS
ContextFeatureFlags
Type: uint64
Defined in fuchsia.web/context.fidl
Feature flags that allow augmenting Context behavior. Some features require additional services in the service directory provided during context initialization. See CreateContextParams.service_directory.
Name | Value | Description |
---|---|---|
NETWORK | 1 | Enables network access. Requires the following services: |
AUDIO | 2 | Enables audio input and output. Requires the following services: |
VULKAN | 4 | Enables GPU-accelerated rendering of the web content. Requires the following services: |
HARDWARE_VIDEO_DECODER | 8 | Enables hardware video decoding. |
HARDWARE_VIDEO_DECODER_ONLY | 16 | Disables all software video decoders. Videos will be rendered only if they can be decoded
in hardware using fuchsia.mediacodec/CodecFactory. Requires the
|
WIDEVINE_CDM | 32 | Enables Widevine CDM modules for EME API. |
HEADLESS | 64 | Allows embedders to render web content without graphical output or Scenic.
Not compatible with the |
LEGACYMETRICS | 128 | Report telemetry data to the fuchsia.legacymetrics/MetricsRecorder. |
InputTypes
Type: uint64
Defined in fuchsia.web/frame.fidl
Identifies the types of input events which may be handled by a View.
Name | Value | Description |
---|---|---|
KEY | 1 | Keyboard events. |
MOUSE_CLICK | 2 | Mouse button events, for any button. |
MOUSE_WHEEL | 4 | Mouse scroll wheel events. |
MOUSE_MOVE | 8 | Mouse movement events. |
GESTURE_TAP | 16 | Single tapping with one finger. |
GESTURE_PINCH | 32 | Pinching (for zooming). |
GESTURE_DRAG | 64 | Dragging a finger (for scrolling). |
ALL | 9223372036854775808 | Matches all input types. |
NavigationPhase
Type: uint32
Defined in fuchsia.web/navigation.fidl
Identifies a navigation phase.
Name | Value | Description |
---|---|---|
START | 1 | Navigation is being started. |
REDIRECT | 2 | Navigation was redirected. |
PROCESS_RESPONSE | 4 | Navigation response is being processed. At this point navigation hasn't been committed yet, so it is not too late to cancel it. |
FAIL | 8 | Navigation has failed. |
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_HEADERS_COUNT |
4096
|
int32 |
|
MAX_HOST_LENGTH |
255
|
int32 |
|
MAX_RULE_COUNT |
4096
|
int32 |
|
MAX_SCHEME_AND_HOST_LENGTH |
513
|
int32 |
|
MAX_URL_LENGTH |
65536
|
int32 |
|
MAX_URL_SCHEME_NAME_LENGTH |
255
|
int32 |
TYPE ALIASES
Name | Value | Description |
---|---|---|
CookieName |
string [MAX ] |
|
NavigationId |
uint64 |
Unique identifier of a navigation. Can be used to correlate different phases for the same navigation. Guaranteed to be unique for all navigations in the same Context. |
Url |
string [MAX_URL_LENGTH ] |
|
UrlHostName |
string [MAX_HOST_LENGTH ] |
|
UrlSchemeAndHostName |
string [MAX_SCHEME_AND_HOST_LENGTH ] |
|
UrlSchemeName |
string [MAX_URL_SCHEME_NAME_LENGTH ] |