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

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

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 | « views/controls/button/image_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/image_button.cc
===================================================================
--- views/controls/button/image_button.cc (revision 48732)
+++ views/controls/button/image_button.cc (working copy)
@@ -29,13 +29,13 @@
ImageButton::~ImageButton() {
}
-void ImageButton::SetImage(ButtonState aState, SkBitmap* anImage) {
+void ImageButton::SetImage(ButtonState aState, const SkBitmap* anImage) {
images_[aState] = anImage ? *anImage : SkBitmap();
}
void ImageButton::SetBackground(SkColor color,
- SkBitmap* image,
- SkBitmap* mask) {
+ const SkBitmap* image,
+ const SkBitmap* mask) {
if (!image || !mask) {
background_image_.reset();
return;
@@ -127,7 +127,8 @@
SchedulePaint();
}
-void ToggleImageButton::SetToggledImage(ButtonState state, SkBitmap* image) {
+void ToggleImageButton::SetToggledImage(ButtonState state,
+ const SkBitmap* image) {
if (toggled_) {
images_[state] = image ? *image : SkBitmap();
if (state_ == state)
@@ -144,7 +145,7 @@
////////////////////////////////////////////////////////////////////////////////
// ToggleImageButton, ImageButton overrides:
-void ToggleImageButton::SetImage(ButtonState state, SkBitmap* image) {
+void ToggleImageButton::SetImage(ButtonState state, const SkBitmap* image) {
if (toggled_) {
alternate_images_[state] = image ? *image : SkBitmap();
} else {
« no previous file with comments | « views/controls/button/image_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698