| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 enum class AnimationChangeType; | 24 enum class AnimationChangeType; |
| 25 class AppListButton; | 25 class AppListButton; |
| 26 class FocusCycler; | 26 class FocusCycler; |
| 27 class Shelf; | 27 class Shelf; |
| 28 class ShelfLayoutManager; | 28 class ShelfLayoutManager; |
| 29 class ShelfView; | 29 class ShelfView; |
| 30 class StatusAreaWidget; | 30 class StatusAreaWidget; |
| 31 class WmWindow; | |
| 32 | 31 |
| 33 // The ShelfWidget manages the shelf view (which contains the shelf icons) and | 32 // The ShelfWidget manages the shelf view (which contains the shelf icons) and |
| 34 // the status area widget. There is one ShelfWidget per display. It is created | 33 // the status area widget. There is one ShelfWidget per display. It is created |
| 35 // early during RootWindowController initialization. | 34 // early during RootWindowController initialization. |
| 36 class ASH_EXPORT ShelfWidget : public views::Widget, | 35 class ASH_EXPORT ShelfWidget : public views::Widget, |
| 37 public views::WidgetObserver, | 36 public views::WidgetObserver, |
| 38 public ShelfBackgroundAnimatorObserver, | 37 public ShelfBackgroundAnimatorObserver, |
| 39 public ShelfLayoutManagerObserver { | 38 public ShelfLayoutManagerObserver { |
| 40 public: | 39 public: |
| 41 ShelfWidget(WmWindow* shelf_container, Shelf* shelf); | 40 ShelfWidget(aura::Window* shelf_container, Shelf* shelf); |
| 42 ~ShelfWidget() override; | 41 ~ShelfWidget() override; |
| 43 | 42 |
| 44 void CreateStatusAreaWidget(WmWindow* status_container); | 43 void CreateStatusAreaWidget(aura::Window* status_container); |
| 45 | 44 |
| 46 void OnShelfAlignmentChanged(); | 45 void OnShelfAlignmentChanged(); |
| 47 | 46 |
| 48 // Sets the shelf's background type. | 47 // Sets the shelf's background type. |
| 49 void SetPaintsBackground(ShelfBackgroundType background_type, | 48 void SetPaintsBackground(ShelfBackgroundType background_type, |
| 50 AnimationChangeType change_type); | 49 AnimationChangeType change_type); |
| 51 ShelfBackgroundType GetBackgroundType() const; | 50 ShelfBackgroundType GetBackgroundType() const; |
| 52 | 51 |
| 53 // 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| |
| 54 // 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. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 69 FocusCycler* GetFocusCycler(); | 68 FocusCycler* GetFocusCycler(); |
| 70 | 69 |
| 71 // Called by the activation delegate, before the shelf is activated | 70 // Called by the activation delegate, before the shelf is activated |
| 72 // when no other windows are visible. | 71 // when no other windows are visible. |
| 73 void WillActivateAsFallback() { activating_as_fallback_ = true; } | 72 void WillActivateAsFallback() { activating_as_fallback_ = true; } |
| 74 | 73 |
| 75 // Clean up prior to deletion. | 74 // Clean up prior to deletion. |
| 76 void Shutdown(); | 75 void Shutdown(); |
| 77 | 76 |
| 78 // See Shelf::UpdateIconPositionForPanel(). | 77 // See Shelf::UpdateIconPositionForPanel(). |
| 79 void UpdateIconPositionForPanel(WmWindow* panel); | 78 void UpdateIconPositionForPanel(aura::Window* panel); |
| 80 | 79 |
| 81 // See Shelf::GetScreenBoundsOfItemIconForWindow(). | 80 // See Shelf::GetScreenBoundsOfItemIconForWindow(). |
| 82 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window); | 81 gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window); |
| 83 | 82 |
| 84 // Returns the button that opens the app launcher. | 83 // Returns the button that opens the app launcher. |
| 85 AppListButton* GetAppListButton() const; | 84 AppListButton* GetAppListButton() const; |
| 86 | 85 |
| 87 // Returns the ApplicationDragAndDropHost for this shelf. | 86 // Returns the ApplicationDragAndDropHost for this shelf. |
| 88 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); | 87 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); |
| 89 | 88 |
| 90 // Overridden from views::WidgetObserver: | 89 // Overridden from views::WidgetObserver: |
| 91 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; | 90 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; |
| 92 | 91 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 118 ShelfView* const shelf_view_; | 117 ShelfView* const shelf_view_; |
| 119 ShelfBackgroundAnimator background_animator_; | 118 ShelfBackgroundAnimator background_animator_; |
| 120 bool activating_as_fallback_; | 119 bool activating_as_fallback_; |
| 121 | 120 |
| 122 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); | 121 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); |
| 123 }; | 122 }; |
| 124 | 123 |
| 125 } // namespace ash | 124 } // namespace ash |
| 126 | 125 |
| 127 #endif // ASH_SHELF_SHELF_WIDGET_H_ | 126 #endif // ASH_SHELF_SHELF_WIDGET_H_ |
| OLD | NEW |