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" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // will be at least this size, but may be larger if the image itself is | 66 // will be at least this size, but may be larger if the image itself is |
| 67 // larger. | 67 // larger. |
| 68 const gfx::Size& minimum_image_size() const { return minimum_image_size_; } | 68 const gfx::Size& minimum_image_size() const { return minimum_image_size_; } |
| 69 void SetMinimumImageSize(const gfx::Size& size); | 69 void SetMinimumImageSize(const gfx::Size& size); |
| 70 | 70 |
| 71 // Whether we should draw our images resources horizontally flipped. | 71 // Whether we should draw our images resources horizontally flipped. |
| 72 void SetDrawImageMirrored(bool mirrored) { | 72 void SetDrawImageMirrored(bool mirrored) { |
| 73 draw_image_mirrored_ = mirrored; | 73 draw_image_mirrored_ = mirrored; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void SetPadding(const gfx::Insets& padding); | |
|
sky
2017/03/16 04:12:42
SetPadding makes it sound like this is setting som
| |
| 77 | |
| 76 // Overridden from View: | 78 // Overridden from View: |
| 77 gfx::Size GetPreferredSize() const override; | 79 gfx::Size GetPreferredSize() const override; |
| 78 const char* GetClassName() const override; | 80 const char* GetClassName() const override; |
| 79 void OnPaint(gfx::Canvas* canvas) override; | 81 void OnPaint(gfx::Canvas* canvas) override; |
| 80 | 82 |
| 81 protected: | 83 protected: |
| 82 // Overridden from View: | 84 // Overridden from View: |
| 83 void OnFocus() override; | 85 void OnFocus() override; |
| 84 void OnBlur() override; | 86 void OnBlur() override; |
| 85 | 87 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 // The parent class's tooltip_text_ is displayed when not toggled, and | 168 // The parent class's tooltip_text_ is displayed when not toggled, and |
| 167 // this one is shown when toggled. | 169 // this one is shown when toggled. |
| 168 base::string16 toggled_tooltip_text_; | 170 base::string16 toggled_tooltip_text_; |
| 169 | 171 |
| 170 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); | 172 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); |
| 171 }; | 173 }; |
| 172 | 174 |
| 173 } // namespace views | 175 } // namespace views |
| 174 | 176 |
| 175 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ | 177 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ |
| OLD | NEW |