naiveproxy/ash/public/interfaces/voice_interaction_controller.mojom

67 lines
2.5 KiB
Plaintext
Raw Normal View History

2018-01-28 21:32:06 +03:00
// 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;
// There is another copy of the VoiceInteractionState definition in
// //components/arc/common/voice_interaction_framework.mojom
// Please also update the other one if you change it.
// The duplicate definition is because we do not use extensible widely
// (crbug.com/731893).
// The initial state is NOT_READY, then it will either becomes STOPPED or
// RUNNING. If the mojo connection is lost, the state will be set back to
// NOT_READY.
enum VoiceInteractionState {
// Voice interaction service is not ready yet, request sent will be waiting.
NOT_READY = 0,
// Voice interaction session is stopped.
STOPPED,
// Voice interaction session is currently running.
RUNNING
};
enum AssistantAllowedState {
// Assistant feature is allowed.
ALLOWED = 0,
// Disallowed because ARC++ is disallowed. There could be many specific
// reasones why ARC++ is disallowed. This enum is a catch all. Some enums
// below will show specific reasons.
DISALLOWED_BY_ARC_DISALLOWED,
// Disallowed because ARC++ is disabled by policy.
DISALLOWED_BY_ARC_POLICY,
// Disallowed because user's locale is not compatible.
DISALLOWED_BY_LOCALE,
// Disallowed because the feature flag is off.
DISALLOWED_BY_FLAG,
// Disallowed because current user is not primary user.
DISALLOWED_BY_NONPRIMARY_USER,
// Disallowed because current user is supervised user.
DISALLOWED_BY_SUPERVISED_USER,
// Disallowed because incognito mode.
DISALLOWED_BY_INCOGNITO
};
// Interface for ash client (Chrome) to connect to the voice interaction
// controller, which notifies changes of voice interaction related flags.
interface VoiceInteractionController {
// Called when the voice interaction state is changed.
NotifyStatusChanged(VoiceInteractionState state);
// Called when the voice interaction settings is enabled/disabled.
NotifySettingsEnabled(bool enabled);
// Called when the voice interaction context is enabled/disabled.
// If context is enabled the screenshot will be passed in voice
// interaction session.
NotifyContextEnabled(bool enabled);
// Called when the voice interaction setup complete status is changed.
NotifySetupCompleted(bool completed);
// Notify if voice interaction feature is allowed or not. e.g. not allowed
// if disabled by policy.
NotifyFeatureAllowed(AssistantAllowedState state);
};