Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: ui/views/controls/button/image_button.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: check details Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/image_button_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/image_button_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698