blob: 540073330d83b1d8628bfa584d9e318d74bced32 [file] [log] [blame]
// Copyright 2017 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 ash.mojom;
import "mojo/common/time.mojom";
// Alert sent to the accessibility api.
enum AccessibilityAlert {
// Default value, indicates no accessibility alert.
// When caps lock is turned on.
// When caps lock is turned off.
// When screen is turned on by tablet power button.
// When screen is turned off by tablet power button.
// When window moved to above/below/left/right display by accelerators.
// When the user attempts a keyboard command that requires a window to work,
// and none is available.
// When the user enters window overview mode.
// Interface for ash client (e.g. Chrome) to control and query accessibility
// features.
interface AccessibilityController {
// Sets the client interface.
SetClient(AccessibilityControllerClient client);
// Starts or stops darkening the screen (e.g. to allow chrome a11y extensions
// to darken the screen).
SetDarkenScreen(bool darken);
// Interface for ash to request accessibility service from its client (e.g.
// Chrome).
interface AccessibilityControllerClient {
// Triggers an accessibility alert to give the user feedback.
TriggerAccessibilityAlert(AccessibilityAlert alert);
// Plays an earcon. Earcons are brief and distinctive sounds that indicate
// that their mapped event has occurred. The |sound_key| enums can be found in
// chromeos/audio/chromeos_sounds.h. This method exists because the browser
// owns all media playback.
PlayEarcon(int32 sound_key);
// Initiates play of shutdown sound and returns sound duration. This method
// exists because the browser owns all media playback.
PlayShutdownSound() => (mojo.common.mojom.TimeDelta sound_duration);
// Forwards an accessibility gesture from the touch exploration controller to
// ChromeVox.
// TODO(warx): replace string with enum once ax_enums.idl is converted to
// mojom file.
HandleAccessibilityGesture(string gesture);
// Start or stop dictation (type what you speak).