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

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

Issue 2628933003: Revert of Reland: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: 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.
35 class ASH_EXPORT ShelfWidget : public views::Widget, 32 class ASH_EXPORT ShelfWidget : public views::Widget,
36 public views::WidgetObserver, 33 public views::WidgetObserver,
37 public ShelfBackgroundAnimatorObserver, 34 public ShelfBackgroundAnimatorObserver,
38 public ShelfLayoutManagerObserver { 35 public ShelfLayoutManagerObserver {
39 public: 36 public:
40 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf); 37 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf);
41 ~ShelfWidget() override; 38 ~ShelfWidget() override;
42 39
43 void CreateStatusAreaWidget(WmWindow* status_container); 40 void CreateStatusAreaWidget(WmWindow* status_container);
44 41
45 void OnShelfAlignmentChanged(); 42 void OnShelfAlignmentChanged();
46 43
47 // DEPRECATED: Prefer WmShelf::GetAlignment(). 44 // DEPRECATED: Prefer WmShelf::GetAlignment().
48 ShelfAlignment GetAlignment() const; 45 ShelfAlignment GetAlignment() const;
49 46
50 // Sets the shelf's background type. 47 // Sets the shelf's background type.
51 void SetPaintsBackground(ShelfBackgroundType background_type, 48 void SetPaintsBackground(ShelfBackgroundType background_type,
52 BackgroundAnimatorChangeType change_type); 49 BackgroundAnimatorChangeType change_type);
53 ShelfBackgroundType GetBackgroundType() const; 50 ShelfBackgroundType GetBackgroundType() const;
54 51
55 // Hide the shelf behind a black bar during e.g. a user transition when |hide| 52 // Hide the shelf behind a black bar during e.g. a user transition when |hide|
56 // is true. The |animation_time_ms| will be used as animation duration. 53 // is true. The |animation_time_ms| will be used as animation duration.
57 void HideShelfBehindBlackBar(bool hide, int animation_time_ms); 54 void HideShelfBehindBlackBar(bool hide, int animation_time_ms);
58 bool IsShelfHiddenBehindBlackBar() const; 55 bool IsShelfHiddenBehindBlackBar() const;
59 56
60 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } 57 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
61 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } 58 StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
62 59
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).
65 ShelfView* CreateShelfView(); 60 ShelfView* CreateShelfView();
66 void PostCreateShelf(); 61 void PostCreateShelf();
67 62
63 // Set visibility of the shelf.
64 void SetShelfVisibility(bool visible);
68 bool IsShelfVisible() const; 65 bool IsShelfVisible() const;
69 66
70 bool IsShowingAppList() const; 67 bool IsShowingAppList() const;
71 bool IsShowingContextMenu() const; 68 bool IsShowingContextMenu() const;
72 bool IsShowingOverflowBubble() const; 69 bool IsShowingOverflowBubble() const;
73 70
74 // Sets the focus cycler. Also adds the shelf to the cycle. 71 // Sets the focus cycler. Also adds the shelf to the cycle.
75 void SetFocusCycler(FocusCycler* focus_cycler); 72 void SetFocusCycler(FocusCycler* focus_cycler);
76 FocusCycler* GetFocusCycler(); 73 FocusCycler* GetFocusCycler();
77 74
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 108
112 // Owned by the shelf container's window. 109 // Owned by the shelf container's window.
113 ShelfLayoutManager* shelf_layout_manager_; 110 ShelfLayoutManager* shelf_layout_manager_;
114 111
115 // Owned by the native widget. 112 // Owned by the native widget.
116 StatusAreaWidget* status_area_widget_; 113 StatusAreaWidget* status_area_widget_;
117 114
118 // |delegate_view_| is the contents view of this widget and is cleaned up 115 // |delegate_view_| is the contents view of this widget and is cleaned up
119 // during CloseChildWindows of the associated RootWindowController. 116 // during CloseChildWindows of the associated RootWindowController.
120 DelegateView* delegate_view_; 117 DelegateView* delegate_view_;
121 // View containing the shelf items. Owned by the views hierarchy. Null when 118 // View containing the shelf items. Owned by the views hierarchy.
122 // at the login screen.
123 ShelfView* shelf_view_; 119 ShelfView* shelf_view_;
124 ShelfBackgroundAnimator background_animator_; 120 ShelfBackgroundAnimator background_animator_;
125 bool activating_as_fallback_; 121 bool activating_as_fallback_;
126 122
127 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 123 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
128 }; 124 };
129 125
130 } // namespace ash 126 } // namespace ash
131 127
132 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_ 128 #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