diff options
Diffstat (limited to 'chromium/ash/public/mojom/assistant_state_controller.mojom')
-rw-r--r-- | chromium/ash/public/mojom/assistant_state_controller.mojom | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/chromium/ash/public/mojom/assistant_state_controller.mojom b/chromium/ash/public/mojom/assistant_state_controller.mojom index 42b924f074b..34538e4ca32 100644 --- a/chromium/ash/public/mojom/assistant_state_controller.mojom +++ b/chromium/ash/public/mojom/assistant_state_controller.mojom @@ -4,12 +4,48 @@ module ash.mojom; -import "ash/public/mojom/voice_interaction_controller.mojom"; +// The initial state is NOT_READY, after Assistant service started it becomes +// READY. When Assistant UI shows up the state becomes VISIBLE. +enum AssistantState { + // The Assistant service is not ready yet. + NOT_READY = 0, + // The Assistant service is ready. + READY, + // The Assistant service is ready. + // TODO(b/142428671): This is set when the Assistant backend signals it is + // ready to handle queries, where |READY| is signaled when it is started. + // If this signal turns out to be reliable it should replace |READY| and be + // renamed to |READY|. + NEW_READY, +}; + +enum AssistantAllowedState { + // Assistant feature is allowed. + ALLOWED = 0, + // Disallowed because search and assistant is disabled by policy. + DISALLOWED_BY_POLICY, + // Disallowed because user's locale is not compatible. + DISALLOWED_BY_LOCALE, + // 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, + // Disallowed because the device is in demo mode. + DISALLOWED_BY_DEMO_MODE, + // Disallowed because the device is in public session. + DISALLOWED_BY_PUBLIC_SESSION, + // Disallowed because the user's account type is currently not supported. + DISALLOWED_BY_ACCOUNT_TYPE, + // Disallowed because the device is in Kiosk mode. + DISALLOWED_BY_KIOSK_MODE +}; // Allows observing changes to Assistant status and settings. interface AssistantStateObserver { // Called when Assistant state changes. - OnAssistantStatusChanged(VoiceInteractionState state); + OnAssistantStatusChanged(AssistantState state); // Called when assistant feature allowed state has changed. OnAssistantFeatureAllowedChanged(AssistantAllowedState state); @@ -30,5 +66,5 @@ interface AssistantStateObserver { // which notifies changes of Assistant status and settings. interface AssistantStateController { // Add an observer. - AddMojomObserver(AssistantStateObserver observer); + AddMojomObserver(pending_remote<AssistantStateObserver> observer); }; |