blob: cee9371e4a37470d4265f02ce41aa94984f8f7cb [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
/// 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(DevToolsListener listener) -> ();
/// 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 detroyed.
OnContextDevToolsAvailable(request<DevToolsPerContextListener> listener);
/// 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(uint16 port);