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

Unified Diff: chrome/browser/accessibility/accessibility_events.h

Issue 79543010: Added basic accessibility to TreeView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility/accessibility_events.h
diff --git a/chrome/browser/accessibility/accessibility_events.h b/chrome/browser/accessibility/accessibility_events.h
index 28587fb6046fd6e88397993646b28b86e222e5d7..5ba386c2f21a9ccaab6cfcbaaebb48e3b9562789 100644
--- a/chrome/browser/accessibility/accessibility_events.h
+++ b/chrome/browser/accessibility/accessibility_events.h
@@ -225,6 +225,7 @@ class AccessibilityComboBoxInfo : public AccessibilityControlInfo {
int item_count_;
};
+
// Accessibility information about a text box, passed to onControlFocused,
// onControlAction, and onTextChanged event listeners.
class AccessibilityTextBoxInfo : public AccessibilityControlInfo {
@@ -325,6 +326,52 @@ class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
int item_count_;
};
+// Accessibility information about a tree; this class is used by
+// onControlFocused event listeners.
+class AccessibilityTreeInfo : public AccessibilityControlInfo {
+ public:
+ AccessibilityTreeInfo(Profile* profile, const std::string& menu_name);
+
+ virtual const char* type() const OVERRIDE;
+};
+
+// Accessibility information about a tree item; this class is used by
+// onControlFocused event listeners.
+class AccessibilityTreeItemInfo : public AccessibilityControlInfo {
+ public:
+ AccessibilityTreeItemInfo(Profile* profile,
+ const std::string& name,
+ const std::string& context,
+ int item_depth,
+ int item_index,
+ int item_count,
+ int children_count,
+ bool is_expanded);
+
+ virtual const char* type() const OVERRIDE;
+
+ virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
+
+ int item_depth() const { return item_depth_; }
+ int item_index() const { return item_index_; }
+ int item_count() const { return item_count_; }
+ int children_count() const { return children_count_; }
+ bool is_expanded() const { return is_expanded_; }
+
+ private:
+ // 0-based item depth.
+ int item_depth_;
+ // The 0-based index of the current item and the number of total items at the
+ // current depth.
+ int item_index_;
+ // Count of items at the current depth.
+ int item_count_;
+ // Count of children of the current item.
+ int children_count_;
+ // True if the node is expanded.
+ bool is_expanded_;
+};
+
// Accessibility information about a slider passed to onControlFocused
// and onControlAction event listeners.
class AccessibilitySliderInfo : public AccessibilityControlInfo {
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698