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

Unified Diff: ui/views/window/frame_background.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: 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
« no previous file with comments | « ui/views/window/frame_background.h ('k') | ui/views/window/window_resources.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/frame_background.cc
diff --git a/ui/views/window/frame_background.cc b/ui/views/window/frame_background.cc
index 90a55f112a08ed629752215478d89e89140909f4..59e205fbb11333538a33f04486ea4c55d7079096 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -15,8 +15,8 @@ namespace views {
FrameBackground::FrameBackground()
: frame_color_(0),
- theme_bitmap_(NULL),
- theme_overlay_bitmap_(NULL),
+ theme_image_(NULL),
+ theme_overlay_image_(NULL),
top_area_height_(0),
left_edge_(NULL),
top_edge_(NULL),
@@ -35,20 +35,20 @@ FrameBackground::FrameBackground()
FrameBackground::~FrameBackground() {
}
-void FrameBackground::SetSideImages(const SkBitmap* left,
- const SkBitmap* top,
- const SkBitmap* right,
- const SkBitmap* bottom) {
+void FrameBackground::SetSideImages(const gfx::ImageSkia* left,
+ const gfx::ImageSkia* top,
+ const gfx::ImageSkia* right,
+ const gfx::ImageSkia* bottom) {
left_edge_ = left;
top_edge_ = top;
right_edge_ = right;
bottom_edge_ = bottom;
}
-void FrameBackground::SetCornerImages(const SkBitmap* top_left,
- const SkBitmap* top_right,
- const SkBitmap* bottom_left,
- const SkBitmap* bottom_right) {
+void FrameBackground::SetCornerImages(const gfx::ImageSkia* top_left,
+ const gfx::ImageSkia* top_right,
+ const gfx::ImageSkia* bottom_left,
+ const gfx::ImageSkia* bottom_right) {
top_left_corner_ = top_left;
top_right_corner_ = top_right;
bottom_left_corner_ = bottom_left;
@@ -61,12 +61,12 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
PaintFrameColor(canvas, view);
// Draw the theme frame.
- canvas->TileImageInt(*theme_bitmap_,
- 0, 0, view->width(), theme_bitmap_->height());
+ canvas->TileImageInt(*theme_image_,
+ 0, 0, view->width(), theme_image_->height());
// Draw the theme frame overlay, if available.
- if (theme_overlay_bitmap_)
- canvas->DrawBitmapInt(*theme_overlay_bitmap_, 0, 0);
+ if (theme_overlay_image_)
+ canvas->DrawBitmapInt(*theme_overlay_image_, 0, 0);
// Draw the top corners and edge, scaling the corner images down if they
// are too big and relative to the vertical space available.
@@ -129,7 +129,7 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
// to fill in the area beneath the image.
// TODO(jamescook): I'm not sure this is correct, as it doesn't seem to fully
// account for the top_offset, but this is how it worked before.
- int theme_frame_bottom = maximized_top_offset_ + theme_bitmap_->height();
+ int theme_frame_bottom = maximized_top_offset_ + theme_image_->height();
if (top_area_height_ > theme_frame_bottom) {
canvas->FillRect(gfx::Rect(0, 0, view->width(), top_area_height_),
frame_color_);
@@ -151,14 +151,14 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
}
// Draw the theme frame.
- canvas->TileImageInt(*theme_bitmap_,
+ canvas->TileImageInt(*theme_image_,
left_offset,
maximized_top_offset_,
view->width() - (left_offset + right_offset),
- theme_bitmap_->height());
+ theme_image_->height());
// Draw the theme frame overlay, if available.
- if (theme_overlay_bitmap_)
- canvas->DrawBitmapInt(*theme_overlay_bitmap_, 0, theme_background_y_);
+ if (theme_overlay_image_)
+ canvas->DrawBitmapInt(*theme_overlay_image_, 0, theme_background_y_);
}
void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {
« no previous file with comments | « ui/views/window/frame_background.h ('k') | ui/views/window/window_resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698