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

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

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WindowManager WmShell::Shutdown; delay PointerWatcherEventRouter teardown; cleanup shutdown wor… Created 4 years, 4 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 (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_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_SHELF_SHELF_WIDGET_H_
6 #define ASH_SHELF_SHELF_WIDGET_H_ 6 #define ASH_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"
11 #include "ash/common/shelf/shelf_background_animator.h" 11 #include "ash/common/shelf/shelf_background_animator.h"
12 #include "ash/common/shelf/shelf_background_animator_observer.h" 12 #include "ash/common/shelf/shelf_background_animator_observer.h"
13 #include "ash/common/shelf/shelf_types.h" 13 #include "ash/common/shelf/shelf_types.h"
14 #include "ash/shelf/shelf_layout_manager_observer.h" 14 #include "ash/shelf/shelf_layout_manager_observer.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 #include "ui/views/widget/widget_observer.h" 17 #include "ui/views/widget/widget_observer.h"
18 18
19 namespace ash { 19 namespace ash {
20 class FocusCycler; 20 class FocusCycler;
21 class Shelf; 21 class Shelf;
22 class ShelfLayoutManager; 22 class ShelfLayoutManager;
23 class ShelfView; 23 class ShelfView;
24 class StatusAreaWidget; 24 class StatusAreaWidget;
25 class WmShelfAura; 25 class WmShelf;
26 class WmWindow; 26 class WmWindow;
27 27
28 class ASH_EXPORT ShelfWidget : public views::Widget, 28 class ASH_EXPORT ShelfWidget : public views::Widget,
29 public views::WidgetObserver, 29 public views::WidgetObserver,
30 public ShelfBackgroundAnimatorObserver, 30 public ShelfBackgroundAnimatorObserver,
31 public ShelfLayoutManagerObserver { 31 public ShelfLayoutManagerObserver {
32 public: 32 public:
33 ShelfWidget(WmWindow* shelf_container, 33 ShelfWidget(WmWindow* shelf_container,
34 WmWindow* status_container, 34 WmWindow* status_container,
35 WmShelfAura* wm_shelf_aura); 35 WmShelf* wm_shelf);
36 ~ShelfWidget() override; 36 ~ShelfWidget() override;
37 37
38 // Returns if shelf alignment option is enabled, and the user is able to 38 // Returns if shelf alignment option is enabled, and the user is able to
39 // adjust the alignment (guest and supervised mode users cannot for example). 39 // adjust the alignment (guest and supervised mode users cannot for example).
40 static bool ShelfAlignmentAllowed(); 40 static bool ShelfAlignmentAllowed();
41 41
42 void OnShelfAlignmentChanged(); 42 void OnShelfAlignmentChanged();
43 43
44 // DEPRECATED: Prefer WmShelf::GetAlignment(). 44 // DEPRECATED: Prefer WmShelf::GetAlignment().
45 ShelfAlignment GetAlignment() const; 45 ShelfAlignment GetAlignment() const;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // ShelfBackgroundAnimatorObserver overrides: 103 // ShelfBackgroundAnimatorObserver overrides:
104 void UpdateShelfItemBackground(int alpha) override; 104 void UpdateShelfItemBackground(int alpha) override;
105 105
106 // ShelfLayoutManagerObserver overrides: 106 // ShelfLayoutManagerObserver overrides:
107 void WillDeleteShelfLayoutManager() override; 107 void WillDeleteShelfLayoutManager() override;
108 108
109 private: 109 private:
110 class DelegateView; 110 class DelegateView;
111 friend class DelegateView; 111 friend class DelegateView;
112 112
113 WmShelfAura* wm_shelf_aura_; 113 WmShelf* wm_shelf_;
114 114
115 // Owned by the shelf container's aura::Window. 115 // Owned by the shelf container's window.
116 ShelfLayoutManager* shelf_layout_manager_; 116 ShelfLayoutManager* shelf_layout_manager_;
117 // Owned by the root window controller. 117 // Owned by the root window controller.
118 Shelf* shelf_; 118 Shelf* shelf_;
119 StatusAreaWidget* status_area_widget_; 119 StatusAreaWidget* status_area_widget_;
120 120
121 // |delegate_view_| is the contents view of this widget and is cleaned up 121 // |delegate_view_| is the contents view of this widget and is cleaned up
122 // during CloseChildWindows of the associated RootWindowController. 122 // during CloseChildWindows of the associated RootWindowController.
123 DelegateView* delegate_view_; 123 DelegateView* delegate_view_;
124 // View containing the shelf items. Owned by the views hierarchy. 124 // View containing the shelf items. Owned by the views hierarchy.
125 ShelfView* shelf_view_; 125 ShelfView* shelf_view_;
126 ShelfBackgroundAnimator background_animator_; 126 ShelfBackgroundAnimator background_animator_;
127 bool activating_as_fallback_; 127 bool activating_as_fallback_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 129 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
130 }; 130 };
131 131
132 } // namespace ash 132 } // namespace ash
133 133
134 #endif // ASH_SHELF_SHELF_WIDGET_H_ 134 #endif // ASH_SHELF_SHELF_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698