Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Next MinVersion: 7 | 5 // Next MinVersion: 8 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 import "screen_rect.mojom"; | 9 import "screen_rect.mojom"; |
| 10 | 10 |
| 11 // Handles voice interaction queries from Android. | 11 // Handles voice interaction queries from Android. |
| 12 // Next method ID: 5 | 12 // Next method ID: 5 |
| 13 interface VoiceInteractionFrameworkHost { | 13 interface VoiceInteractionFrameworkHost { |
| 14 // Returns a screenshot of currently focused window or empty array if | 14 // Returns a screenshot of currently focused window or empty array if |
| 15 // no window is focused. |data| represents the image encoded in JPEG | 15 // no window is focused. |data| represents the image encoded in JPEG |
| 16 // format. | 16 // format. |
| 17 CaptureFocusedWindow@0() => (array<uint8> data); | 17 CaptureFocusedWindow@0() => (array<uint8> data); |
| 18 | 18 |
| 19 // Returns a fullscreen screenshot of the primary display. | 19 // Returns a fullscreen screenshot of the primary display. |
| 20 // |data| represents the image encoded in JPEG format. | 20 // |data| represents the image encoded in JPEG format. |
| 21 [MinVersion=1]CaptureFullscreen@1() => (array<uint8> data); | 21 [MinVersion=1]CaptureFullscreen@1() => (array<uint8> data); |
| 22 | 22 |
| 23 // Notifies the host that the metalayer has closed or could not open. | 23 // Notifies the host that the metalayer has closed or could not open. |
| 24 [MinVersion=2]OnMetalayerClosed@2(); | 24 [MinVersion=2]OnMetalayerClosed@2(); |
| 25 | 25 |
| 26 // Enables/disables screenshot taking. | 26 // Enables/disables screenshot taking. |
| 27 [MinVersion=3]SetMetalayerEnabled@3(bool enabled); | 27 [MinVersion=3]SetMetalayerEnabled@3(bool enabled); |
| 28 | 28 |
| 29 // Notifies Chrome whether voice interaction session is running. | 29 // Notifies Chrome whether voice interaction session is running. |
| 30 [MinVersion=6]SetVoiceInteractionRunning@4(bool running); | 30 [MinVersion=6]SetVoiceInteractionRunning@4(bool running); |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Indicate voice interaction configuration status. | |
|
Luis Héctor Chávez
2017/07/10 16:53:03
nit: s/Indicate/Indicates/
Muyuan
2017/07/14 20:52:14
Done.
| |
| 34 struct VoiceInteractionStatus { | |
| 35 // Whether voice interaction is configured during OOBE flow. false if | |
|
stevenjb
2017/07/10 17:57:07
s/false/False (or |false|)
Muyuan
2017/07/14 20:52:14
Done.
| |
| 36 // OOBE flow has been skipped. | |
| 37 bool defined; | |
|
stevenjb
2017/07/10 17:57:07
'configured' ?
Muyuan
2017/07/14 20:52:14
Done.
| |
| 38 // Whether voice interaction service is enabled. | |
| 39 bool voice_interaction_enabled; | |
| 40 // Whether allow voice interaction service to request screenshot | |
| 41 // and screen context. | |
| 42 bool context_enabled; | |
| 43 }; | |
| 44 | |
| 33 // Connects with Android system server. | 45 // Connects with Android system server. |
| 34 // Next method ID: 7 | 46 // Next method ID: 8 |
| 35 interface VoiceInteractionFrameworkInstance { | 47 interface VoiceInteractionFrameworkInstance { |
| 36 Init@0(VoiceInteractionFrameworkHost host_ptr); | 48 Init@0(VoiceInteractionFrameworkHost host_ptr); |
| 37 | 49 |
| 38 // Starts the voice interaction session in container. | 50 // Starts the voice interaction session in container. |
| 39 StartVoiceInteractionSession@1(); | 51 StartVoiceInteractionSession@1(); |
| 40 | 52 |
| 41 // Starts the voice interaction session in container, with a screen region | 53 // Starts the voice interaction session in container, with a screen region |
| 42 // selected. | 54 // selected. |
| 43 [MinVersion=1] StartVoiceInteractionSessionForRegion@2(ScreenRect region); | 55 [MinVersion=1] StartVoiceInteractionSessionForRegion@2(ScreenRect region); |
| 44 | 56 |
| 45 // Shows/hides the metalayer in the container. | 57 // Shows/hides the metalayer in the container. |
| 46 [MinVersion=1] SetMetalayerVisibility@3([MinVersion=2] bool visible); | 58 [MinVersion=1] SetMetalayerVisibility@3([MinVersion=2] bool visible); |
| 47 | 59 |
| 48 // Turns on / off voice interaction in container. | 60 // Turns on / off voice interaction in container. |
| 49 [MinVersion=4] SetVoiceInteractionEnabled@4(bool enable); | 61 [MinVersion=4] SetVoiceInteractionEnabled@4(bool enable); |
| 50 | 62 |
| 51 // Turns on / off context for voice interaction in container. This function | 63 // Turns on / off context for voice interaction in container. This function |
| 52 // controls whether screenshot and view hierarchy information should be sent | 64 // controls whether screenshot and view hierarchy information should be sent |
| 53 // to container. | 65 // to container. |
| 54 [MinVersion=4] SetVoiceInteractionContextEnabled@5(bool enable); | 66 [MinVersion=4] SetVoiceInteractionContextEnabled@5(bool enable); |
| 55 | 67 |
| 56 // Starts the voice interaction setup wizard in container. | 68 // Starts the voice interaction setup wizard in container. |
| 57 [MinVersion=5] StartVoiceInteractionSetupWizard@6(); | 69 [MinVersion=5] StartVoiceInteractionSetupWizard@6(); |
| 58 }; | 70 |
| 71 // Queries voice interaction settings status. | |
| 72 [MinVersion=7] GetVoiceInteractionSettings@7() => | |
| 73 (VoiceInteractionStatus status); | |
| 74 }; | |
| OLD | NEW |