Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: components/arc/common/voice_interaction.mojom

Issue 2731403007: add voice interaction shortcut. (Closed)
Patch Set: add voice interaction shortcut. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // Next MinVersion: 1
6
7 module arc.mojom;
8
9 // Represents view structure to be passed to ARC. The view
10 // structure is synthesized from the AXStructure, which
11 // is a simplified representation of the DOM tree. We
12 // map each node of the AXStructure into a view element.
13 struct VoiceInteractionStructure {
14 // Whether this is a valid response
15 bool success;
16
17 // Geometry of the view in pixels
18 int32 x;
19 int32 y;
20 int32 width;
21 int32 height;
22
23 // Text of the view in utf-16 encoding
24 array<uint8> text;
xiyuan 2017/03/14 17:55:31 Do we have to pass utf16 like this? It is not a go
Muyuan 2017/03/14 21:37:01 String16 does not seem to be implemented in Java s
xiyuan 2017/03/15 15:58:15 Acknowledged.
25
26 // Text properties
27 float text_size;
28 int32 color;
29 int32 bgcolor;
30 bool bold;
31 bool italic;
32 bool underline;
33 bool line_through;
34
35 // Is the text selected
36 bool has_selection;
37 // Start and end unicode character position of the selection, inclusive.
38 int32 start_selection;
39 int32 end_selection;
40
41 // Fake Android view class name of the element. Each node is assigned
42 // a closest approximation of Android's views.
43 string class_name;
44
45 // Children of current node
46 array<VoiceInteractionStructure> children;
47 };
48
49 // Handles voice interaction queries from Android.
50 // Next method ID: 2
51 interface VoiceInteractionHost {
52 // Returns a screenshot of current focused window or empty bytes if
53 // no window is focused.
54 CaptureFocusedWindow@0() => (array<uint8> png_data);
55
56 // Returns view hierarchy of current window represented as
57 // VoiceInteractionStructure.
58 GetVoiceInteractionStructure@1() => (VoiceInteractionStructure structure);
59 };
60
61 // Connects with Android system server.
62 // Next method ID:2
63 interface VoiceInteractionCaptureInstance {
64 Init@0(VoiceInteractionHost host_ptr);
65
66 // Starts the voice interaction session in container.
67 StartVoiceInteractionSession@1();
68 };
69
70 // Connects with ArcHome.
71 // Next method ID: 1
72 interface VoiceInteractionArcHomeInstance {
73 Init@0(VoiceInteractionHost host_ptr);
74 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698