blob: 161f75c0dc2af479d5de304abf7de1399c9ade9b [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.web;
/// The debug service which allows to enable the DevTools service on Contexts.
protocol Debug {
/// 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.
EnableDevTools(resource struct {
listener client_end:DevToolsListener;
}) -> ();
/// Interface used to observe DevTools service availability events.
protocol DevToolsListener {
/// 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.
OnContextDevToolsAvailable(resource struct {
listener server_end:DevToolsPerContextListener;
/// Interface supplied by the debugging component to observe the DevTools service opening event.
protocol DevToolsPerContextListener {
/// 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.
OnHttpPortOpen(struct {
port uint16;