Chromium Code Reviews| Index: components/arc/common/voice_interaction_arc_home.mojom |
| diff --git a/components/arc/common/voice_interaction_arc_home.mojom b/components/arc/common/voice_interaction_arc_home.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b1b37c97a2d76dd0785916e08f5cd19a64c3a0a7 |
| --- /dev/null |
| +++ b/components/arc/common/voice_interaction_arc_home.mojom |
| @@ -0,0 +1,63 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// |
| +// Next MinVersion: 1 |
| + |
| +module arc.mojom; |
| + |
| +import "mojo/common/string16.mojom"; |
| +import "screen_rect.mojom"; |
| + |
| +// Represents the start and end indices of the selected portion |
| +// of the text. The indices are inclusive. |
| +struct TextSelection { |
| + int32 start_selection; |
| + int32 end_selection; |
| +}; |
| + |
| +// Represents view structure to be passed to ARC. The view |
| +// structure is synthesized from the AXStructure, which |
| +// is a simplified representation of the DOM tree. We |
| +// map each node of the AXStructure into a view element. |
| +struct VoiceInteractionStructure { |
| + // Geometry of the view in pixels |
| + ScreenRect rect; |
| + |
| + // Text of the view. |
| + mojo.common.mojom.String16 text; |
| + |
| + // Text properties |
| + float text_size; |
| + int32 color; |
| + int32 bgcolor; |
| + bool bold; |
| + bool italic; |
| + bool underline; |
| + bool line_through; |
| + |
| + // Selected portion of the text. |
| + TextSelection? selection; |
| + |
| + // Fake Android view class name of the element. Each node is assigned |
| + // a closest approximation of Android's views. |
| + string class_name; |
| + |
| + // Children of current node |
| + array<VoiceInteractionStructure> children; |
| +}; |
| + |
| +// Handles voice interaction queries from Android. |
| +// Next method ID: 1 |
| +interface VoiceInteractionArcHomeHost { |
|
Luis Héctor Chávez
2017/03/16 16:30:20
Maybe remove this file until we actually need it.
Muyuan
2017/03/16 20:41:34
Acknowledged.
|
| + // Returns view hierarchy of current window represented as |
| + // VoiceInteractionStructure. Returns empty if the request |
| + // fails. |
| + GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure); |
| +}; |
| + |
| +// Connects with ArcHome. |
| +// Next method ID: 1 |
| +interface VoiceInteractionArcHomeInstance { |
| + Init@0(VoiceInteractionArcHomeHost host_ptr); |
| +}; |