OLD | NEW |
---|---|
(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; | |
Luis Héctor Chávez
2017/03/13 17:39:34
remove per the Optional<T> discussion.
Muyuan
2017/03/14 01:38:14
OK.. after a second look, it seems that the mojo g
Luis Héctor Chávez
2017/03/14 02:11:33
it does: it generates a null Object. unfortunately
Muyuan
2017/03/14 21:37:00
Done.
| |
16 | |
17 // Geometry of the view in pixels | |
18 int32 x; | |
Luis Héctor Chávez
2017/03/13 17:39:35
Can this be a https://cs.chromium.org/chromium/src
Muyuan
2017/03/14 01:38:14
does geometry exists in Java side?
Luis Héctor Chávez
2017/03/14 02:11:33
on further inspection, you should be able to use t
Muyuan
2017/03/14 21:37:00
Done.
| |
19 int32 y; | |
20 int32 width; | |
21 int32 height; | |
22 | |
23 // Text of the view in utf-16 encoding | |
24 array<uint8> text; | |
Luis Héctor Chávez
2017/03/13 17:39:34
Can this be https://cs.chromium.org/chromium/src/m
Muyuan
2017/03/14 01:38:14
same question as above..
Luis Héctor Chávez
2017/03/14 02:11:33
you might need to do a similar trick as with Scree
| |
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; | |
Luis Héctor Chávez
2017/03/13 17:39:35
Can you extract the start_selection and end_select
Muyuan
2017/03/14 01:38:14
So looks like optional is not implemented in the J
| |
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); | |
Luis Héctor Chávez
2017/03/13 17:39:34
What is the relationship between CaptureFocusedWin
Muyuan
2017/03/14 01:38:14
These are relatively independent by now.. One is c
Luis Héctor Chávez
2017/03/14 02:11:33
the problem is that substantially changing interfa
| |
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 }; | |
75 | |
Luis Héctor Chávez
2017/03/13 17:41:02
remove trailing empty lines.
Muyuan
2017/03/14 01:38:14
Done.
| |
76 | |
OLD | NEW |