OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ | 5 #ifndef UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ |
6 #define UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ | 6 #define UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Sets images used when drawing the corners of the frame. | 57 // Sets images used when drawing the corners of the frame. |
58 // Caller owns the memory. | 58 // Caller owns the memory. |
59 void SetCornerImages(const gfx::ImageSkia* top_left, | 59 void SetCornerImages(const gfx::ImageSkia* top_left, |
60 const gfx::ImageSkia* top_right, | 60 const gfx::ImageSkia* top_right, |
61 const gfx::ImageSkia* bottom_left, | 61 const gfx::ImageSkia* bottom_left, |
62 const gfx::ImageSkia* bottom_right); | 62 const gfx::ImageSkia* bottom_right); |
63 | 63 |
64 // Paints the border for a standard, non-maximized window. Also paints the | 64 // Paints the border for a standard, non-maximized window. Also paints the |
65 // background of the title bar area, since the top frame border and the | 65 // background of the title bar area, since the top frame border and the |
66 // title bar background are a contiguous component. | 66 // title bar background are a contiguous component. |
67 void PaintRestored(gfx::Canvas* canvas, View* view) const; | 67 void PaintRestored(gfx::Canvas* canvas, const View* view) const; |
68 | 68 |
69 // Paints the border for a maximized window, which does not include the | 69 // Paints the border for a maximized window, which does not include the |
70 // window edges. | 70 // window edges. |
71 void PaintMaximized(gfx::Canvas* canvas, View* view) const; | 71 void PaintMaximized(gfx::Canvas* canvas, const View* view) const; |
72 | 72 |
73 private: | 73 private: |
74 // Fills the frame area with the frame color. | 74 // Fills the frame area with the frame color. |
75 void PaintFrameColor(gfx::Canvas* canvas, View* view) const; | 75 void PaintFrameColor(gfx::Canvas* canvas, const View* view) const; |
76 | 76 |
77 SkColor frame_color_; | 77 SkColor frame_color_; |
78 const gfx::ImageSkia* theme_image_; | 78 const gfx::ImageSkia* theme_image_; |
79 gfx::ImageSkia* theme_overlay_image_; | 79 gfx::ImageSkia* theme_overlay_image_; |
80 int top_area_height_; | 80 int top_area_height_; |
81 | 81 |
82 // Images for the sides of the frame. | 82 // Images for the sides of the frame. |
83 const gfx::ImageSkia* left_edge_; | 83 const gfx::ImageSkia* left_edge_; |
84 const gfx::ImageSkia* top_edge_; | 84 const gfx::ImageSkia* top_edge_; |
85 const gfx::ImageSkia* right_edge_; | 85 const gfx::ImageSkia* right_edge_; |
86 const gfx::ImageSkia* bottom_edge_; | 86 const gfx::ImageSkia* bottom_edge_; |
87 | 87 |
88 // Images for the corners of the frame. | 88 // Images for the corners of the frame. |
89 const gfx::ImageSkia* top_left_corner_; | 89 const gfx::ImageSkia* top_left_corner_; |
90 const gfx::ImageSkia* top_right_corner_; | 90 const gfx::ImageSkia* top_right_corner_; |
91 const gfx::ImageSkia* bottom_left_corner_; | 91 const gfx::ImageSkia* bottom_left_corner_; |
92 const gfx::ImageSkia* bottom_right_corner_; | 92 const gfx::ImageSkia* bottom_right_corner_; |
93 | 93 |
94 // Vertical inset for theme image when drawing maximized. | 94 // Vertical inset for theme image when drawing maximized. |
95 int maximized_top_inset_; | 95 int maximized_top_inset_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(FrameBackground); | 97 DISALLOW_COPY_AND_ASSIGN(FrameBackground); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace views | 100 } // namespace views |
101 | 101 |
102 #endif // UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ | 102 #endif // UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ |
OLD | NEW |