Chromium Code Reviews| Index: components/arc/common/voice_interaction.mojom |
| diff --git a/components/arc/common/voice_interaction.mojom b/components/arc/common/voice_interaction.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d6656ebabd8a932ed2883acb036680f81888e24 |
| --- /dev/null |
| +++ b/components/arc/common/voice_interaction.mojom |
| @@ -0,0 +1,61 @@ |
| +// 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; |
| + |
| +// Represents view structure to be passed to ARC. |
| +struct VoiceInteractionStructure { |
|
xc
2017/03/09 05:05:47
still needs some more documentation on the fields.
Muyuan
2017/03/09 20:44:44
Done.
|
| + // whether this is a valid response |
| + bool success; |
| + |
| + // geometry of the view element |
|
xc
2017/03/09 05:05:47
what is a view element?
Muyuan
2017/03/09 20:44:44
Done.
|
| + int32 x; |
| + int32 y; |
| + int32 width; |
|
xc
2017/03/09 05:05:47
dp or pixel?
Muyuan
2017/03/09 20:44:45
Done.
|
| + int32 height; |
| + |
| + // text properties |
|
xc
2017/03/09 05:05:47
what is text properties?
Muyuan
2017/03/09 20:44:45
Done.
|
| + float text_size; |
| + array<uint8> text; |
|
xc
2017/03/09 05:05:47
what's the encoding of text?
Muyuan
2017/03/09 20:44:44
Done.
|
| + int32 color; |
|
xc
2017/03/09 05:05:47
what's the format of color, rgba or argb what not?
Muyuan
2017/03/09 20:44:44
Done.
|
| + int32 bgcolor; |
| + bool bold; |
| + bool italic; |
| + bool underline; |
| + bool line_through; |
| + |
| + // properties of the text selection |
| + bool has_selection; |
| + int32 start_selection; |
| + int32 end_selection; |
|
xc
2017/03/09 05:05:47
is start/end inclusive or not?
Muyuan
2017/03/09 20:44:45
Done.
|
| + |
| + // fake Android view class name of the element |
|
xc
2017/03/09 05:05:47
what do we need this?
Muyuan
2017/03/09 20:44:45
Done.
|
| + string class_name; |
| + |
| + array<VoiceInteractionStructure> children; |
|
xc
2017/03/09 05:05:47
what is children?
Muyuan
2017/03/09 20:44:44
Done.
|
| +}; |
| + |
| +// Handles voice interaction queries from Android. |
| +// Next method ID: 2 |
| +interface VoiceInteractionHost { |
| + CaptureFocusedWindow@0() => (array<uint8> png_data); |
| + GetVoiceInteractionStructure@1() => (VoiceInteractionStructure structure); |
| +}; |
| + |
| +// Connects with Android system server. |
| +// Next method ID:2 |
| +interface VoiceInteractionCaptureInstance { |
| + Init@0(VoiceInteractionHost host_ptr); |
| + StartVoiceInteractionSession@1(); |
| +}; |
| + |
| +// Connects with ArcHome. |
| +// Next method ID: 1 |
| +interface VoiceInteractionArcHomeInstance { |
| + Init@0(VoiceInteractionHost host_ptr); |
| +}; |
| + |
| + |