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

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

Issue 2808383004: Refactor and send voice interaction structure (Closed)
Patch Set: address dominic's 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 unified diff | Download patch
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"
dmazzoni 2017/04/20 21:04:07 Unused? I think you're only using it in the cc fil
Muyuan 2017/04/21 18:45:12 Done.
13 #include "ui/accessibility/ax_tree_update.h"
dmazzoni 2017/04/20 21:04:07 Forward-declare instead of including this
Muyuan 2017/04/21 18:45:12 AXTreeUpdate seems to be a type alias instead of a
14 #include "ui/gfx/geometry/rect.h"
15
16 namespace ui {
17
18 // An intermediate representation of the accessibility snapshot
19 // in order to share code between ARC and Android. The field names
20 // are kept consistent with AccessibilitySnapshotNode.java.
21 struct AXSnapshotNodeAndroid {
22 static std::unique_ptr<AXSnapshotNodeAndroid> Create(
dmazzoni 2017/04/20 21:04:08 Add a comment that this builds a whole tree of AXS
Muyuan 2017/04/21 18:45:12 Done.
23 const AXTreeUpdate& update);
24 AXSnapshotNodeAndroid();
dmazzoni 2017/04/20 21:04:07 Should the constructor be private so that the only
Muyuan 2017/04/21 18:45:12 base::MakeUnique in WalkAXTreeDepthFirst will not
dmazzoni 2017/04/21 21:31:47 private static would make sense to me.
Muyuan 2017/04/25 04:31:06 Done.
25 ~AXSnapshotNodeAndroid();
26
27 gfx::Rect rect;
28 base::string16 text;
29 float text_size;
30 int32_t color;
31 int32_t bgcolor;
32 bool bold;
33 bool italic;
34 bool underline;
35 bool line_through;
36
37 bool has_selection;
38 int32_t start_selection;
39 int32_t end_selection;
40
41 std::string class_name;
42 std::vector<std::unique_ptr<AXSnapshotNodeAndroid>> children;
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(AXSnapshotNodeAndroid);
46 };
47
48 } // namespace ui
49
50 #endif // UI_ACCESSIBILITY_PLATFORM_AX_SNAPSHOT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698