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; | |
hidehiko
2017/03/10 06:14:50
Is there a case that only some part of children ha
Muyuan
2017/03/10 22:36:10
Sure. How about using Optional<T> for this?
Luis Héctor Chávez
2017/03/13 17:39:34
Optional<T> makes more sense.
| |
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 | |
hidehiko
2017/03/10 06:14:50
Could you comment the reason why uint8 is used to
Muyuan
2017/03/10 22:36:10
In Chromium, strings seem to be always little endi
| |
24 array<uint8> text; | |
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 position of the selection, inclusive. | |
hidehiko
2017/03/10 06:14:50
Because of inconsistency of encoding "utf-16" and
Muyuan
2017/03/10 22:36:10
Done.
| |
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 CaptureFocusedWindow@0() => (array<uint8> png_data); | |
hidehiko
2017/03/10 06:14:50
because mojo is an interface between Chrome and AR
Muyuan
2017/03/10 22:36:10
Done.
| |
53 GetVoiceInteractionStructure@1() => (VoiceInteractionStructure structure); | |
54 }; | |
55 | |
56 // Connects with Android system server. | |
57 // Next method ID:2 | |
58 interface VoiceInteractionCaptureInstance { | |
59 Init@0(VoiceInteractionHost host_ptr); | |
60 StartVoiceInteractionSession@1(); | |
61 }; | |
62 | |
63 // Connects with ArcHome. | |
64 // Next method ID: 1 | |
65 interface VoiceInteractionArcHomeInstance { | |
66 Init@0(VoiceInteractionHost host_ptr); | |
67 }; | |
68 | |
69 | |
OLD | NEW |