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

Unified Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sorted headers in modified files Created 8 years, 7 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
Index: chrome/browser/ui/views/constrained_window_views.cc
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index 53d479f678abaf5311804dcddeaeaa28cf89a7e1..f7df363f2d75633be1f4cd3d324913a1f44f0b75 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -100,8 +100,8 @@ class XPWindowResources : public views::WindowResources {
}
virtual ~XPWindowResources() {}
- virtual SkBitmap* GetPartBitmap(views::FramePartBitmap part_id) const {
- return bitmaps_[part_id];
+ virtual gfx::ImageSkia* GetPartImage(views::FramePartImage part_id) const {
+ return images_[part_id];
}
private:
@@ -112,13 +112,13 @@ class XPWindowResources : public views::WindowResources {
for (int i = 0; i < FRAME_PART_BITMAP_COUNT; ++i) {
int id = kXPFramePartIDs[i];
if (id != 0)
- bitmaps_[i] = rb.GetBitmapNamed(id);
+ images_[i] = rb.GetImageSkiaNamed(id);
}
initialized = true;
}
}
- static SkBitmap* bitmaps_[FRAME_PART_BITMAP_COUNT];
+ static gfx::ImageSkia* images_[FRAME_PART_BITMAP_COUNT];
DISALLOW_COPY_AND_ASSIGN(XPWindowResources);
};
@@ -130,8 +130,8 @@ class VistaWindowResources : public views::WindowResources {
}
virtual ~VistaWindowResources() {}
- virtual SkBitmap* GetPartBitmap(views::FramePartBitmap part_id) const {
- return bitmaps_[part_id];
+ virtual gfx::ImageSkia* GetPartImage(views::FramePartImage part_id) const {
+ return images_[part_id];
}
private:
@@ -142,19 +142,19 @@ class VistaWindowResources : public views::WindowResources {
for (int i = 0; i < FRAME_PART_BITMAP_COUNT; ++i) {
int id = kVistaFramePartIDs[i];
if (id != 0)
- bitmaps_[i] = rb.GetBitmapNamed(id);
+ images_[i] = rb.GetImageSkiaNamed(id);
}
initialized = true;
}
}
- static SkBitmap* bitmaps_[FRAME_PART_BITMAP_COUNT];
+ static gfx::ImageSkia* images_[FRAME_PART_BITMAP_COUNT];
DISALLOW_COPY_AND_ASSIGN(VistaWindowResources);
};
-SkBitmap* XPWindowResources::bitmaps_[];
-SkBitmap* VistaWindowResources::bitmaps_[];
+gfx::ImageSkia* XPWindowResources::images_[];
+gfx::ImageSkia* VistaWindowResources::images_[];
////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowFrameView
@@ -442,21 +442,21 @@ void ConstrainedWindowFrameView::PaintFrameBorder(gfx::Canvas* canvas) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
frame_background_->set_frame_color(ThemeService::GetDefaultColor(
ThemeService::COLOR_FRAME));
- SkBitmap* theme_frame = rb.GetBitmapNamed(IDR_THEME_FRAME);
- frame_background_->set_theme_bitmap(theme_frame);
- frame_background_->set_theme_overlay_bitmap(NULL);
+ gfx::ImageSkia* theme_frame = rb.GetImageSkiaNamed(IDR_THEME_FRAME);
+ frame_background_->set_theme_image(theme_frame);
+ frame_background_->set_theme_overlay_image(NULL);
frame_background_->set_top_area_height(theme_frame->height());
frame_background_->SetCornerImages(
- resources_->GetPartBitmap(FRAME_TOP_LEFT_CORNER),
- resources_->GetPartBitmap(FRAME_TOP_RIGHT_CORNER),
- resources_->GetPartBitmap(FRAME_BOTTOM_LEFT_CORNER),
- resources_->GetPartBitmap(FRAME_BOTTOM_RIGHT_CORNER));
+ resources_->GetPartImage(FRAME_TOP_LEFT_CORNER),
+ resources_->GetPartImage(FRAME_TOP_RIGHT_CORNER),
+ resources_->GetPartImage(FRAME_BOTTOM_LEFT_CORNER),
+ resources_->GetPartImage(FRAME_BOTTOM_RIGHT_CORNER));
frame_background_->SetSideImages(
- resources_->GetPartBitmap(FRAME_LEFT_EDGE),
- resources_->GetPartBitmap(FRAME_TOP_EDGE),
- resources_->GetPartBitmap(FRAME_RIGHT_EDGE),
- resources_->GetPartBitmap(FRAME_BOTTOM_EDGE));
+ resources_->GetPartImage(FRAME_LEFT_EDGE),
+ resources_->GetPartImage(FRAME_TOP_EDGE),
+ resources_->GetPartImage(FRAME_RIGHT_EDGE),
+ resources_->GetPartImage(FRAME_BOTTOM_EDGE));
frame_background_->PaintRestored(canvas, this);
}

Powered by Google App Engine
This is Rietveld 408576698