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

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

Issue 2622893003: Reland f5157480667e99269e0062e9df1df3875db with fix for compile failure. (Closed)
Patch Set: fix in two BUILD.gns Created 3 years, 11 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 | « ui/message_center/views/message_center_button_bar.cc ('k') | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/image_button.h
diff --git a/ui/views/controls/button/image_button.h b/ui/views/controls/button/image_button.h
index 94f70ba823a7860f3803df8c466fdecd2f4ed6ce..eba2a835a40eff5f07a628558b2fe1fd5ad48b16 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -44,7 +44,12 @@ class VIEWS_EXPORT ImageButton : public CustomButton {
virtual const gfx::ImageSkia& GetImage(ButtonState state) const;
// Set the image the button should use for the provided state.
- virtual void SetImage(ButtonState state, const gfx::ImageSkia* image);
+ void SetImage(ButtonState state, const gfx::ImageSkia* image);
+
+ // As above, but takes a const ref. TODO(estade): all callers should be
+ // updated to use this version, and then the implementations can be
+ // consolidated.
+ virtual void SetImage(ButtonState state, const gfx::ImageSkia& image);
// Set the background details.
void SetBackground(SkColor color,
@@ -142,7 +147,7 @@ class VIEWS_EXPORT ToggleImageButton : public ImageButton {
// Overridden from ImageButton:
const gfx::ImageSkia& GetImage(ButtonState state) const override;
- void SetImage(ButtonState state, const gfx::ImageSkia* image) override;
+ void SetImage(ButtonState state, const gfx::ImageSkia& image) override;
// Overridden from View:
bool GetTooltipText(const gfx::Point& p,
« no previous file with comments | « ui/message_center/views/message_center_button_bar.cc ('k') | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698