summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/custom_button.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-09 04:41:03 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-09 04:41:03 +0000
commit5b3bdb5546f1aa83b7f3c060beabc191d5de428d (patch)
tree4789917824f35f0dbc5be62b89d02b1dbc08514e /chrome/browser/ui/gtk/custom_button.cc
parent9bc732a80a907ae258dfa182b09575c9b79d2ec8 (diff)
downloadchromium_src-5b3bdb5546f1aa83b7f3c060beabc191d5de428d.zip
chromium_src-5b3bdb5546f1aa83b7f3c060beabc191d5de428d.tar.gz
chromium_src-5b3bdb5546f1aa83b7f3c060beabc191d5de428d.tar.bz2
This CL removes ResourceBundle::GetBitmapNamed() and ThemeProvider::GetBitmapNamed()
BUG=153180 Test=Compiles R=sail,erg TBR=sky Review URL: https://chromiumcodereview.appspot.com/11015007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/custom_button.cc')
-rw-r--r--chrome/browser/ui/gtk/custom_button.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/ui/gtk/custom_button.cc b/chrome/browser/ui/gtk/custom_button.cc
index 8a98c04..2b41351 100644
--- a/chrome/browser/ui/gtk/custom_button.cc
+++ b/chrome/browser/ui/gtk/custom_button.cc
@@ -139,14 +139,15 @@ gboolean CustomDrawButtonBase::OnExpose(GtkWidget* widget,
}
void CustomDrawButtonBase::SetBackground(SkColor color,
- SkBitmap* image, SkBitmap* mask) {
- if (!image || !mask) {
+ const SkBitmap& image,
+ const SkBitmap& mask) {
+ if (image.isNull() || mask.isNull()) {
if (background_image_->valid()) {
background_image_->UsePixbuf(NULL);
}
} else {
SkBitmap img =
- SkBitmapOperations::CreateButtonBackground(color, *image, *mask);
+ SkBitmapOperations::CreateButtonBackground(color, image, mask);
GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(img);
background_image_->UsePixbuf(pixbuf);
@@ -336,7 +337,8 @@ void CustomDrawButton::UnsetPaintOverride() {
}
void CustomDrawButton::SetBackground(SkColor color,
- SkBitmap* image, SkBitmap* mask) {
+ const SkBitmap& image,
+ const SkBitmap& mask) {
button_base_.SetBackground(color, image, mask);
}