OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/controls/button/image_button.h" | 5 #include "ui/views/controls/button/image_button.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "ui/base/accessibility/accessible_view_state.h" | 8 #include "ui/base/accessibility/accessible_view_state.h" |
9 #include "ui/base/animation/throb_animation.h" | 9 #include "ui/gfx/animation/throb_animation.h" |
10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
11 #include "ui/gfx/image/image_skia_operations.h" | 11 #include "ui/gfx/image/image_skia_operations.h" |
12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 | 15 |
16 static const int kDefaultWidth = 16; // Default button width if no theme. | 16 static const int kDefaultWidth = 16; // Default button width if no theme. |
17 static const int kDefaultHeight = 14; // Default button height if no theme. | 17 static const int kDefaultHeight = 14; // Default button height if no theme. |
18 | 18 |
19 const char ImageButton::kViewClassName[] = "ImageButton"; | 19 const char ImageButton::kViewClassName[] = "ImageButton"; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 *tooltip = toggled_tooltip_text_; | 221 *tooltip = toggled_tooltip_text_; |
222 return true; | 222 return true; |
223 } | 223 } |
224 | 224 |
225 void ToggleImageButton::GetAccessibleState(ui::AccessibleViewState* state) { | 225 void ToggleImageButton::GetAccessibleState(ui::AccessibleViewState* state) { |
226 ImageButton::GetAccessibleState(state); | 226 ImageButton::GetAccessibleState(state); |
227 GetTooltipText(gfx::Point(), &state->name); | 227 GetTooltipText(gfx::Point(), &state->name); |
228 } | 228 } |
229 | 229 |
230 } // namespace views | 230 } // namespace views |
OLD | NEW |