diff options
Diffstat (limited to 'ui/views/controls/scrollbar')
-rw-r--r-- | ui/views/controls/scrollbar/bitmap_scroll_bar.cc | 24 | ||||
-rw-r--r-- | ui/views/controls/scrollbar/bitmap_scroll_bar.h | 8 |
2 files changed, 16 insertions, 16 deletions
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc index ee2ea4a..aa614ea 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; } } diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.h b/ui/views/controls/scrollbar/bitmap_scroll_bar.h index 3f9ccab..3c6a1b4 100644 --- a/ui/views/controls/scrollbar/bitmap_scroll_bar.h +++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -51,10 +51,10 @@ class VIEWS_EXPORT BitmapScrollBar : public BaseScrollBar, PART_COUNT }; - // Sets the bitmap to be rendered for the specified part and state. + // Sets the image to be rendered for the specified part and state. void SetImage(ScrollBarPart part, CustomButton::ButtonState state, - SkBitmap* bitmap); + gfx::ImageSkia* image_skia); gfx::Rect GetTrackBounds() const; @@ -79,7 +79,7 @@ class VIEWS_EXPORT BitmapScrollBar : public BaseScrollBar, // The thumb needs to be able to access the part images. friend BitmapScrollBarThumb; - SkBitmap* images_[PART_COUNT][CustomButton::BS_COUNT]; + gfx::ImageSkia* images_[PART_COUNT][CustomButton::BS_COUNT]; // True if the scroll buttons at each end of the scroll bar should be shown. bool show_scroll_buttons_; |