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

Unified Diff: content/public/browser/voice_interaction_helper.h

Issue 2768093005: Send voice interaction structure from cros to Arc. (Closed)
Patch Set: address review comments Created 3 years, 8 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
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/voice_interaction_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/voice_interaction_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698