// 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_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. // TODO(jamescook): Support multiple remote processes. SetRemoteHost(AXRemoteHost remote); // Handles an accessibility |event| (e.g. focus change) for |tree_id| in the // remote process. Includes |updates| to child nodes. HandleAccessibilityEvent( int32 tree_id, array 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); };