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

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

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CUSTOM_FRAME_VIEW_ASH_H_ 5 #ifndef ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ 6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/views/window/non_client_view.h" 10 #include "ui/views/window/non_client_view.h"
11 11
12 namespace ash { 12 namespace ash {
13 class FrameBorderHitTestController; 13 class FrameBorderHitTestController;
14 class HeaderPainter;
15 class ImmersiveFullscreenController; 14 class ImmersiveFullscreenController;
16 } 15 }
17 namespace views { 16 namespace views {
17 class ImageView;
18 class Widget; 18 class Widget;
19 } 19 }
20 20
21 namespace ash { 21 namespace ash {
22 22
23 // A NonClientFrameView used for packaged apps, dialogs and other non-browser 23 // A NonClientFrameView used for packaged apps, dialogs and other non-browser
24 // windows. It supports immersive fullscreen. When in immersive fullscreen, the 24 // windows. It supports immersive fullscreen. When in immersive fullscreen, the
25 // client view takes up the entire widget and the window header is an overlay. 25 // client view takes up the entire widget and the window header is an overlay.
26 // The window header overlay slides onscreen when the user hovers the mouse at 26 // The window header overlay slides onscreen when the user hovers the mouse at
27 // the top of the screen. See also views::CustomFrameView and 27 // the top of the screen. See also views::CustomFrameView and
(...skipping 24 matching lines...) Expand all
52 virtual void UpdateWindowIcon() OVERRIDE; 52 virtual void UpdateWindowIcon() OVERRIDE;
53 virtual void UpdateWindowTitle() OVERRIDE; 53 virtual void UpdateWindowTitle() OVERRIDE;
54 54
55 // views::View overrides: 55 // views::View overrides:
56 virtual gfx::Size GetPreferredSize() OVERRIDE; 56 virtual gfx::Size GetPreferredSize() OVERRIDE;
57 virtual const char* GetClassName() const OVERRIDE; 57 virtual const char* GetClassName() const OVERRIDE;
58 virtual gfx::Size GetMinimumSize() OVERRIDE; 58 virtual gfx::Size GetMinimumSize() OVERRIDE;
59 virtual gfx::Size GetMaximumSize() OVERRIDE; 59 virtual gfx::Size GetMaximumSize() OVERRIDE;
60 virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE; 60 virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE;
61 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; 61 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
62 virtual void VisibilityChanged(views::View* starting_from,
63 bool is_visible) OVERRIDE;
62 64
63 // Get the view of the header. 65 // Get the view of the header.
64 views::View* GetHeaderView(); 66 views::View* GetHeaderView();
65 67
68 const views::View* GetAvatarIconViewForTest() const;
oshima 2014/03/14 20:40:44 I'm doing here as I've been told this is better th
Mr4D (OOO till 08-26) 2014/03/14 22:01:30 I usually do it this way. All the testing related
69
66 private: 70 private:
67 class OverlayView; 71 class OverlayView;
68 friend class TestWidgetConstraintsDelegate; 72 friend class TestWidgetConstraintsDelegate;
69 73
70 // Height from top of window to top of client area. 74 // Height from top of window to top of client area.
71 int NonClientTopBorderHeight() const; 75 int NonClientTopBorderHeight() const;
72 76
73 // Not owned. 77 // Not owned.
74 views::Widget* frame_; 78 views::Widget* frame_;
75 79
76 // View which contains the title and window controls. 80 // View which contains the title and window controls.
77 class HeaderView; 81 class HeaderView;
78 HeaderView* header_view_; 82 HeaderView* header_view_;
79 83
80 // Updates the hittest bounds overrides based on the window state type. 84 // Updates the hittest bounds overrides based on the window state type.
81 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_; 85 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); 87 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh);
84 }; 88 };
85 89
86 } // namespace ash 90 } // namespace ash
87 91
88 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ 92 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698