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

Side by Side Diff: ui/views/window/frame_background.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/views/views_export.h" 11 #include "ui/views/views_export.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 namespace gfx { 14 namespace gfx {
15 class Canvas; 15 class CanvasSkia;
16 } 16 }
17 17
18 namespace views { 18 namespace views {
19 19
20 class View; 20 class View;
21 21
22 // FrameBackground handles painting for all the various window frames we 22 // FrameBackground handles painting for all the various window frames we
23 // support in Chrome. It intends to consolidate paint code that historically 23 // support in Chrome. It intends to consolidate paint code that historically
24 // was copied. One frame to rule them all! 24 // was copied. One frame to rule them all!
25 class VIEWS_EXPORT FrameBackground { 25 class VIEWS_EXPORT FrameBackground {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // windows. Use 0 and NULL if you don't want special corners. 69 // windows. Use 0 and NULL if you don't want special corners.
70 // TODO(jamescook): This is the remnant of a ChromeOS window hack, and should 70 // TODO(jamescook): This is the remnant of a ChromeOS window hack, and should
71 // be removed. 71 // be removed.
72 void SetMaximizedCorners(SkBitmap* top_left, 72 void SetMaximizedCorners(SkBitmap* top_left,
73 SkBitmap* top_right, 73 SkBitmap* top_right,
74 int top_offset); 74 int top_offset);
75 75
76 // Paints the border for a standard, non-maximized window. Also paints the 76 // Paints the border for a standard, non-maximized window. Also paints the
77 // background of the title bar area, since the top frame border and the 77 // background of the title bar area, since the top frame border and the
78 // title bar background are a contiguous component. 78 // title bar background are a contiguous component.
79 void PaintRestored(gfx::Canvas* canvas, View* view) const; 79 void PaintRestored(gfx::CanvasSkia* canvas, View* view) const;
80 80
81 // Paints the border for a maximized window, which does not include the 81 // Paints the border for a maximized window, which does not include the
82 // window edges. 82 // window edges.
83 void PaintMaximized(gfx::Canvas* canvas, View* view) const; 83 void PaintMaximized(gfx::CanvasSkia* canvas, View* view) const;
84 84
85 private: 85 private:
86 // Fills the frame area with the frame color. 86 // Fills the frame area with the frame color.
87 void PaintFrameColor(gfx::Canvas* canvas, View* view) const; 87 void PaintFrameColor(gfx::CanvasSkia* canvas, View* view) const;
88 88
89 SkColor frame_color_; 89 SkColor frame_color_;
90 SkBitmap* theme_bitmap_; 90 SkBitmap* theme_bitmap_;
91 SkBitmap* theme_overlay_bitmap_; 91 SkBitmap* theme_overlay_bitmap_;
92 int top_area_height_; 92 int top_area_height_;
93 93
94 // Images for the sides of the frame. 94 // Images for the sides of the frame.
95 SkBitmap* left_edge_; 95 SkBitmap* left_edge_;
96 SkBitmap* top_edge_; 96 SkBitmap* top_edge_;
97 SkBitmap* right_edge_; 97 SkBitmap* right_edge_;
(...skipping 11 matching lines...) Expand all
109 SkBitmap* maximized_top_right_; 109 SkBitmap* maximized_top_right_;
110 int maximized_top_offset_; 110 int maximized_top_offset_;
111 int theme_background_y_; 111 int theme_background_y_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(FrameBackground); 113 DISALLOW_COPY_AND_ASSIGN(FrameBackground);
114 }; 114 };
115 115
116 } // namespace views 116 } // namespace views
117 117
118 #endif // UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_ 118 #endif // UI_VIEWS_WINDOW_FRAME_BACKGROUND_H_
OLDNEW
« ash/app_list/app_list_item_view.h ('K') | « ui/views/window/dialog_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698