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

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

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | « chrome/browser/ui/views/wrench_menu.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 ed0c80e0f0b3007615a9000bd35a810a4058b590..3a54e20764c54865521c07de1e73452b057bff32 100644
--- a/ui/views/controls/button/image_button.h
+++ b/ui/views/controls/button/image_button.h
@@ -8,6 +8,7 @@
#include "base/gtest_prod_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/views/controls/button/custom_button.h"
namespace views {
@@ -36,12 +37,12 @@ class VIEWS_EXPORT ImageButton : public CustomButton {
virtual ~ImageButton();
// Set the image the button should use for the provided state.
- virtual void SetImage(ButtonState state, const SkBitmap* image);
+ virtual void SetImage(ButtonState state, const gfx::ImageSkia* image);
// Set the background details.
void SetBackground(SkColor color,
- const SkBitmap* image,
- const SkBitmap* mask);
+ const gfx::ImageSkia* image,
+ const gfx::ImageSkia* mask);
// Set an |image| to draw on top of the normal / hot / pushed image.
// Pass NULL for no image.
@@ -104,13 +105,14 @@ class VIEWS_EXPORT ToggleImageButton : public ImageButton {
// 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, const SkBitmap* image);
+ void SetToggledImage(ButtonState state, const gfx::ImageSkia* image);
// Set the tooltip text displayed when the button is toggled.
void SetToggledTooltipText(const string16& tooltip);
// Overridden from ImageButton:
- virtual void SetImage(ButtonState state, const SkBitmap* image) OVERRIDE;
+ virtual void SetImage(ButtonState state,
+ const gfx::ImageSkia* image) OVERRIDE;
// Overridden from View:
virtual bool GetTooltipText(const gfx::Point& p,
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698