Chromium Code Reviews| 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 #ifndef UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/base/layout.h" | 12 #include "ui/base/layout.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 #include "ui/views/controls/button/custom_button.h" | 14 #include "ui/views/controls/button/custom_button.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 | 17 |
| 18 class Painter; | 18 class Painter; |
| 19 | 19 |
| 20 // An image button. | 20 // An image button. |
| 21 | 21 |
|
tapted
2016/04/20 06:05:58
this line should either be removed or be just `//`
karandeepb
2016/05/03 02:54:12
Sorry it isn't clear to me which line you are talk
tapted
2016/05/03 08:08:25
The comment "// An image button." is currently 'de
karandeepb
2016/05/04 01:56:38
Done.
| |
| 22 // Note that this type of button is not focusable by default and will not be | 22 // Note that this type of button is not focusable by default and will not be |
| 23 // part of the focus chain. Call SetFocusBehavior(FocusBehavior::ALWAYS) to | 23 // part of the focus chain, unless in accessibility mode. Call |
| 24 // make it part of the focus chain. | 24 // Button::ConfigureDefaultFocus() to make it part of the focus chain. |
| 25 | |
| 26 class VIEWS_EXPORT ImageButton : public CustomButton { | 25 class VIEWS_EXPORT ImageButton : public CustomButton { |
| 27 public: | 26 public: |
| 28 static const char kViewClassName[]; | 27 static const char kViewClassName[]; |
| 29 | 28 |
| 30 enum HorizontalAlignment { | 29 enum HorizontalAlignment { |
| 31 ALIGN_LEFT = 0, | 30 ALIGN_LEFT = 0, |
| 32 ALIGN_CENTER, | 31 ALIGN_CENTER, |
| 33 ALIGN_RIGHT | 32 ALIGN_RIGHT |
| 34 }; | 33 }; |
| 35 | 34 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 // The parent class's tooltip_text_ is displayed when not toggled, and | 162 // The parent class's tooltip_text_ is displayed when not toggled, and |
| 164 // this one is shown when toggled. | 163 // this one is shown when toggled. |
| 165 base::string16 toggled_tooltip_text_; | 164 base::string16 toggled_tooltip_text_; |
| 166 | 165 |
| 167 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); | 166 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); |
| 168 }; | 167 }; |
| 169 | 168 |
| 170 } // namespace views | 169 } // namespace views |
| 171 | 170 |
| 172 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ | 171 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ |
| OLD | NEW |