blob: 10c300b874707325d55bd7d03a9be1f00fffa352 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ax.mojom;
import "ui/accessibility/ax_enums.mojom";
import "ui/accessibility/mojom/ax_action_data.mojom";
import "ui/accessibility/mojom/ax_event.mojom";
import "ui/accessibility/mojom/ax_tree_id.mojom";
import "ui/accessibility/mojom/ax_tree_update.mojom";
const string kAXHostServiceName = "ax_host_service";
// Accessibility host service for remote processes that use views UI. Not used
// for web content, PDF, or ARC++.
// * Receives accessibility node trees and events (e.g. focus changes) from the
// remote process. Forwards the events to accessibility extensions in the
// browser.
// * Sends requests for actions (e.g. click a button) to the remote process.
interface AXHost {
// Registers a host in a remote process. |tree_id| is the ID to use as the
// root of the AX node tree. If |automation_enabled| is true then the remote
// process must send its initial AX node tree immediately (because a feature
// like ChromeVox is enabled).
RegisterRemoteHost(AXRemoteHost remote) =>
(ax.mojom.AXTreeID tree_id, bool automation_enabled);
// Handles an accessibility |event| (e.g. focus change) for |tree_id| in the
// remote process. Includes |updates| to child nodes.
HandleAccessibilityEvent(
ax.mojom.AXTreeID tree_id, array<AXTreeUpdate> updates, AXEvent event);
};
// Remote hosts run outside the browser process, for example in a mojo app like
// shortcut_viewer.
interface AXRemoteHost {
// Remotes must send the initial accessibility tree when automation is
// enabled.
OnAutomationEnabled(bool enabled);
// Performs an accessibility action inside the remote app.
PerformAction(AXActionData data);
};