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

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

Issue 12335101: Move some accessibility methods, enums and interfaces into the content/public API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix virtual method with no implementation, non-explicit single argument constructor Created 7 years, 10 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
index ff5883bb4cc5a250ff85fc7689b03f584c0ae9e7..c8cf8d23ae6feb963b88fb34072d60d93683485c 100644
--- a/content/browser/accessibility/dump_accessibility_tree_helper.h
+++ b/content/browser/accessibility/dump_accessibility_tree_helper.h
@@ -11,20 +11,20 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "content/browser/accessibility/browser_accessibility.h"
+#include "content/public/browser/accessibility_tree_formatter.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 {
+class DumpAccessibilityTreeHelper : public AccessibilityTreeFormatter {
dmazzoni 2013/02/26 22:37:36 DumpAccessibilityTreeHelper should be renamed Acce
aboxhall 2013/02/27 01:44:16 Done.
public:
- DumpAccessibilityTreeHelper();
+ explicit DumpAccessibilityTreeHelper(BrowserAccessibility* node);
virtual ~DumpAccessibilityTreeHelper();
// Dumps a BrowserAccessibility tree into a string.
- void DumpAccessibilityTree(BrowserAccessibility* node,
- string16* contents);
+ virtual void FormatAccessibilityTree(string16* contents) OVERRIDE;
// A single filter specification. See GetAllowString() and GetDenyString()
// for more information.
@@ -50,8 +50,8 @@ class DumpAccessibilityTreeHelper {
// 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;
+ static const base::FilePath::StringType GetActualFileSuffix();
+ static const base::FilePath::StringType GetExpectedFileSuffix();
// A platform-specific string that indicates a given line in a file
// is an allow-empty, allow or deny filter. Example:
@@ -66,9 +66,9 @@ class DumpAccessibilityTreeHelper {
// @MAC-DENY:subrole*
// -->
// <p>Text</p>
- const std::string GetAllowEmptyString() const;
- const std::string GetAllowString() const;
- const std::string GetDenyString() const;
+ static const std::string GetAllowEmptyString();
+ static const std::string GetAllowString();
+ static const std::string GetDenyString();
protected:
void RecursiveDumpAccessibilityTree(BrowserAccessibility* node,
@@ -82,11 +82,12 @@ class DumpAccessibilityTreeHelper {
void Initialize();
- bool MatchesFilters(const string16& text, bool default_result);
+ bool MatchesFilters(const string16& text, bool default_result) const;
void StartLine();
void Add(bool include_by_default, const string16& attr);
string16 FinishLine();
+ BrowserAccessibility* node_;
std::vector<Filter> filters_;
string16 line_;

Powered by Google App Engine
This is Rietveld 408576698