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 gfx::Rect rect; | |
26 base::string16 text; | |
27 float text_size; | |
28 int32_t color; | |
29 int32_t bgcolor; | |
30 bool bold; | |
31 bool italic; | |
32 bool underline; | |
33 bool line_through; | |
34 | |
35 bool has_selection; | |
36 int32_t start_selection; | |
37 int32_t end_selection; | |
38 | |
39 std::string class_name; | |
40 std::vector<std::unique_ptr<AXViewStructure>> children; | |
41 | |
42 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.
| |
43 ~AXViewStructure(); | |
44 | |
45 private: | |
46 DISALLOW_COPY_AND_ASSIGN(AXViewStructure); | |
47 }; | |
48 | |
49 void GetAXViewStructure( | |
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 |