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

Unified Diff: ui/views/window/custom_frame_view.h

Issue 8772060: Refactor window frame painting into a window background class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final cleanup of PaintRestored Created 9 years 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/views.gyp ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/custom_frame_view.h
diff --git a/ui/views/window/custom_frame_view.h b/ui/views/window/custom_frame_view.h
index 1ca82bd0ef6b6f89235998089788ff7f07ab1f30..b71c451a9cae647438cd5f3127bb83ffd28875f6 100644
--- a/ui/views/window/custom_frame_view.h
+++ b/ui/views/window/custom_frame_view.h
@@ -10,6 +10,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/non_client_view.h"
+class SkBitmap;
namespace gfx {
class Canvas;
class Font;
@@ -20,6 +21,8 @@ class Point;
namespace views {
+class FrameBackground;
+
///////////////////////////////////////////////////////////////////////////////
//
// CustomFrameView
@@ -91,6 +94,10 @@ class CustomFrameView : public NonClientFrameView,
void PaintTitleBar(gfx::Canvas* canvas);
void PaintRestoredClientEdge(gfx::Canvas* canvas);
+ // Compute aspects of the frame needed to paint the frame background.
+ SkColor GetFrameColor() const;
+ SkBitmap* GetFrameBitmap() const;
+
// Layout various sub-components of this view.
void LayoutWindowControls();
void LayoutTitleBar();
@@ -114,6 +121,9 @@ class CustomFrameView : public NonClientFrameView,
// The window that owns this view.
Widget* frame_;
+ // Background painter for the window frame.
+ scoped_ptr<FrameBackground> frame_background_;
+
// Initialize various static resources.
static void InitClass();
static gfx::Font* title_font_;
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698