summaryrefslogtreecommitdiffstats
path: root/views/controls/image_view.cc
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 23:13:49 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 23:13:49 +0000
commitc45dde3c15cddbca7795cab1c28fa472148b01b1 (patch)
tree74f32f6537b87946703839e7e2dfde2f2a2f9063 /views/controls/image_view.cc
parent7c8f18ab4383e497f0ba3663156abf81ea5af3e6 (diff)
downloadchromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.zip
chromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.tar.gz
chromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.tar.bz2
Refactor Views accessibility.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6581010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/image_view.cc')
-rw-r--r--views/controls/image_view.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/views/controls/image_view.cc b/views/controls/image_view.cc
index 7f05e97..bc86e55 100644
--- a/views/controls/image_view.cc
+++ b/views/controls/image_view.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/utf_string_conversions.h"
+#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/insets.h"
@@ -126,8 +127,9 @@ void ImageView::OnPaint(gfx::Canvas* canvas) {
}
}
-AccessibilityTypes::Role ImageView::GetAccessibleRole() {
- return AccessibilityTypes::ROLE_GRAPHIC;
+void ImageView::GetAccessibleState(ui::AccessibleViewState* state) {
+ state->role = ui::AccessibilityTypes::ROLE_GRAPHIC;
+ state->name = tooltip_text_;
}
void ImageView::SetHorizontalAlignment(Alignment ha) {
@@ -154,7 +156,6 @@ ImageView::Alignment ImageView::GetVerticalAlignment() {
void ImageView::SetTooltipText(const std::wstring& tooltip) {
tooltip_text_ = WideToUTF16Hack(tooltip);
- SetAccessibleName(WideToUTF16Hack(tooltip));
}
std::wstring ImageView::GetTooltipText() {