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

Side by Side Diff: ui/accessibility/ax_tree_data.h

Issue 1407413002: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 2015 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_AX_TREE_DATA_H_
6 #define UI_ACCESSIBILITY_AX_TREE_DATA_H_
7
8 #include <map>
9 #include <string>
10 #include <vector>
11
12 #include "base/strings/string16.h"
13 #include "base/strings/string_split.h"
14 #include "ui/accessibility/ax_enums.h"
15 #include "ui/accessibility/ax_export.h"
16 #include "ui/gfx/geometry/rect.h"
17
18 namespace ui {
19
20 // The data associated with an accessibility tree that's global to the
21 // tree and not associated with any particular node in the tree.
22 struct AX_EXPORT AXTreeData {
23 AXTreeData();
24 virtual ~AXTreeData();
25
26 // Return a string representation of this data, for debugging.
27 virtual std::string ToString() const;
28
29 // This is a simple serializable struct. All member variables should be
30 // public and copyable.
31
32 // The globally unique ID of this accessibility tree.
33 int32 tree_id;
34
35 // The ID of the accessibility tree that this tree is contained in, if any.
36 int32 parent_tree_id;
37
38 // Attributes specific to trees that are web frames.
39 std::string url;
40 std::string title;
41 std::string mimetype;
42 std::string doctype;
43 bool loaded;
44 float loading_progress;
45
46 // The current text selection within this tree, if any, expressed as the
47 // node ID and character offset of the anchor (selection start) and focus
48 // (selection end).
49 int32 sel_anchor_object_id;
50 int32 sel_anchor_offset;
51 int32 sel_focus_object_id;
52 int32 sel_focus_offset;
53 };
54
55 AX_EXPORT bool operator==(const AXTreeData& lhs, const AXTreeData& rhs);
56 AX_EXPORT bool operator!=(const AXTreeData& lhs, const AXTreeData& rhs);
57
58 } // namespace ui
59
60 #endif // UI_ACCESSIBILITY_AX_TREE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698