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

Unified Diff: views/controls/button/image_button.h

Issue 2418003: Added const to image parameters for ImageButton class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/controls/button/image_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/image_button.h
===================================================================
--- views/controls/button/image_button.h (revision 48732)
+++ views/controls/button/image_button.h (working copy)
@@ -22,10 +22,12 @@
virtual ~ImageButton();
// Set the image the button should use for the provided state.
- virtual void SetImage(ButtonState aState, SkBitmap* anImage);
+ virtual void SetImage(ButtonState aState, const SkBitmap* anImage);
// Set the background details.
- virtual void SetBackground(SkColor color, SkBitmap* image, SkBitmap* mask);
+ void SetBackground(SkColor color,
+ const SkBitmap* image,
+ const SkBitmap* mask);
enum HorizontalAlignment { ALIGN_LEFT = 0,
ALIGN_CENTER,
@@ -77,16 +79,16 @@
// Change the toggled state.
void SetToggled(bool toggled);
- // Like Button::SetImage(), but to set the graphics used for the
+ // Like ImageButton::SetImage(), but to set the graphics used for the
// "has been toggled" state. Must be called for each button state
// before the button is toggled.
- void SetToggledImage(ButtonState state, SkBitmap* image);
+ void SetToggledImage(ButtonState state, const SkBitmap* image);
// Set the tooltip text displayed when the button is toggled.
void SetToggledTooltipText(const std::wstring& tooltip);
// Overridden from ImageButton:
- virtual void SetImage(ButtonState aState, SkBitmap* anImage);
+ virtual void SetImage(ButtonState aState, const SkBitmap* anImage);
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip);
« no previous file with comments | « no previous file | views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698