OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_VOICE_INTERACTION_HELPER_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_VOICE_INTERACTION_HELPER_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <memory> | |
11 #include <vector> | |
12 | |
13 #include "base/callback.h" | |
14 #include "base/strings/string16.h" | |
15 #include "ui/gfx/geometry/rect.h" | |
16 | |
17 namespace content { | |
18 | |
19 class WebContents; | |
20 | |
21 // An intermediate representation of the Accessibility snapshot | |
22 // for voice interaction. The field names are kept consistent | |
23 // with AccessibilitySnapshotNode.java. | |
24 struct AXViewStructure { | |
25 AXViewStructure(); | |
26 ~AXViewStructure(); | |
27 | |
28 gfx::Rect rect; | |
29 base::string16 text; | |
30 float text_size; | |
31 int32_t color; | |
32 int32_t bgcolor; | |
33 bool bold; | |
34 bool italic; | |
35 bool underline; | |
36 bool line_through; | |
37 | |
38 bool has_selection; | |
39 int32_t start_selection; | |
40 int32_t end_selection; | |
41 | |
42 std::string class_name; | |
43 std::vector<std::unique_ptr<AXViewStructure>> children; | |
44 | |
45 private: | |
46 DISALLOW_COPY_AND_ASSIGN(AXViewStructure); | |
47 }; | |
48 | |
49 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
| |
50 WebContents* web_contents, | |
51 const base::Callback<void(std::unique_ptr<AXViewStructure>)>& callback); | |
52 | |
53 } // namespace android | |
54 | |
55 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_VOICE_INTERACTION_HELPER_H_ | |
OLD | NEW |