| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 gfx::ImageSkia images_[STATE_COUNT]; | 96 gfx::ImageSkia images_[STATE_COUNT]; |
| 97 | 97 |
| 98 gfx::ImageSkia background_image_; | 98 gfx::ImageSkia background_image_; |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, Basics); | 101 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, Basics); |
| 102 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, ImagePositionWithBorder); | 102 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, ImagePositionWithBorder); |
| 103 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, LeftAlignedMirrored); | 103 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, LeftAlignedMirrored); |
| 104 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, RightAlignedMirrored); | 104 FRIEND_TEST_ALL_PREFIXES(ImageButtonTest, RightAlignedMirrored); |
| 105 | 105 |
| 106 FRIEND_TEST_ALL_PREFIXES(ImageButtonFactoryTest, CreateVectorImageButton); |
| 107 |
| 106 // Returns the correct position of the image for painting. | 108 // Returns the correct position of the image for painting. |
| 107 gfx::Point ComputeImagePaintPosition(const gfx::ImageSkia& image); | 109 gfx::Point ComputeImagePaintPosition(const gfx::ImageSkia& image); |
| 108 | 110 |
| 109 // Image alignment. | 111 // Image alignment. |
| 110 HorizontalAlignment h_alignment_; | 112 HorizontalAlignment h_alignment_; |
| 111 VerticalAlignment v_alignment_; | 113 VerticalAlignment v_alignment_; |
| 112 gfx::Size minimum_image_size_; | 114 gfx::Size minimum_image_size_; |
| 113 | 115 |
| 114 // Whether we draw our resources horizontally flipped. This can happen in the | 116 // Whether we draw our resources horizontally flipped. This can happen in the |
| 115 // linux titlebar, where image resources were designed to be flipped so a | 117 // linux titlebar, where image resources were designed to be flipped so a |
| (...skipping 50 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 |