summaryrefslogtreecommitdiffstats
path: root/views/controls/image_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/image_view.cc')
-rw-r--r--views/controls/image_view.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/views/controls/image_view.cc b/views/controls/image_view.cc
index 2a7e18d..14a6219 100644
--- a/views/controls/image_view.cc
+++ b/views/controls/image_view.cc
@@ -81,7 +81,7 @@ void ImageView::ComputeImageOrigin(int image_width, int image_height,
gfx::Insets insets = GetInsets();
- switch(actual_horiz_alignment) {
+ switch (actual_horiz_alignment) {
case LEADING:
*x = insets.left();
break;
@@ -137,11 +137,9 @@ void ImageView::Paint(gfx::Canvas* canvas) {
}
bool ImageView::GetAccessibleName(std::wstring* name) {
- if (!name || tooltip_text_.empty())
- return false;
-
+ DCHECK(name);
*name = tooltip_text_;
- return true;
+ return !name->empty();
}
bool ImageView::GetAccessibleRole(AccessibilityTypes::Role* role) {