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

Unified Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « chrome/browser/ui/views/tab_icon_view.cc ('k') | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/base_tab.cc
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 7f87bae9ef844ce3cfc5cb6eb5bf013ddc6e4469..34d7dcafd84bcc0965ba933e2a2ddf252b4b636c 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -93,7 +93,7 @@ namespace {
// Draws the icon image at the center of |bounds|.
void DrawIconCenter(gfx::Canvas* canvas,
- const SkBitmap& image,
+ const gfx::ImageSkia& image,
int image_offset,
int icon_width,
int icon_height,
@@ -422,10 +422,11 @@ void BaseTab::AdvanceLoadingAnimation(TabRendererData::NetworkState old_state,
if (!initialized) {
initialized = true;
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SkBitmap loading_animation(*rb.GetBitmapNamed(IDR_THROBBER));
+ gfx::ImageSkia loading_animation(*rb.GetImageSkiaNamed(IDR_THROBBER));
loading_animation_frame_count =
loading_animation.width() / loading_animation.height();
- SkBitmap waiting_animation(*rb.GetBitmapNamed(IDR_THROBBER_WAITING));
+ gfx::ImageSkia waiting_animation(*rb.GetImageSkiaNamed(
+ IDR_THROBBER_WAITING));
waiting_animation_frame_count =
waiting_animation.width() / waiting_animation.height();
waiting_to_loading_frame_count_ratio =
@@ -460,7 +461,7 @@ void BaseTab::PaintIcon(gfx::Canvas* canvas) {
if (data().network_state != TabRendererData::NETWORK_STATE_NONE) {
ui::ThemeProvider* tp = GetThemeProvider();
- SkBitmap frames(*tp->GetBitmapNamed(
+ gfx::ImageSkia frames(*tp->GetImageSkiaNamed(
(data().network_state == TabRendererData::NETWORK_STATE_WAITING) ?
IDR_THROBBER_WAITING : IDR_THROBBER));
@@ -473,7 +474,7 @@ void BaseTab::PaintIcon(gfx::Canvas* canvas) {
canvas->ClipRect(GetLocalBounds());
if (should_display_crashed_favicon_) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON));
+ gfx::ImageSkia crashed_favicon(*rb.GetImageSkiaNamed(IDR_SAD_FAVICON));
bounds.set_y(bounds.y() + favicon_hiding_offset_);
DrawIconCenter(canvas, crashed_favicon, 0,
crashed_favicon.width(),
« no previous file with comments | « chrome/browser/ui/views/tab_icon_view.cc ('k') | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698