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

Unified Diff: views/controls/image_view.cc

Issue 1616004: Fix Regression for Accessible Names (Closed)
Patch Set: Created 10 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: views/controls/image_view.cc
diff --git a/views/controls/image_view.cc b/views/controls/image_view.cc
index 4217fe1a7839f8e748e51613d91ca5fcd4cf8e9e..d35585e4619286dd26ae3c3b28813e53ebd1bc58 100644
--- a/views/controls/image_view.cc
+++ b/views/controls/image_view.cc
@@ -136,12 +136,6 @@ void ImageView::Paint(gfx::Canvas* canvas) {
}
}
-bool ImageView::GetAccessibleName(std::wstring* name) {
- DCHECK(name);
- *name = tooltip_text_;
- return !name->empty();
-}
-
bool ImageView::GetAccessibleRole(AccessibilityTypes::Role* role) {
if (!role)
return false;
@@ -174,6 +168,7 @@ ImageView::Alignment ImageView::GetVerticalAlignment() {
void ImageView::SetTooltipText(const std::wstring& tooltip) {
tooltip_text_ = tooltip;
+ SetAccessibleName(tooltip);
}
std::wstring ImageView::GetTooltipText() {

Powered by Google App Engine
This is Rietveld 408576698