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

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

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
Index: chrome/browser/accessibility/accessibility_events.cc
diff --git a/chrome/browser/accessibility/accessibility_events.cc b/chrome/browser/accessibility/accessibility_events.cc
index 344e1259cdf0366966612a7db696e3bebe241877..d7558fa59ec0008de69c2f726e7e9ad5cd35d612 100644
--- a/chrome/browser/accessibility/accessibility_events.cc
+++ b/chrome/browser/accessibility/accessibility_events.cc
@@ -265,6 +265,45 @@ void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const {
dict->SetInteger(keys::kItemCountKey, item_count_);
}
+AccessibilityTreeInfo::AccessibilityTreeInfo(Profile* profile,
+ const std::string& menu_name)
+ : AccessibilityControlInfo(profile, menu_name) {
+}
+
+const char* AccessibilityTreeInfo::type() const {
+ return keys::kTypeTree;
+}
+
+AccessibilityTreeItemInfo::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)
+ : AccessibilityControlInfo(profile, name),
+ item_depth_(item_depth),
+ item_index_(item_index),
+ item_count_(item_count),
+ children_count_(children_count),
+ is_expanded_(is_expanded) {
+ set_context(context);
+}
+
+const char* AccessibilityTreeItemInfo::type() const {
+ return keys::kTypeTreeItem;
+}
+
+void AccessibilityTreeItemInfo::SerializeToDict(DictionaryValue *dict) const {
+ AccessibilityControlInfo::SerializeToDict(dict);
+ dict->SetInteger(keys::kItemDepthKey, item_depth_);
+ dict->SetInteger(keys::kItemIndexKey, item_index_);
+ dict->SetInteger(keys::kItemCountKey, item_count_);
+ dict->SetInteger(keys::kChildrenCountKey, children_count_);
+ dict->SetBoolean(keys::kItemExpandedKey, is_expanded_);
+}
+
AccessibilitySliderInfo::AccessibilitySliderInfo(Profile* profile,
const std::string& name,
const std::string& context,

Powered by Google App Engine
This is Rietveld 408576698