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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/color_chooser/color_chooser_view.cc ('k') | ui/views/controls/button/image_button.cc » ('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 "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/base/layout.h" 10 #include "ui/base/layout.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void SetPreferredSize(const gfx::Size& preferred_size) { 62 void SetPreferredSize(const gfx::Size& preferred_size) {
63 preferred_size_ = preferred_size; 63 preferred_size_ = preferred_size;
64 } 64 }
65 65
66 // Whether we should draw our images resources horizontally flipped. 66 // Whether we should draw our images resources horizontally flipped.
67 void SetDrawImageMirrored(bool mirrored) { 67 void SetDrawImageMirrored(bool mirrored) {
68 draw_image_mirrored_ = mirrored; 68 draw_image_mirrored_ = mirrored;
69 } 69 }
70 70
71 // Overridden from View: 71 // Overridden from View:
72 virtual gfx::Size GetPreferredSize() OVERRIDE; 72 virtual gfx::Size GetPreferredSize() const OVERRIDE;
73 virtual const char* GetClassName() const OVERRIDE; 73 virtual const char* GetClassName() const OVERRIDE;
74 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 74 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
75 75
76 protected: 76 protected:
77 // Overridden from View: 77 // Overridden from View:
78 virtual void OnFocus() OVERRIDE; 78 virtual void OnFocus() OVERRIDE;
79 virtual void OnBlur() OVERRIDE; 79 virtual void OnBlur() OVERRIDE;
80 80
81 // Returns the image to paint. This is invoked from paint and returns a value 81 // Returns the image to paint. This is invoked from paint and returns a value
82 // from images. 82 // from images.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // 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
163 // this one is shown when toggled. 163 // this one is shown when toggled.
164 base::string16 toggled_tooltip_text_; 164 base::string16 toggled_tooltip_text_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton); 166 DISALLOW_COPY_AND_ASSIGN(ToggleImageButton);
167 }; 167 };
168 168
169 } // namespace views 169 } // namespace views
170 170
171 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 171 #endif // UI_VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/color_chooser/color_chooser_view.cc ('k') | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698