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

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

Issue 12389028: Rename DumpAccesibilityTreeHelper to AccessibilityTreeFormatter, pull into content/browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add USE_AURA to conditions for stub implementations of AccessibilityTreeFormatter methods" Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/dump_accessibility_tree_helper.h
diff --git a/content/browser/accessibility/dump_accessibility_tree_helper.h b/content/browser/accessibility/dump_accessibility_tree_helper.h
deleted file mode 100644
index ff5883bb4cc5a250ff85fc7689b03f584c0ae9e7..0000000000000000000000000000000000000000
--- a/content/browser/accessibility/dump_accessibility_tree_helper.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_ACCESSIBILITY_DUMP_ACCESSIBILITY_TREE_HELPER_H_
-#define CONTENT_BROWSER_ACCESSIBILITY_DUMP_ACCESSIBILITY_TREE_HELPER_H_
-
-#include <vector>
-
-#include "base/files/file_path.h"
-#include "base/string16.h"
-#include "base/utf_string_conversions.h"
-#include "content/browser/accessibility/browser_accessibility.h"
-
-namespace content {
-
-// A utility class for retrieving platform specific accessibility information.
-// This is extended by a subclass for each platform where accessibility is
-// implemented.
-class DumpAccessibilityTreeHelper {
- public:
- DumpAccessibilityTreeHelper();
- virtual ~DumpAccessibilityTreeHelper();
-
- // Dumps a BrowserAccessibility tree into a string.
- void DumpAccessibilityTree(BrowserAccessibility* node,
- string16* contents);
-
- // A single filter specification. See GetAllowString() and GetDenyString()
- // for more information.
- struct Filter {
- enum Type {
- ALLOW,
- ALLOW_EMPTY,
- DENY
- };
- string16 match_str;
- Type type;
-
- Filter(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);
-
- // Suffix of the expectation file corresponding to html file.
- // Example:
- // HTML test: test-file.html
- // Expected: test-file-expected-mac.txt.
- // Auto-generated: test-file-actual-mac.txt
- const base::FilePath::StringType GetActualFileSuffix() const;
- const base::FilePath::StringType GetExpectedFileSuffix() const;
-
- // A platform-specific string that indicates a given line in a file
- // is an allow-empty, allow or deny filter. Example:
- // Mac values:
- // GetAllowEmptyString() -> "@MAC-ALLOW-EMPTY:"
- // GetAllowString() -> "@MAC-ALLOW:"
- // GetDenyString() -> "@MAC-DENY:"
- // Example html:
- // <!--
- // @MAC-ALLOW-EMPTY:description*
- // @MAC-ALLOW:roleDescription*
- // @MAC-DENY:subrole*
- // -->
- // <p>Text</p>
- const std::string GetAllowEmptyString() const;
- const std::string GetAllowString() const;
- const std::string GetDenyString() const;
-
- protected:
- void RecursiveDumpAccessibilityTree(BrowserAccessibility* node,
- string16* contents,
- int indent);
-
- // Returns a platform specific representation of a BrowserAccessibility.
- // Should be zero or more complete lines, each with |prefix| prepended
- // (to indent each line).
- string16 ToString(BrowserAccessibility* node, char* prefix);
-
- void Initialize();
-
- bool MatchesFilters(const string16& text, bool default_result);
- void StartLine();
- void Add(bool include_by_default, const string16& attr);
- string16 FinishLine();
-
- std::vector<Filter> filters_;
- string16 line_;
-
- DISALLOW_COPY_AND_ASSIGN(DumpAccessibilityTreeHelper);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_ACCESSIBILITY_DUMP_ACCESSIBILITY_TREE_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698