diff options
Diffstat (limited to 'views/controls/button/text_button.cc')
-rw-r--r-- | views/controls/button/text_button.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 5c1ec29..2125a02 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -34,6 +34,9 @@ const SkColor TextButton::kHoverColor = TextButton::kEnabledColor; // How long the hover fade animation should last. static const int kHoverAnimationDurationMs = 170; +// static +const char TextButton::kViewClassName[] = "views/TextButton"; + static int PrefixTypeToCanvasType(TextButton::PrefixType type) { switch (type) { case TextButton::PREFIX_HIDE: @@ -203,6 +206,7 @@ TextButton::~TextButton() { void TextButton::SetText(const std::wstring& text) { text_ = text; + SetAccessibleName(text); UpdateTextSize(); } @@ -427,6 +431,10 @@ void TextButton::SetEnabled(bool enabled) { SchedulePaint(); } +std::string TextButton::GetClassName() const { + return kViewClassName; +} + void TextButton::Paint(gfx::Canvas* canvas) { Paint(canvas, false); } |