summaryrefslogtreecommitdiffstats
path: root/ui/views/controls/scrollbar
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-21 01:54:43 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-21 01:54:43 +0000
commitde2a55f9d9d045c9beb597e1527b7e534b8e744a (patch)
tree32238638fa82fec4229a31335b4752e9bf5649f5 /ui/views/controls/scrollbar
parent296ddc16b04ee89a3b3b8d11b73d6f0c97d0be45 (diff)
downloadchromium_src-de2a55f9d9d045c9beb597e1527b7e534b8e744a.zip
chromium_src-de2a55f9d9d045c9beb597e1527b7e534b8e744a.tar.gz
chromium_src-de2a55f9d9d045c9beb597e1527b7e534b8e744a.tar.bz2
Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia
The files were changed using the following sed script 1 :top 2 /SetImage/ { 3 s|ToSkBitmap|ToImageSkia|g 4 s|GetBitmapNamed|GetImageSkiaNamed|g 5 n 6 N 7 s|ToSkBitmap|ToImageSkia|g 8 s|GetBitmapNamed|GetImageSkiaNamed|g 9 b top 10 } 11 /SetBackground/ { 12 s|ToSkBitmap|ToImageSkia|g 13 s|GetBitmapNamed|GetImageSkiaNamed|g 14 n 15 N 16 s|ToSkBitmap|ToImageSkia|g 17 s|GetBitmapNamed|GetImageSkiaNamed|g 18 b top 19 } 20 /SetToggledImage/ { 21 s|ToSkBitmap|ToImageSkia|g 22 s|GetBitmapNamed|GetImageSkiaNamed|g 23 n 24 N 25 s|ToSkBitmap|ToImageSkia|g 26 s|GetBitmapNamed|GetImageSkiaNamed|g 27 b top 28 } The following files were modified by hand afterwards: 1 ash/launcher/launcher_button.cc 2 ash/system/audio/tray_volume.cc 3 ash/system/drive/tray_drive.cc 4 ash/system/tray/system_tray_delegate.h 5 ash/system/tray/tray_item_more.cc 6 ash/system/tray/tray_item_more.h 7 chrome/browser/chromeos/login/take_photo_view.cc 8 chrome/browser/chromeos/login/take_photo_view.h 9 chrome/browser/chromeos/options/network_config_view.cc 10 chrome/browser/chromeos/options/network_config_view.h 11 chrome/browser/ui/panels/panel_browser_frame_view.cc 12 chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc 13 chrome/browser/ui/views/autocomplete/autocomplete_result_view.h 14 chrome/browser/ui/views/avatar_menu_bubble_view.cc 15 chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc 16 chrome/browser/ui/views/confirm_bubble_view.cc 17 chrome/browser/ui/views/download/download_shelf_view.cc 18 chrome/browser/ui/views/download/download_started_animation_views.cc 19 chrome/browser/ui/views/dropdown_bar_view.cc 20 chrome/browser/ui/views/dropdown_bar_view.h 21 chrome/browser/ui/views/find_bar_view.cc 22 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc 23 chrome/browser/ui/views/hung_renderer_view.cc 24 chrome/browser/ui/views/location_bar/page_action_image_view.cc 25 chrome/browser/ui/views/tabs/tab_strip.cc 26 chrome/browser/ui/views/tabs/tab_strip.h 27 ui/views/controls/button/image_button.h 28 ui/views/controls/button/image_button_unittest.cc 29 ui/views/controls/scrollbar/bitmap_scroll_bar.cc 30 ui/views/controls/scrollbar/bitmap_scroll_bar.h Whitespace changes were made in the following files manually 1 ash/launcher/launcher_view.cc 2 chrome/browser/chromeos/login/simple_web_view_dialog.cc 3 chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc 4 chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc 5 chrome/browser/ui/views/toolbar_view.cc Bug=124566 Test=Compiles, try bots pass Review URL: https://chromiumcodereview.appspot.com/10382144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/scrollbar')
-rw-r--r--ui/views/controls/scrollbar/bitmap_scroll_bar.cc24
-rw-r--r--ui/views/controls/scrollbar/bitmap_scroll_bar.h8
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_;