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

Side by Side Diff: ui/accessibility/platform/ax_android_snapshot.h

Issue 2808383004: Refactor and send voice interaction structure (Closed)
Patch Set: address avi's review comment 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 unified diff | Download patch
« no previous file with comments | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/platform/ax_android_snapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 UI_ACCESSIBILITY_PLATFORM_AX_SNAPSHOT_ANDROID_H_
6 #define UI_ACCESSIBILITY_PLATFORM_AX_SNAPSHOT_ANDROID_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "base/strings/string16.h"
12 #include "ui/accessibility/ax_export.h"
13 #include "ui/accessibility/ax_tree_update.h"
14 #include "ui/gfx/geometry/rect.h"
15
16 namespace ui {
17
18 class AXNode;
19 class AXTree;
20
21 // An intermediate representation of the accessibility snapshot
22 // in order to share code between ARC and Android. The field names
23 // are kept consistent with AccessibilitySnapshotNode.java.
24 struct AXSnapshotNodeAndroid {
dmazzoni 2017/04/20 21:04:07 This struct name is fine, but make the file name m
Muyuan 2017/04/21 18:45:11 I can't give it a name that ends in _android.. oth
dmazzoni 2017/04/21 21:28:55 Can't you override that global build rule with a l
25 static std::unique_ptr<AXSnapshotNodeAndroid> Create(
26 const AXTreeUpdate& update);
27 AXSnapshotNodeAndroid();
28 ~AXSnapshotNodeAndroid();
29
30 gfx::Rect rect;
31 base::string16 text;
32 float text_size;
33 int32_t color;
34 int32_t bgcolor;
35 bool bold;
36 bool italic;
37 bool underline;
38 bool line_through;
39
40 bool has_selection;
41 int32_t start_selection;
42 int32_t end_selection;
43
44 std::string class_name;
45 std::vector<std::unique_ptr<AXSnapshotNodeAndroid>> children;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(AXSnapshotNodeAndroid);
49 };
50
51 AX_EXPORT std::string GetClassName(const AXNode* node);
52
53 AX_EXPORT base::string16 GetText(const AXNode* node);
54
55 AX_EXPORT int GetIntAttribute(const AXNode* node, ui::AXIntAttribute);
56
57 AX_EXPORT gfx::Rect GetPageBoundsRect(const AXNode* node, const AXTree* tree);
58
59 AX_EXPORT void FixEmptyBounds(const AXNode* node,
60 gfx::RectF* bounds,
61 const AXTree* tree);
62
63 AX_EXPORT gfx::Rect RelativeToAbsoluteBounds(const AXNode* node,
64 gfx::RectF bounds,
65 const AXTree* tree);
66
67 } // namespace ui
68
69 #endif // UI_ACCESSIBILITY_PLATFORM_AX_SNAPSHOT_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/platform/ax_android_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698