| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Sets the focus cycler. Also adds the shelf to the cycle. | 68 // Sets the focus cycler. Also adds the shelf to the cycle. |
| 69 void SetFocusCycler(FocusCycler* focus_cycler); | 69 void SetFocusCycler(FocusCycler* focus_cycler); |
| 70 FocusCycler* GetFocusCycler(); | 70 FocusCycler* GetFocusCycler(); |
| 71 | 71 |
| 72 // Called by the activation delegate, before the shelf is activated | 72 // Called by the activation delegate, before the shelf is activated |
| 73 // when no other windows are visible. | 73 // when no other windows are visible. |
| 74 void WillActivateAsFallback() { activating_as_fallback_ = true; } | 74 void WillActivateAsFallback() { activating_as_fallback_ = true; } |
| 75 | 75 |
| 76 aura::Window* window_container() { return window_container_; } | 76 aura::Window* window_container() { return window_container_; } |
| 77 | 77 |
| 78 // TODO(harrym): Remove when Status Area Widget is a child view. | 78 // Clean up prior to deletion. |
| 79 void ShutdownStatusAreaWidget(); | 79 void Shutdown(); |
| 80 | 80 |
| 81 // Force the shelf to be presented in an undimmed state. | 81 // Force the shelf to be presented in an undimmed state. |
| 82 void ForceUndimming(bool force); | 82 void ForceUndimming(bool force); |
| 83 | 83 |
| 84 // Overridden from views::WidgetObserver: | 84 // Overridden from views::WidgetObserver: |
| 85 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; | 85 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; |
| 86 | 86 |
| 87 // A function to test the current alpha used by the dimming bar. If there is | 87 // A function to test the current alpha used by the dimming bar. If there is |
| 88 // no dimmer active, the function will return -1. | 88 // no dimmer active, the function will return -1. |
| 89 int GetDimmingAlphaForTest(); | 89 int GetDimmingAlphaForTest(); |
| 90 | 90 |
| 91 // A function to test the bounds of the dimming bar. Returns gfx::Rect() if | 91 // A function to test the bounds of the dimming bar. Returns gfx::Rect() if |
| 92 // the dimmer is inactive. | 92 // the dimmer is inactive. |
| 93 gfx::Rect GetDimmerBoundsForTest(); | 93 gfx::Rect GetDimmerBoundsForTest(); |
| 94 | 94 |
| 95 // Disable dimming animations for running tests. | 95 // Disable dimming animations for running tests. |
| 96 void DisableDimmingAnimationsForTest(); | 96 void DisableDimmingAnimationsForTest(); |
| 97 | 97 |
| 98 // ShelfLayoutManagerObserver overrides: | 98 // ShelfLayoutManagerObserver overrides: |
| 99 void WillDeleteShelf() override; | 99 void WillDeleteShelfLayoutManager() override; |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 class DelegateView; | 102 class DelegateView; |
| 103 | 103 |
| 104 // Owned by the shelf container's aura::Window. |
| 104 ShelfLayoutManager* shelf_layout_manager_; | 105 ShelfLayoutManager* shelf_layout_manager_; |
| 105 std::unique_ptr<Shelf> shelf_; | 106 std::unique_ptr<Shelf> shelf_; |
| 106 StatusAreaWidget* status_area_widget_; | 107 StatusAreaWidget* status_area_widget_; |
| 107 | 108 |
| 108 // delegate_view_ is attached to window_container_ and is cleaned up | 109 // delegate_view_ is attached to window_container_ and is cleaned up |
| 109 // during CloseChildWindows of the associated RootWindowController. | 110 // during CloseChildWindows of the associated RootWindowController. |
| 110 DelegateView* delegate_view_; | 111 DelegateView* delegate_view_; |
| 111 BackgroundAnimator background_animator_; | 112 BackgroundAnimator background_animator_; |
| 112 bool activating_as_fallback_; | 113 bool activating_as_fallback_; |
| 113 aura::Window* window_container_; | 114 aura::Window* window_container_; |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace ash | 117 } // namespace ash |
| 117 | 118 |
| 118 #endif // ASH_SHELF_SHELF_WIDGET_H_ | 119 #endif // ASH_SHELF_SHELF_WIDGET_H_ |
| OLD | NEW |