OLD | NEW |
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_types.h" | 11 #include "ash/common/shelf/shelf_types.h" |
12 #include "ash/common/wm/background_animator.h" | 12 #include "ash/common/wm/background_animator.h" |
13 #include "ash/shelf/shelf_layout_manager_observer.h" | 13 #include "ash/shelf/shelf_layout_manager_observer.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
16 #include "ui/views/widget/widget_observer.h" | 16 #include "ui/views/widget/widget_observer.h" |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 class FocusCycler; | 19 class FocusCycler; |
20 class Shelf; | 20 class Shelf; |
21 class ShelfLayoutManager; | 21 class ShelfLayoutManager; |
22 class StatusAreaWidget; | 22 class StatusAreaWidget; |
| 23 class WmShelfAura; |
23 class WmWindow; | 24 class WmWindow; |
24 class WorkspaceController; | 25 class WorkspaceController; |
25 | 26 |
26 class ASH_EXPORT ShelfWidget : public views::Widget, | 27 class ASH_EXPORT ShelfWidget : public views::Widget, |
27 public views::WidgetObserver, | 28 public views::WidgetObserver, |
28 public ShelfLayoutManagerObserver { | 29 public ShelfLayoutManagerObserver { |
29 public: | 30 public: |
30 ShelfWidget(WmWindow* wm_shelf_container, | 31 ShelfWidget(WmWindow* wm_shelf_container, |
31 WmWindow* wm_status_container, | 32 WmWindow* wm_status_container, |
32 WorkspaceController* workspace_controller); | 33 WorkspaceController* workspace_controller); |
(...skipping 17 matching lines...) Expand all Loading... |
50 bool IsShelfHiddenBehindBlackBar() const; | 51 bool IsShelfHiddenBehindBlackBar() const; |
51 | 52 |
52 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). | 53 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). |
53 void SetDimsShelf(bool dimming); | 54 void SetDimsShelf(bool dimming); |
54 bool GetDimsShelf() const; | 55 bool GetDimsShelf() const; |
55 | 56 |
56 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } | 57 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } |
57 Shelf* shelf() const { return shelf_.get(); } | 58 Shelf* shelf() const { return shelf_.get(); } |
58 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } | 59 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } |
59 | 60 |
60 void CreateShelf(); | 61 void CreateShelf(WmShelfAura* wm_shelf_aura); |
61 void PostCreateShelf(); | 62 void PostCreateShelf(); |
62 | 63 |
63 // Set visibility of the shelf. | 64 // Set visibility of the shelf. |
64 void SetShelfVisibility(bool visible); | 65 void SetShelfVisibility(bool visible); |
65 bool IsShelfVisible() const; | 66 bool IsShelfVisible() const; |
66 | 67 |
67 // Sets the focus cycler. Also adds the shelf to the cycle. | 68 // Sets the focus cycler. Also adds the shelf to the cycle. |
68 void SetFocusCycler(FocusCycler* focus_cycler); | 69 void SetFocusCycler(FocusCycler* focus_cycler); |
69 FocusCycler* GetFocusCycler(); | 70 FocusCycler* GetFocusCycler(); |
70 | 71 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 DelegateView* delegate_view_; | 113 DelegateView* delegate_view_; |
113 BackgroundAnimator background_animator_; | 114 BackgroundAnimator background_animator_; |
114 bool activating_as_fallback_; | 115 bool activating_as_fallback_; |
115 | 116 |
116 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); | 117 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); |
117 }; | 118 }; |
118 | 119 |
119 } // namespace ash | 120 } // namespace ash |
120 | 121 |
121 #endif // ASH_SHELF_SHELF_WIDGET_H_ | 122 #endif // ASH_SHELF_SHELF_WIDGET_H_ |
OLD | NEW |