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

Unified Diff: ui/views/window/frame_background.cc

Issue 1624773002: Clean up frame code a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync, fix compile Created 4 years, 11 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') | no next file » | 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 a325dbf9b3d413b6f9664608eba79479b1a25880..0b2d4aec7555dd05a6bd5646bb627e84114351b2 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -51,7 +51,8 @@ void FrameBackground::SetCornerImages(const gfx::ImageSkia* top_left,
bottom_right_corner_ = bottom_right;
}
-void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
+void FrameBackground::PaintRestored(gfx::Canvas* canvas,
+ const View* view) const {
// Fill with the frame color first so we have a constant background for
// areas not covered by the theme image.
PaintFrameColor(canvas, view);
@@ -119,7 +120,8 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
left_edge_->width(), left_edge_height);
}
-void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
+void FrameBackground::PaintMaximized(gfx::Canvas* canvas,
+ const View* view) const {
// We will be painting from -|maximized_top_inset_| to
// -|maximized_top_inset_| + |theme_image_|->height(). If this is less than
// |top_area_height_|, we need to paint the frame color to fill in the area
@@ -141,7 +143,8 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
canvas->DrawImageInt(*theme_overlay_image_, 0, -maximized_top_inset_);
}
-void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {
+void FrameBackground::PaintFrameColor(gfx::Canvas* canvas,
+ const View* view) const {
// Fill the top area.
canvas->FillRect(gfx::Rect(0, 0, view->width(), top_area_height_),
frame_color_);
« no previous file with comments | « ui/views/window/frame_background.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698