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

Unified Diff: ash/frame/custom_frame_view_ash.h

Issue 2910773002: cros: CustomFrameViewAsh avatar icon from a window prop (Closed)
Patch Set: rebase Created 3 years, 7 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/frame/custom_frame_view_ash.h
diff --git a/ash/frame/custom_frame_view_ash.h b/ash/frame/custom_frame_view_ash.h
index 26337a225bacb04b2324ec55f1f06532a5766d11..2de0d6239daa30a8cd8caa07187b737362acc706 100644
--- a/ash/frame/custom_frame_view_ash.h
+++ b/ash/frame/custom_frame_view_ash.h
@@ -42,7 +42,7 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
// ImmersiveFullscreenController is created.
// If ImmersiveFullscreenControllerDelegate is not supplied, HeaderView is
// used as the ImmersiveFullscreenControllerDelegate.
- explicit CustomFrameViewAsh(
+ CustomFrameViewAsh(
James Cook 2017/05/30 21:27:15 nit: I think we still want "explicit" here, since
xiyuan 2017/05/30 22:44:14 I see. Restored "explicit".
views::Widget* frame,
ImmersiveFullscreenControllerDelegate* immersive_delegate = nullptr,
bool enable_immersive = true,
@@ -64,7 +64,8 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
// preferred height is used.
void SetHeaderHeight(base::Optional<int> height);
- views::View* header_view();
+ // Get the view of the header.
+ views::View* GetHeaderView();
// views::NonClientFrameView:
gfx::Rect GetBoundsForClientView() const override;
@@ -85,14 +86,11 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
gfx::Size GetMinimumSize() const override;
gfx::Size GetMaximumSize() const override;
void SchedulePaintInRect(const gfx::Rect& r) override;
- void VisibilityChanged(views::View* starting_from, bool is_visible) override;
-
- // Get the view of the header.
- views::View* GetHeaderView();
const views::View* GetAvatarIconViewForTest() const;
private:
+ class AvatarObserver;
class OverlayView;
friend class TestWidgetConstraintsDelegate;
friend class CustomFrameViewAshSizeLock;
@@ -118,6 +116,9 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
ImmersiveFullscreenControllerDelegate* immersive_delegate_;
+ // Observes avatar icon change and updates |header_view_|.
+ std::unique_ptr<AvatarObserver> avatar_observer_;
+
static bool use_empty_minimum_size_for_test_;
DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh);

Powered by Google App Engine
This is Rietveld 408576698