| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/controls/image_view.h" | 5 #include "views/controls/image_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "third_party/skia/include/core/SkPaint.h" |
| 9 #include "ui/base/accessibility/accessible_view_state.h" | 10 #include "ui/base/accessibility/accessible_view_state.h" |
| 10 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
| 11 #include "ui/gfx/insets.h" | 12 #include "ui/gfx/insets.h" |
| 12 | 13 |
| 13 namespace views { | 14 namespace views { |
| 14 | 15 |
| 15 ImageView::ImageView() | 16 ImageView::ImageView() |
| 16 : image_size_set_(false), | 17 : image_size_set_(false), |
| 17 horiz_alignment_(CENTER), | 18 horiz_alignment_(CENTER), |
| 18 vert_alignment_(CENTER) { | 19 vert_alignment_(CENTER) { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 165 |
| 165 bool ImageView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { | 166 bool ImageView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) { |
| 166 if (tooltip_text_.empty()) | 167 if (tooltip_text_.empty()) |
| 167 return false; | 168 return false; |
| 168 | 169 |
| 169 *tooltip = GetTooltipText(); | 170 *tooltip = GetTooltipText(); |
| 170 return true; | 171 return true; |
| 171 } | 172 } |
| 172 | 173 |
| 173 } // namespace views | 174 } // namespace views |
| OLD | NEW |