| // 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. |
| // |
| // Next MinVersion: 9 |
| |
| module arc.mojom; |
| |
| import "screen_rect.mojom"; |
| |
| [Extensible] |
| enum VoiceInteractionState { |
| NOT_READY = 0, |
| STOPPED, |
| RUNNING |
| }; |
| |
| // Handles voice interaction queries from Android. |
| // Next method ID: 6 |
| interface VoiceInteractionFrameworkHost { |
| // Returns a screenshot of currently focused window or empty array if |
| // no window is focused. |data| represents the image encoded in JPEG |
| // format. |
| CaptureFocusedWindow@0() => (array<uint8> data); |
| |
| // Returns a fullscreen screenshot of the primary display. |
| // |data| represents the image encoded in JPEG format. |
| [MinVersion=1]CaptureFullscreen@1() => (array<uint8> data); |
| |
| // Notifies the host that the metalayer has closed or could not open. |
| [MinVersion=2]OnMetalayerClosed@2(); |
| |
| // Enables/disables screenshot taking. |
| [MinVersion=3]SetMetalayerEnabled@3(bool enabled); |
| |
| // Notifies Chrome whether voice interaction session is running. |
| [MinVersion=6]SetVoiceInteractionRunning@4(bool running); |
| |
| // Notifies Chrome the state of voice interaction session. |
| [MinVersion=8]SetVoiceInteractionState@5(VoiceInteractionState state); |
| }; |
| |
| // Indicates voice interaction configuration status. |
| struct VoiceInteractionStatus { |
| // Whether voice interaction is configured during OOBE flow. |false| if |
| // OOBE flow has been skipped. |
| bool configured; |
| // Whether voice interaction service is enabled. |
| bool voice_interaction_enabled; |
| // Whether allow voice interaction service to request screenshot |
| // and screen context. |
| bool context_enabled; |
| }; |
| |
| // Connects with Android system server. |
| // Next method ID: 8 |
| interface VoiceInteractionFrameworkInstance { |
| Init@0(VoiceInteractionFrameworkHost host_ptr); |
| |
| // Starts the voice interaction session in container. |
| StartVoiceInteractionSession@1(); |
| |
| // Starts the voice interaction session in container, with a screen region |
| // selected. |
| [MinVersion=1] StartVoiceInteractionSessionForRegion@2(ScreenRect region); |
| |
| // Shows/hides the metalayer in the container. |
| [MinVersion=1] SetMetalayerVisibility@3([MinVersion=2] bool visible); |
| |
| // Turns on / off voice interaction in container. |
| [MinVersion=4] SetVoiceInteractionEnabled@4(bool enable); |
| |
| // Turns on / off context for voice interaction in container. This function |
| // controls whether screenshot and view hierarchy information should be sent |
| // to container. |
| [MinVersion=4] SetVoiceInteractionContextEnabled@5(bool enable); |
| |
| // Starts the voice interaction setup wizard in container. |
| [MinVersion=5] StartVoiceInteractionSetupWizard@6(); |
| |
| // Queries voice interaction settings status. |
| [MinVersion=7] GetVoiceInteractionSettings@7() => |
| (VoiceInteractionStatus status); |
| }; |