From 6c158192e64a230aa18f2ba4dd647d5b1a5a8b1d Mon Sep 17 00:00:00 2001 From: "pkotwicz@chromium.org" Date: Mon, 14 May 2012 20:22:01 +0000 Subject: 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@136964 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/views/download/download_shelf_view.cc | 12 ++++++------ .../ui/views/download/download_started_animation_views.cc | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'chrome/browser/ui/views/download') diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc index 8660740..0d11adf9 100644 --- a/chrome/browser/ui/views/download/download_shelf_view.cc +++ b/chrome/browser/ui/views/download/download_shelf_view.cc @@ -307,7 +307,7 @@ void DownloadShelfView::ViewHierarchyChanged(bool is_add, ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); arrow_image_ = new views::ImageView(); - arrow_image_->SetImage(rb.GetBitmapNamed(IDR_DOWNLOADS_FAVICON)); + arrow_image_->SetImage(rb.GetImageSkiaNamed(IDR_DOWNLOADS_FAVICON)); AddChildView(arrow_image_); show_all_view_ = new views::Link( @@ -320,11 +320,11 @@ void DownloadShelfView::ViewHierarchyChanged(bool is_add, close_button_ = new views::ImageButton(this); close_button_->SetImage(views::CustomButton::BS_NORMAL, - rb.GetBitmapNamed(IDR_CLOSE_BAR)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR)); close_button_->SetImage(views::CustomButton::BS_HOT, - rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H)); close_button_->SetImage(views::CustomButton::BS_PUSHED, - rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P)); close_button_->SetAccessibleName( l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); UpdateButtonColors(); @@ -364,8 +364,8 @@ void DownloadShelfView::UpdateButtonColors() { if (GetThemeProvider()) { close_button_->SetBackground( GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT), - rb.GetBitmapNamed(IDR_CLOSE_BAR), - rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); + rb.GetImageSkiaNamed(IDR_CLOSE_BAR), + rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK)); } } diff --git a/chrome/browser/ui/views/download/download_started_animation_views.cc b/chrome/browser/ui/views/download/download_started_animation_views.cc index fd4d9c3..f711ca1 100644 --- a/chrome/browser/ui/views/download/download_started_animation_views.cc +++ b/chrome/browser/ui/views/download/download_started_animation_views.cc @@ -82,9 +82,9 @@ DownloadStartedAnimationWin::DownloadStartedAnimationWin( : ui::LinearAnimation(kMoveTimeMs, kFrameRateHz, NULL), popup_(NULL), web_contents_(web_contents) { - static SkBitmap* kDownloadImage = NULL; + static gfx::ImageSkia* kDownloadImage = NULL; if (!kDownloadImage) { - kDownloadImage = ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( + kDownloadImage = ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_DOWNLOAD_ANIMATION_BEGIN); } -- cgit v1.1