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

Side by Side Diff: ash/common/shelf/shelf_widget.h

Issue 2625733003: Re-reland: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: rebase, fix conflict with sky Created 3 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 unified diff | Download patch
« no previous file with comments | « ash/aura/wm_shell_aura.cc ('k') | ash/common/shelf/shelf_widget.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 (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_COMMON_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_WIDGET_H_
6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_ 6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 11 matching lines...) Expand all
22 22
23 namespace ash { 23 namespace ash {
24 class AppListButton; 24 class AppListButton;
25 class FocusCycler; 25 class FocusCycler;
26 class ShelfLayoutManager; 26 class ShelfLayoutManager;
27 class ShelfView; 27 class ShelfView;
28 class StatusAreaWidget; 28 class StatusAreaWidget;
29 class WmShelf; 29 class WmShelf;
30 class WmWindow; 30 class WmWindow;
31 31
32 // The ShelfWidget manages the shelf view (which contains the shelf icons) and
33 // the status area widget. There is one ShelfWidget per display. It is created
34 // early during RootWindowController initialization.
32 class ASH_EXPORT ShelfWidget : public views::Widget, 35 class ASH_EXPORT ShelfWidget : public views::Widget,
33 public views::WidgetObserver, 36 public views::WidgetObserver,
34 public ShelfBackgroundAnimatorObserver, 37 public ShelfBackgroundAnimatorObserver,
35 public ShelfLayoutManagerObserver { 38 public ShelfLayoutManagerObserver {
36 public: 39 public:
37 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf); 40 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf);
38 ~ShelfWidget() override; 41 ~ShelfWidget() override;
39 42
40 void CreateStatusAreaWidget(WmWindow* status_container); 43 void CreateStatusAreaWidget(WmWindow* status_container);
41 44
42 void OnShelfAlignmentChanged(); 45 void OnShelfAlignmentChanged();
43 46
44 // DEPRECATED: Prefer WmShelf::GetAlignment(). 47 // DEPRECATED: Prefer WmShelf::GetAlignment().
45 ShelfAlignment GetAlignment() const; 48 ShelfAlignment GetAlignment() const;
46 49
47 // Sets the shelf's background type. 50 // Sets the shelf's background type.
48 void SetPaintsBackground(ShelfBackgroundType background_type, 51 void SetPaintsBackground(ShelfBackgroundType background_type,
49 BackgroundAnimatorChangeType change_type); 52 BackgroundAnimatorChangeType change_type);
50 ShelfBackgroundType GetBackgroundType() const; 53 ShelfBackgroundType GetBackgroundType() const;
51 54
52 // Hide the shelf behind a black bar during e.g. a user transition when |hide| 55 // Hide the shelf behind a black bar during e.g. a user transition when |hide|
53 // is true. The |animation_time_ms| will be used as animation duration. 56 // is true. The |animation_time_ms| will be used as animation duration.
54 void HideShelfBehindBlackBar(bool hide, int animation_time_ms); 57 void HideShelfBehindBlackBar(bool hide, int animation_time_ms);
55 bool IsShelfHiddenBehindBlackBar() const; 58 bool IsShelfHiddenBehindBlackBar() const;
56 59
57 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } 60 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
58 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } 61 StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
59 62
63 // Creates the shelf view and populates it with icons. Called after the user
64 // session is active (and hence the user profile is available).
60 ShelfView* CreateShelfView(); 65 ShelfView* CreateShelfView();
61 void PostCreateShelf(); 66 void PostCreateShelf();
62 67
63 // Set visibility of the shelf.
64 void SetShelfVisibility(bool visible);
65 bool IsShelfVisible() const; 68 bool IsShelfVisible() const;
66 69
67 bool IsShowingAppList() const; 70 bool IsShowingAppList() const;
68 bool IsShowingContextMenu() const; 71 bool IsShowingContextMenu() const;
69 bool IsShowingOverflowBubble() const; 72 bool IsShowingOverflowBubble() const;
70 73
71 // Sets the focus cycler. Also adds the shelf to the cycle. 74 // Sets the focus cycler. Also adds the shelf to the cycle.
72 void SetFocusCycler(FocusCycler* focus_cycler); 75 void SetFocusCycler(FocusCycler* focus_cycler);
73 FocusCycler* GetFocusCycler(); 76 FocusCycler* GetFocusCycler();
74 77
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 111
109 // Owned by the shelf container's window. 112 // Owned by the shelf container's window.
110 ShelfLayoutManager* shelf_layout_manager_; 113 ShelfLayoutManager* shelf_layout_manager_;
111 114
112 // Owned by the native widget. 115 // Owned by the native widget.
113 StatusAreaWidget* status_area_widget_; 116 StatusAreaWidget* status_area_widget_;
114 117
115 // |delegate_view_| is the contents view of this widget and is cleaned up 118 // |delegate_view_| is the contents view of this widget and is cleaned up
116 // during CloseChildWindows of the associated RootWindowController. 119 // during CloseChildWindows of the associated RootWindowController.
117 DelegateView* delegate_view_; 120 DelegateView* delegate_view_;
118 // View containing the shelf items. Owned by the views hierarchy. 121 // View containing the shelf items. Owned by the views hierarchy. Null when
122 // at the login screen.
119 ShelfView* shelf_view_; 123 ShelfView* shelf_view_;
120 ShelfBackgroundAnimator background_animator_; 124 ShelfBackgroundAnimator background_animator_;
121 bool activating_as_fallback_; 125 bool activating_as_fallback_;
122 126
123 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 127 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
124 }; 128 };
125 129
126 } // namespace ash 130 } // namespace ash
127 131
128 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_ 132 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.cc ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698