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..92258ca96521ea4d21c7c20e53d2a7d461f2ef67 |
--- /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 { |
+ 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; |
+ |
+ AXViewStructure(); |
hidehiko
2017/04/04 17:42:58
Style: Please put ctor/dtor before data members.
c
Muyuan
2017/04/04 18:35:34
Done.
|
+ ~AXViewStructure(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(AXViewStructure); |
+}; |
+ |
+void GetAXViewStructure( |
+ WebContents* web_contents, |
+ const base::Callback<void(std::unique_ptr<AXViewStructure>)>& callback); |
+ |
+} // namespace android |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_VOICE_INTERACTION_HELPER_H_ |