| 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/wm/background_animator.h" | 12 #include "ash/common/wm/background_animator.h" |
| 12 #include "ash/shelf/shelf_layout_manager_observer.h" | 13 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 13 #include "ash/shelf/shelf_types.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 WorkspaceController; | 23 class WorkspaceController; |
| 24 namespace wm { | 24 namespace wm { |
| 25 class WmWindow; | 25 class WmWindow; |
| 26 } | 26 } |
| 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 ShelfLayoutManagerObserver { | 30 public ShelfLayoutManagerObserver { |
| 31 public: | 31 public: |
| 32 ShelfWidget(wm::WmWindow* wm_shelf_container, | 32 ShelfWidget(wm::WmWindow* wm_shelf_container, |
| 33 wm::WmWindow* wm_status_container, | 33 wm::WmWindow* wm_status_container, |
| 34 WorkspaceController* workspace_controller); | 34 WorkspaceController* workspace_controller); |
| 35 ~ShelfWidget() override; | 35 ~ShelfWidget() override; |
| 36 | 36 |
| 37 // Returns if shelf alignment option is enabled, and the user is able to | 37 // Returns if shelf alignment option is enabled, and the user is able to |
| 38 // adjust the alignment (guest and supervised mode users cannot for example). | 38 // adjust the alignment (guest and supervised mode users cannot for example). |
| 39 static bool ShelfAlignmentAllowed(); | 39 static bool ShelfAlignmentAllowed(); |
| 40 | 40 |
| 41 void OnShelfAlignmentChanged(); | 41 void OnShelfAlignmentChanged(); |
| 42 wm::ShelfAlignment GetAlignment() const; | 42 ShelfAlignment GetAlignment() const; |
| 43 | 43 |
| 44 // Sets the shelf's background type. | 44 // Sets the shelf's background type. |
| 45 void SetPaintsBackground(wm::ShelfBackgroundType background_type, | 45 void SetPaintsBackground(ShelfBackgroundType background_type, |
| 46 BackgroundAnimatorChangeType change_type); | 46 BackgroundAnimatorChangeType change_type); |
| 47 wm::ShelfBackgroundType GetBackgroundType() const; | 47 ShelfBackgroundType GetBackgroundType() const; |
| 48 | 48 |
| 49 // Hide the shelf behind a black bar during e.g. a user transition when |hide| | 49 // Hide the shelf behind a black bar during e.g. a user transition when |hide| |
| 50 // is true. The |animation_time_ms| will be used as animation duration. | 50 // is true. The |animation_time_ms| will be used as animation duration. |
| 51 void HideShelfBehindBlackBar(bool hide, int animation_time_ms); | 51 void HideShelfBehindBlackBar(bool hide, int animation_time_ms); |
| 52 bool IsShelfHiddenBehindBlackBar() const; | 52 bool IsShelfHiddenBehindBlackBar() const; |
| 53 | 53 |
| 54 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). | 54 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). |
| 55 void SetDimsShelf(bool dimming); | 55 void SetDimsShelf(bool dimming); |
| 56 bool GetDimsShelf() const; | 56 bool GetDimsShelf() const; |
| 57 | 57 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 DelegateView* delegate_view_; | 114 DelegateView* delegate_view_; |
| 115 BackgroundAnimator background_animator_; | 115 BackgroundAnimator background_animator_; |
| 116 bool activating_as_fallback_; | 116 bool activating_as_fallback_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); | 118 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace ash | 121 } // namespace ash |
| 122 | 122 |
| 123 #endif // ASH_SHELF_SHELF_WIDGET_H_ | 123 #endif // ASH_SHELF_SHELF_WIDGET_H_ |
| OLD | NEW |