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

Unified Diff: ash/wm/header_painter.h

Issue 148003003: Use white header for app windows part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: ash/wm/header_painter.h
diff --git a/ash/wm/header_painter.h b/ash/wm/header_painter.h
index a9053baee5aa3e764c6a29d924a656a806bbd20c..53ac9d569283d07cdf2e80f25f157540e6e7e996 100644
--- a/ash/wm/header_painter.h
+++ b/ash/wm/header_painter.h
@@ -32,6 +32,11 @@ class FrameCaptionButtonContainerView;
// Helper class for painting the window header.
class ASH_EXPORT HeaderPainter : public gfx::AnimationDelegate {
public:
+ enum Mode {
James Cook 2014/02/03 18:46:35 Maybe comment that this is the window active state
+ MODE_ACTIVE,
+ MODE_INACTIVE
+ };
+
// TODO(pkotwicz): Move code related to "browser" windows out of ash.
enum Style {
// Header style used for browser windows.
@@ -83,15 +88,15 @@ class ASH_EXPORT HeaderPainter : public gfx::AnimationDelegate {
// Paints the header.
// |theme_frame_overlay_id| is 0 if no overlay image should be used.
void PaintHeader(gfx::Canvas* canvas,
+ Mode mode,
int theme_frame_id,
int theme_frame_overlay_id);
- // Paints the header/content separator line. Exists as a separate function
- // because some windows with complex headers (e.g. browsers with tab strips)
- // need to draw their own line.
- void PaintHeaderContentSeparator(gfx::Canvas* canvas);
+ // Paints the header/content separator line for non-browser windows.
+ void PaintHeaderContentSeparator(gfx::Canvas* canvas, Mode mode);
- // Returns size of the header/content separator line in pixels.
+ // Returns size of the header/content separator line for non-browser windows
+ // in pixels.
int HeaderContentSeparatorSize() const;
// Paint the title bar, primarily the title string.
@@ -123,6 +128,9 @@ class ASH_EXPORT HeaderPainter : public gfx::AnimationDelegate {
private:
FRIEND_TEST_ALL_PREFIXES(HeaderPainterTest, TitleIconAlignment);
+ // Paints the border around the header.
+ void PaintBorder(gfx::Canvas* canvas, Mode mode);
+
// Updates the images used for the minimize, restore and close buttons.
void UpdateCaptionButtonImages();
@@ -156,13 +164,6 @@ class ASH_EXPORT HeaderPainter : public gfx::AnimationDelegate {
// The height of the header.
int header_height_;
- // Window frame header/caption parts.
- const gfx::ImageSkia* top_left_corner_;
- const gfx::ImageSkia* top_edge_;
- const gfx::ImageSkia* top_right_corner_;
- const gfx::ImageSkia* header_left_edge_;
- const gfx::ImageSkia* header_right_edge_;
-
// Image ids and opacity last used for painting header.
int previous_theme_frame_id_;
int previous_theme_frame_overlay_id_;

Powered by Google App Engine
This is Rietveld 408576698