From 9938b1709e2639b0b2becb2ee6df0001af6c5383 Mon Sep 17 00:00:00 2001 From: "pkotwicz@chromium.org" Date: Tue, 5 Jun 2012 16:23:02 +0000 Subject: Revert 140531 - Converted the rest of chrome except for extensions and favicons to user ImageSkia Used same conversion script as 10437006 Modified the following files afterwards: 1 chrome/browser/background/background_application_list_model.cc 2 chrome/browser/extensions/extension_install_ui.cc 3 chrome/browser/extensions/extension_install_ui.h 4 chrome/browser/speech/speech_recognition_bubble.cc 5 chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc 6 chrome/browser/speech/speech_recognition_bubble_gtk.cc 7 chrome/browser/speech/speech_recognition_tray_icon_controller.h 8 chrome/browser/task_manager/task_manager_resource_providers.cc 9 chrome/browser/ui/panels/panel_browser_frame_view.cc 10 chrome/browser/ui/search_engines/template_url_table_model.cc 11 chrome/browser/ui/search_engines/template_url_table_model.h 12 chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc 13 chrome/browser/ui/views/avatar_menu_button.cc 14 chrome/browser/ui/views/detachable_toolbar_view.cc 15 chrome/browser/ui/views/download/download_item_view.cc 16 chrome/browser/ui/views/extensions/extension_install_dialog_view.cc 17 chrome/browser/ui/views/location_bar/icon_label_bubble_view.h 18 chrome/browser/ui/views/location_bar/location_bar_view.cc 19 chrome/browser/ui/views/tab_icon_view.cc 20 chrome/browser/ui/views/tab_icon_view.h 21 chrome/browser/ui/views/tabs/tab_strip.cc Include, whitespace changes in 1 chrome/browser/automation/automation_provider_observers.cc 2 chrome/browser/background/background_application_list_model.h 3 chrome/browser/background/background_mode_manager.cc 4 chrome/browser/custom_home_pages_table_model.h 5 chrome/browser/download/download_util.cc 6 chrome/browser/extensions/extension_function_dispatcher.cc 7 chrome/browser/extensions/extension_install_dialog.cc 8 chrome/browser/extensions/extension_install_dialog.h 9 chrome/browser/ntp_background_util.cc 10 chrome/browser/speech/speech_recognition_bubble.h 11 chrome/browser/task_manager/task_manager.h 12 chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc 13 chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc 14 chrome/browser/ui/cocoa/task_manager_mac.h 15 chrome/browser/ui/views/about_chrome_view.cc 16 chrome/browser/ui/views/avatar_menu_bubble_view.cc 17 chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc 18 chrome/browser/ui/views/download/download_item_view.h 19 chrome/browser/ui/views/find_bar_view.cc 20 chrome/browser/ui/views/infobars/extension_infobar.cc 21 chrome/browser/ui/views/notifications/balloon_view.cc 22 chrome/browser/ui/views/page_info_bubble_view.cc 23 chrome/browser/ui/views/tabs/base_tab.cc 24 chrome/browser/ui/views/tabs/tab.cc 25 chrome/browser/ui/views/toolbar_view.cc Review URL: https://chromiumcodereview.appspot.com/10453101 TBR=pkotwicz@chromium.org Review URL: https://chromiumcodereview.appspot.com/10534009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140532 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_util.cc | 44 +++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'chrome/browser/download/download_util.cc') diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index 1119df0..4d2e3ca 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -183,13 +183,13 @@ void GenerateFileNameFromRequest(const DownloadItem& download_item, // Download progress painting -------------------------------------------------- -// Common images used for download progress animations. We load them once the +// Common bitmaps used for download progress animations. We load them once the // first time we do a progress paint, then reuse them as they are always the // same. -gfx::ImageSkia* g_foreground_16 = NULL; -gfx::ImageSkia* g_background_16 = NULL; -gfx::ImageSkia* g_foreground_32 = NULL; -gfx::ImageSkia* g_background_32 = NULL; +SkBitmap* g_foreground_16 = NULL; +SkBitmap* g_background_16 = NULL; +SkBitmap* g_foreground_32 = NULL; +SkBitmap* g_background_32 = NULL; void PaintDownloadProgress(gfx::Canvas* canvas, #if defined(TOOLKIT_VIEWS) @@ -200,24 +200,22 @@ void PaintDownloadProgress(gfx::Canvas* canvas, int start_angle, int percent_done, PaintDownloadProgressSize size) { - // Load up our common images + // Load up our common bitmaps if (!g_background_16) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - g_foreground_16 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); - g_background_16 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_BACKGROUND_16); - g_foreground_32 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); - g_background_32 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_BACKGROUND_32); + g_foreground_16 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); + g_background_16 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_BACKGROUND_16); + g_foreground_32 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); + g_background_32 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_BACKGROUND_32); } - gfx::ImageSkia* background = - (size == BIG) ? g_background_32 : g_background_16; - gfx::ImageSkia* foreground = - (size == BIG) ? g_foreground_32 : g_foreground_16; + SkBitmap* background = (size == BIG) ? g_background_32 : g_background_16; + SkBitmap* foreground = (size == BIG) ? g_foreground_32 : g_foreground_16; const int kProgressIconSize = (size == BIG) ? kBigProgressIconSize : kSmallProgressIconSize; - // We start by storing the bounds of the background and foreground images + // We start by storing the bounds of the background and foreground bitmaps // so that it is easy to mirror the bounds if the UI layout is RTL. gfx::Rect background_bounds(origin_x, origin_y, background->width(), background->height()); @@ -300,14 +298,14 @@ void PaintDownloadComplete(gfx::Canvas* canvas, int origin_y, double animation_progress, PaintDownloadProgressSize size) { - // Load up our common images. + // Load up our common bitmaps. if (!g_foreground_16) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - g_foreground_16 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); - g_foreground_32 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); + g_foreground_16 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); + g_foreground_32 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); } - gfx::ImageSkia* complete = (size == BIG) ? g_foreground_32 : g_foreground_16; + SkBitmap* complete = (size == BIG) ? g_foreground_32 : g_foreground_16; gfx::Rect complete_bounds(origin_x, origin_y, complete->width(), complete->height()); @@ -332,14 +330,14 @@ void PaintDownloadInterrupted(gfx::Canvas* canvas, int origin_y, double animation_progress, PaintDownloadProgressSize size) { - // Load up our common images. + // Load up our common bitmaps. if (!g_foreground_16) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - g_foreground_16 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); - g_foreground_32 = rb.GetImageSkiaNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); + g_foreground_16 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_16); + g_foreground_32 = rb.GetBitmapNamed(IDR_DOWNLOAD_PROGRESS_FOREGROUND_32); } - gfx::ImageSkia* complete = (size == BIG) ? g_foreground_32 : g_foreground_16; + SkBitmap* complete = (size == BIG) ? g_foreground_32 : g_foreground_16; gfx::Rect complete_bounds(origin_x, origin_y, complete->width(), complete->height()); -- cgit v1.1