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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter.h

Issue 15741009: Native Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void RecursiveBuildAccessibilityTree(const BrowserAccessibility& node, 105 void RecursiveBuildAccessibilityTree(const BrowserAccessibility& node,
106 DictionaryValue* tree_node); 106 DictionaryValue* tree_node);
107 void RecursiveFormatAccessibilityTree(const DictionaryValue& tree_node, 107 void RecursiveFormatAccessibilityTree(const DictionaryValue& tree_node,
108 string16* contents, 108 string16* contents,
109 int depth = 0); 109 int depth = 0);
110 110
111 // Overridden by each platform to add the required attributes for each node 111 // Overridden by each platform to add the required attributes for each node
112 // into the given dict. 112 // into the given dict.
113 void AddProperties(const BrowserAccessibility& node, DictionaryValue* dict); 113 void AddProperties(const BrowserAccessibility& node, DictionaryValue* dict);
114 114
115 // Returns true by default; can be overridden by the platform to
116 // prune some children from the tree when they wouldn't be exposed
117 // natively on that platform.
118 virtual bool IncludeChildren(const BrowserAccessibility& node);
119
115 string16 FormatCoordinates(const char* name, 120 string16 FormatCoordinates(const char* name,
116 const char* x_name, 121 const char* x_name,
117 const char* y_name, 122 const char* y_name,
118 const DictionaryValue& value); 123 const DictionaryValue& value);
119 124
120 // Returns a platform specific representation of a BrowserAccessibility. 125 // Returns a platform specific representation of a BrowserAccessibility.
121 // Should be zero or more complete lines, each with |prefix| prepended 126 // Should be zero or more complete lines, each with |prefix| prepended
122 // (to indent each line). 127 // (to indent each line).
123 string16 ToString(const DictionaryValue& node, const string16& indent); 128 string16 ToString(const DictionaryValue& node, const string16& indent);
124 129
(...skipping 13 matching lines...) Expand all
138 143
139 // Filters used when formatting the accessibility tree as text. 144 // Filters used when formatting the accessibility tree as text.
140 std::vector<Filter> filters_; 145 std::vector<Filter> filters_;
141 146
142 DISALLOW_COPY_AND_ASSIGN(AccessibilityTreeFormatter); 147 DISALLOW_COPY_AND_ASSIGN(AccessibilityTreeFormatter);
143 }; 148 };
144 149
145 } // namespace content 150 } // namespace content
146 151
147 #endif // CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_ 152 #endif // CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698