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

Unified Diff: content/browser/accessibility/accessibility_tree_formatter.h

Issue 811213002: Revert of Add DumpAccessibilityEvents test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump_acc_events_1
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/accessibility_tree_formatter.h
diff --git a/content/browser/accessibility/accessibility_tree_formatter.h b/content/browser/accessibility/accessibility_tree_formatter.h
index 8db914a9fa5433b24957ce55b8934d56819dfdbb..39c6a4aa283c5473bad3c24ccbcfeb2a8346a49c 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.h
+++ b/content/browser/accessibility/accessibility_tree_formatter.h
@@ -27,27 +27,7 @@
explicit AccessibilityTreeFormatter(BrowserAccessibility* root);
virtual ~AccessibilityTreeFormatter();
- // A single filter specification. See GetAllowString() and GetDenyString()
- // for more information.
- struct Filter {
- enum Type {
- ALLOW,
- ALLOW_EMPTY,
- DENY
- };
- base::string16 match_str;
- Type type;
-
- Filter(base::string16 match_str, Type type)
- : match_str(match_str), type(type) {}
- };
-
static AccessibilityTreeFormatter* Create(WebContents* wc);
-
- static bool MatchesFilters(
- const std::vector<Filter>& filters,
- const base::string16& text,
- bool default_result);
// Populates the given DictionaryValue with the accessibility tree.
// The dictionary contains a key/value pair for each attribute of the node,
@@ -74,13 +54,24 @@
// Dumps a BrowserAccessibility tree into a string.
void FormatAccessibilityTree(base::string16* contents);
+ // A single filter specification. See GetAllowString() and GetDenyString()
+ // for more information.
+ struct Filter {
+ enum Type {
+ ALLOW,
+ ALLOW_EMPTY,
+ DENY
+ };
+ base::string16 match_str;
+ Type type;
+
+ Filter(base::string16 match_str, Type type)
+ : match_str(match_str), type(type) {}
+ };
+
// Set regular expression filters that apply to each component of every
// line before it's output.
void SetFilters(const std::vector<Filter>& filters);
-
- // If true, the internal accessibility id of each node will be included
- // in its output.
- void set_show_ids(bool show_ids) { show_ids_ = show_ids; }
// Suffix of the expectation file corresponding to html file.
// Example:
@@ -128,7 +119,10 @@
const base::DictionaryValue& value);
// Returns a platform specific representation of a BrowserAccessibility.
- base::string16 ToString(const base::DictionaryValue& node);
+ // Should be zero or more complete lines, each with |prefix| prepended
+ // (to indent each line).
+ base::string16 ToString(const base::DictionaryValue& node,
+ const base::string16& indent);
void Initialize();
@@ -147,9 +141,6 @@
// Filters used when formatting the accessibility tree as text.
std::vector<Filter> filters_;
- // Whether or not node ids should be included in the dump.
- bool show_ids_;
-
DISALLOW_COPY_AND_ASSIGN(AccessibilityTreeFormatter);
};

Powered by Google App Engine
This is Rietveld 408576698