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

Unified Diff: views/controls/image_view.cc

Issue 174252: Adds support and exposure of additional accessibility roles. Includes naming ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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: views/controls/image_view.cc
===================================================================
--- views/controls/image_view.cc (revision 23961)
+++ views/controls/image_view.cc (working copy)
@@ -136,6 +136,23 @@
}
}
+bool ImageView::GetAccessibleName(std::wstring* name) {
+ if (tooltip_text_.empty()) {
+ return false;
+ } else {
+ *name = GetTooltipText();
sky 2009/08/21 21:33:39 Both of these should be consistent. Either use too
+ return true;
+ }
+}
+
+bool ImageView::GetAccessibleRole(AccessibilityTypes::Role* role) {
+ if (!role)
+ return false;
+
+ *role = AccessibilityTypes::ROLE_GRAPHIC;
+ return true;
+}
+
void ImageView::SetHorizontalAlignment(Alignment ha) {
if (ha != horiz_alignment_) {
horiz_alignment_ = ha;
@@ -170,7 +187,7 @@
if (tooltip_text_.empty()) {
return false;
} else {
- * tooltip = GetTooltipText();
+ *tooltip = GetTooltipText();
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698