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

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

Issue 2910773002: cros: CustomFrameViewAsh avatar icon from a window prop (Closed)
Patch Set: rebase Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_HEADER_VIEW_H_ 5 #ifndef ASH_FRAME_HEADER_VIEW_H_
6 #define ASH_FRAME_HEADER_VIEW_H_ 6 #define ASH_FRAME_HEADER_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector>
James Cook 2017/05/30 21:27:15 super nit: not needed, comes from interface declar
xiyuan 2017/05/30 22:44:14 Removed. Added those because "git cl lint" complai
9 10
10 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
11 #include "ash/public/interfaces/window_style.mojom.h" 12 #include "ash/public/interfaces/window_style.mojom.h"
12 #include "ash/shared/immersive_fullscreen_controller_delegate.h" 13 #include "ash/shared/immersive_fullscreen_controller_delegate.h"
13 #include "ash/shell_observer.h" 14 #include "ash/shell_observer.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/views/view.h" 17 #include "ui/views/view.h"
17 18
19 namespace gfx {
20 class Canvas;
James Cook 2017/05/30 21:27:15 super nit: not needed (comes from interface declar
xiyuan 2017/05/30 22:44:14 Removed.
21 class ImageSkia;
22 }
23
18 namespace views { 24 namespace views {
19 class ImageView; 25 class ImageView;
20 class Widget; 26 class Widget;
21 } 27 }
22 28
23 namespace ash { 29 namespace ash {
24 30
25 class DefaultHeaderPainter; 31 class DefaultHeaderPainter;
26 class FrameCaptionButtonContainerView; 32 class FrameCaptionButtonContainerView;
27 33
(...skipping 23 matching lines...) Expand all
51 57
52 // Returns the amount of the view's pixels which should be on screen. 58 // Returns the amount of the view's pixels which should be on screen.
53 int GetPreferredOnScreenHeight(); 59 int GetPreferredOnScreenHeight();
54 60
55 // Returns the view's preferred height. 61 // Returns the view's preferred height.
56 int GetPreferredHeight(); 62 int GetPreferredHeight();
57 63
58 // Returns the view's minimum width. 64 // Returns the view's minimum width.
59 int GetMinimumWidth() const; 65 int GetMinimumWidth() const;
60 66
61 void UpdateAvatarIcon(); 67 // Sets the avatar icon to be displayed on the frame header.
68 void SetAvatarIcon(const gfx::ImageSkia& avatar);
62 69
63 void SizeConstraintsChanged(); 70 void SizeConstraintsChanged();
64 71
65 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color); 72 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color);
66 SkColor GetActiveFrameColor() const; 73 SkColor GetActiveFrameColor() const;
67 SkColor GetInactiveFrameColor() const; 74 SkColor GetInactiveFrameColor() const;
68 75
69 // views::View: 76 // views::View:
70 void Layout() override; 77 void Layout() override;
71 void OnPaint(gfx::Canvas* canvas) override; 78 void OnPaint(gfx::Canvas* canvas) override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool is_immersive_delegate_ = true; 117 bool is_immersive_delegate_ = true;
111 118
112 bool did_layout_ = false; 119 bool did_layout_ = false;
113 120
114 DISALLOW_COPY_AND_ASSIGN(HeaderView); 121 DISALLOW_COPY_AND_ASSIGN(HeaderView);
115 }; 122 };
116 123
117 } // namespace ash 124 } // namespace ash
118 125
119 #endif // ASH_FRAME_HEADER_VIEW_H_ 126 #endif // ASH_FRAME_HEADER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698