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

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 review comments 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 [start, end).
Luis Héctor Chávez 2017/04/03 23:24:12 Do these represent bytes? UTF-16 code units? Unico
Muyuan 2017/04/04 00:39:39 Done.
14 struct TextSelection {
15 int32 start_selection;
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 // The naming convention of the fields kept consistent with
24 // AccessibilitySnapshotNode.java used in Android Chromium.
25 struct VoiceInteractionStructure {
26 // Geometry of the view in pixels
27 ScreenRect rect;
28
29 // Text of the view.
30 mojo.common.mojom.String16 text;
31
32 // Text properties
33 float text_size;
34 int32 color;
35 int32 bgcolor;
36 bool bold;
37 bool italic;
38 bool underline;
39 bool line_through;
40
41 // Selected portion of the text.
42 TextSelection? selection;
43
44 // Fake Android view class name of the element. Each node is assigned
45 // a closest approximation of Android's views.
46 string class_name;
47
48 // Children of current node
49 array<VoiceInteractionStructure> children;
50 };
51
52 // Handles voice interaction queries from Android.
53 // Next method ID: 1
54 interface VoiceInteractionArcHomeHost {
55 // Returns view hierarchy of current window represented as
56 // VoiceInteractionStructure. Returns empty if the request
57 // fails.
58 GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure);
59 };
60
61 // Connects with ArcHome.
62 // Next method ID: 1
63 interface VoiceInteractionArcHomeInstance {
64 Init@0(VoiceInteractionArcHomeHost host_ptr);
65 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698