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

Unified Diff: ui/views/controls/scrollbar/bitmap_scroll_bar.cc

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 | « ui/views/controls/scrollbar/bitmap_scroll_bar.h ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scrollbar/bitmap_scroll_bar.cc
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
index ee2ea4a30d31e3a02fce303f0a788874acecf0c8..aa614ead5a303953f3037504097946d57444a66f 100644
--- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -134,25 +134,25 @@ class BitmapScrollBarThumb : public BaseScrollBarThumb {
}
private:
- // Returns the bitmap rendered at the start of the thumb.
- SkBitmap* start_cap_bitmap() const {
+ // Returns the image rendered at the start of the thumb.
+ gfx::ImageSkia* start_cap_bitmap() const {
return scroll_bar_->images_[BitmapScrollBar::THUMB_START_CAP][GetState()];
}
- // Returns the bitmap rendered at the end of the thumb.
- SkBitmap* end_cap_bitmap() const {
+ // Returns the image rendered at the end of the thumb.
+ gfx::ImageSkia* end_cap_bitmap() const {
return scroll_bar_->images_[BitmapScrollBar::THUMB_END_CAP][GetState()];
}
- // Returns the bitmap that is tiled in the background of the thumb between
+ // Returns the image that is tiled in the background of the thumb between
// the start and the end caps.
- SkBitmap* background_bitmap() const {
+ gfx::ImageSkia* background_bitmap() const {
return scroll_bar_->images_[BitmapScrollBar::THUMB_MIDDLE][GetState()];
}
- // Returns the bitmap that is rendered in the middle of the thumb
+ // Returns the image that is rendered in the middle of the thumb
// transparently over the background bitmap.
- SkBitmap* grippy_bitmap() const {
+ gfx::ImageSkia* grippy_bitmap() const {
return scroll_bar_->images_[BitmapScrollBar::THUMB_GRIPPY]
[CustomButton::BS_NORMAL];
}
@@ -188,22 +188,22 @@ BitmapScrollBar::BitmapScrollBar(bool horizontal, bool show_scroll_buttons)
void BitmapScrollBar::SetImage(ScrollBarPart part,
CustomButton::ButtonState state,
- SkBitmap* bitmap) {
+ gfx::ImageSkia* image_skia) {
DCHECK(part < PART_COUNT);
DCHECK(state < CustomButton::BS_COUNT);
switch (part) {
case PREV_BUTTON:
- prev_button_->SetImage(state, bitmap);
+ prev_button_->SetImage(state, image_skia);
break;
case NEXT_BUTTON:
- next_button_->SetImage(state, bitmap);
+ next_button_->SetImage(state, image_skia);
break;
case THUMB_START_CAP:
case THUMB_MIDDLE:
case THUMB_END_CAP:
case THUMB_GRIPPY:
case THUMB_TRACK:
- images_[part][state] = bitmap;
+ images_[part][state] = image_skia;
break;
}
}
« no previous file with comments | « ui/views/controls/scrollbar/bitmap_scroll_bar.h ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698