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

Unified Diff: components/arc/common/voice_interaction.mojom

Issue 2731403007: add voice interaction shortcut. (Closed)
Patch Set: Changed mojom comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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..efd3e944afb18aba202a2d0fe2736bd42b5959ce
--- /dev/null
+++ b/components/arc/common/voice_interaction.mojom
@@ -0,0 +1,69 @@
+// 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. 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 {
+ // Whether this is a valid response
+ 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.
+
+ // Geometry of the view in pixels
+ int32 x;
+ int32 y;
+ int32 width;
+ int32 height;
+
+ // 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
+ array<uint8> text;
+
+ // Text properties
+ float text_size;
+ int32 color;
+ int32 bgcolor;
+ bool bold;
+ bool italic;
+ bool underline;
+ bool line_through;
+
+ // Is the text selected
+ bool has_selection;
+ // 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.
+ int32 start_selection;
+ int32 end_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: 2
+interface VoiceInteractionHost {
+ 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.
+ 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);
+};
+
+
« components/arc/common/arc_bridge.mojom ('K') | « components/arc/common/arc_bridge.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698