Index: content/public/browser/voice_interaction_helper.h |
diff --git a/content/public/browser/voice_interaction_helper.h b/content/public/browser/voice_interaction_helper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..827116609c277273e0df3ba755cfefa2460f0608 |
--- /dev/null |
+++ b/content/public/browser/voice_interaction_helper.h |
@@ -0,0 +1,55 @@ |
+// 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. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_VOICE_INTERACTION_HELPER_H_ |
+#define CONTENT_PUBLIC_BROWSER_VOICE_INTERACTION_HELPER_H_ |
+ |
+#include <stdint.h> |
+ |
+#include <memory> |
+#include <vector> |
+ |
+#include "base/callback.h" |
+#include "base/strings/string16.h" |
+#include "ui/gfx/geometry/rect.h" |
+ |
+namespace content { |
+ |
+class WebContents; |
+ |
+// An intermediate representation of the Accessibility snapshot |
+// for voice interaction. The field names are kept consistent |
+// with AccessibilitySnapshotNode.java. |
+struct AXViewStructure { |
+ AXViewStructure(); |
+ ~AXViewStructure(); |
+ |
+ gfx::Rect rect; |
+ base::string16 text; |
+ float text_size; |
+ int32_t color; |
+ int32_t bgcolor; |
+ bool bold; |
+ bool italic; |
+ bool underline; |
+ bool line_through; |
+ |
+ bool has_selection; |
+ int32_t start_selection; |
+ int32_t end_selection; |
+ |
+ std::string class_name; |
+ std::vector<std::unique_ptr<AXViewStructure>> children; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(AXViewStructure); |
+}; |
+ |
+void GetAXViewStructure( |
Avi (use Gerrit)
2017/04/04 20:11:01
I don't understand this file.
It's named "voice i
Muyuan
2017/04/04 20:43:49
The idea is to share the code between Android Chro
|
+ WebContents* web_contents, |
+ const base::Callback<void(std::unique_ptr<AXViewStructure>)>& callback); |
+ |
+} // namespace android |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_VOICE_INTERACTION_HELPER_H_ |