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

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

Issue 2768093005: Send voice interaction structure from cros to Arc. (Closed)
Patch Set: address trybot error Created 3 years, 8 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 import "mojo/common/string16.mojom";
10 import "screen_rect.mojom";
11
12 // Represents the start and end indices of the selected portion
13 // of the text. The indices are inclusive.
xiyuan 2017/04/03 19:01:08 Are you sure you want inclusive for both ends? It
Muyuan 2017/04/03 20:25:35 It should be [start, end). Thx.
14 struct TextSelection {
15 int32 start_selection;
xiyuan 2017/04/03 19:01:07 nit: start_selection -> selection_start and simila
Muyuan 2017/04/03 20:25:35 Just try to be consistent with https://cs.chromium
xiyuan 2017/04/03 21:32:11 Can you document this in the comment either here f
Muyuan 2017/04/03 23:00:33 Done.
16 int32 end_selection;
17 };
18
19 // Represents view structure to be passed to ARC. The view
20 // structure is synthesized from the AXStructure, which
21 // is a simplified representation of the DOM tree. We
22 // map each node of the AXStructure into a view element.
23 struct VoiceInteractionStructure {
24 // Geometry of the view in pixels
25 ScreenRect rect;
26
27 // Text of the view.
28 mojo.common.mojom.String16 text;
29
30 // Text properties
31 float text_size;
32 int32 color;
33 int32 bgcolor;
34 bool bold;
35 bool italic;
36 bool underline;
37 bool line_through;
38
39 // Selected portion of the text.
40 TextSelection? selection;
41
42 // Fake Android view class name of the element. Each node is assigned
43 // a closest approximation of Android's views.
44 string class_name;
45
46 // Children of current node
47 array<VoiceInteractionStructure> children;
48 };
49
50 // Handles voice interaction queries from Android.
51 // Next method ID: 1
52 interface VoiceInteractionArcHomeHost {
53 // Returns view hierarchy of current window represented as
54 // VoiceInteractionStructure. Returns empty if the request
55 // fails.
56 GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure);
57 };
58
59 // Connects with ArcHome.
60 // Next method ID: 1
61 interface VoiceInteractionArcHomeInstance {
62 Init@0(VoiceInteractionArcHomeHost host_ptr);
63 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698