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

Side by Side Diff: ash/frame/default_header_painter.h

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | ash/frame/default_header_painter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 5 #ifndef ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
6 #define ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 6 #define ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/frame/header_painter.h" 9 #include "ash/frame/header_painter.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 FrameCaptionButtonContainerView* caption_button_container); 39 FrameCaptionButtonContainerView* caption_button_container);
40 40
41 // HeaderPainter overrides: 41 // HeaderPainter overrides:
42 virtual int GetMinimumHeaderWidth() const OVERRIDE; 42 virtual int GetMinimumHeaderWidth() const OVERRIDE;
43 virtual void PaintHeader(gfx::Canvas* canvas, Mode mode) OVERRIDE; 43 virtual void PaintHeader(gfx::Canvas* canvas, Mode mode) OVERRIDE;
44 virtual void LayoutHeader() OVERRIDE; 44 virtual void LayoutHeader() OVERRIDE;
45 virtual int GetHeaderHeightForPainting() const OVERRIDE; 45 virtual int GetHeaderHeightForPainting() const OVERRIDE;
46 virtual void SetHeaderHeightForPainting(int height) OVERRIDE; 46 virtual void SetHeaderHeightForPainting(int height) OVERRIDE;
47 virtual void SchedulePaintForTitle() OVERRIDE; 47 virtual void SchedulePaintForTitle() OVERRIDE;
48 48
49 // Sets the window icon for the header. Passing NULL removes the window icon.
50 void UpdateWindowIcon(views::View* window_icon, int icon_size);
51
49 private: 52 private:
50 FRIEND_TEST_ALL_PREFIXES(DefaultHeaderPainterTest, TitleIconAlignment); 53 FRIEND_TEST_ALL_PREFIXES(DefaultHeaderPainterTest, TitleIconAlignment);
51 54
52 // gfx::AnimationDelegate override: 55 // gfx::AnimationDelegate override:
53 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; 56 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
54 57
55 // Paints highlight around the edge of the header for inactive restored 58 // Paints highlight around the edge of the header for inactive restored
56 // windows. 59 // windows.
57 void PaintHighlightForInactiveRestoredWindow(gfx::Canvas* canvas); 60 void PaintHighlightForInactiveRestoredWindow(gfx::Canvas* canvas);
58 61
59 // Paints the title bar, primarily the title string. 62 // Paints the title bar, primarily the title string.
60 void PaintTitleBar(gfx::Canvas* canvas); 63 void PaintTitleBar(gfx::Canvas* canvas);
61 64
62 // Paints the header/content separator. 65 // Paints the header/content separator.
63 void PaintHeaderContentSeparator(gfx::Canvas* canvas); 66 void PaintHeaderContentSeparator(gfx::Canvas* canvas);
64 67
65 // Returns the header bounds in the coordinates of |view_|. The header is 68 // Returns the header bounds in the coordinates of |view_|. The header is
66 // assumed to be positioned at the top left corner of |view_| and to have the 69 // assumed to be positioned at the top left corner of |view_| and to have the
67 // same width as |view_|. 70 // same width as |view_|.
68 gfx::Rect GetLocalBounds() const; 71 gfx::Rect GetLocalBounds() const;
69 72
70 // Returns the bounds for the title. 73 // Returns the bounds for the title.
71 gfx::Rect GetTitleBounds() const; 74 gfx::Rect GetTitleBounds() const;
72 75
73 views::Widget* frame_; 76 views::Widget* frame_;
74 views::View* view_; 77 views::View* view_;
75 views::View* window_icon_; // May be NULL. 78 views::View* window_icon_; // May be NULL.
79 int window_icon_size_;
76 FrameCaptionButtonContainerView* caption_button_container_; 80 FrameCaptionButtonContainerView* caption_button_container_;
77 81
78 // The height of the header including the header/content separator. 82 // The height of the header including the header/content separator.
79 int height_; 83 int height_;
80 84
81 // Whether the header should be painted as active. 85 // Whether the header should be painted as active.
82 Mode mode_; 86 Mode mode_;
83 87
84 // Whether the header is painted for the first time. 88 // Whether the header is painted for the first time.
85 bool initial_paint_; 89 bool initial_paint_;
86 90
87 scoped_ptr<gfx::SlideAnimation> activation_animation_; 91 scoped_ptr<gfx::SlideAnimation> activation_animation_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(DefaultHeaderPainter); 93 DISALLOW_COPY_AND_ASSIGN(DefaultHeaderPainter);
90 }; 94 };
91 95
92 } // namespace ash 96 } // namespace ash
93 97
94 #endif // ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 98 #endif // ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | ash/frame/default_header_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698