| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_SHELF_WM_SHELF_H_ | 5 #ifndef ASH_COMMON_SHELF_WM_SHELF_H_ |
| 6 #define ASH_COMMON_SHELF_WM_SHELF_H_ | 6 #define ASH_COMMON_SHELF_WM_SHELF_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 class GestureEvent; | 21 class GestureEvent; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace ash { | 24 namespace ash { |
| 25 | 25 |
| 26 class ShelfLayoutManager; | 26 class ShelfLayoutManager; |
| 27 class ShelfLockingManager; | 27 class ShelfLockingManager; |
| 28 class ShelfView; | 28 class ShelfView; |
| 29 class ShelfWidget; | 29 class ShelfWidget; |
| 30 class StatusAreaWidget; | 30 class StatusAreaWidget; |
| 31 class WmDimmerView; | |
| 32 class WmShelfObserver; | 31 class WmShelfObserver; |
| 33 class WmWindow; | 32 class WmWindow; |
| 34 | 33 |
| 35 // Controller for the shelf state. Exists for the lifetime of each root window | 34 // Controller for the shelf state. Exists for the lifetime of each root window |
| 36 // controller. Note that the shelf widget may not be created until after login. | 35 // controller. Note that the shelf widget may not be created until after login. |
| 37 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { | 36 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
| 38 public: | 37 public: |
| 39 // Returns the shelf for the display that |window| is on. Note that the shelf | 38 // Returns the shelf for the display that |window| is on. Note that the shelf |
| 40 // widget may not exist, or the shelf may not be visible. | 39 // widget may not exist, or the shelf may not be visible. |
| 41 static WmShelf* ForWindow(WmWindow* window); | 40 static WmShelf* ForWindow(WmWindow* window); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); | 83 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); |
| 85 | 84 |
| 86 ShelfAutoHideState GetAutoHideState() const; | 85 ShelfAutoHideState GetAutoHideState() const; |
| 87 | 86 |
| 88 // Invoke when the auto-hide state may have changed (for example, when the | 87 // Invoke when the auto-hide state may have changed (for example, when the |
| 89 // system tray bubble opens it should force the shelf to be visible). | 88 // system tray bubble opens it should force the shelf to be visible). |
| 90 void UpdateAutoHideState(); | 89 void UpdateAutoHideState(); |
| 91 | 90 |
| 92 ShelfBackgroundType GetBackgroundType() const; | 91 ShelfBackgroundType GetBackgroundType() const; |
| 93 | 92 |
| 94 // Creates a view that dims shelf items. The returned view is owned by its | |
| 95 // widget. Returns null if shelf dimming is not supported (e.g. on mus). | |
| 96 // TODO(jamescook): Delete this after material design ships, as MD will not | |
| 97 // require shelf dimming. http://crbug.com/614453 | |
| 98 virtual WmDimmerView* CreateDimmerView(bool disable_animations_for_test); | |
| 99 | |
| 100 // Shelf items are slightly dimmed (e.g. when a window is maximized). | |
| 101 // TODO(jamescook): Delete this after material design ships, as MD will not | |
| 102 // require shelf dimming. http://crbug.com/614453 | |
| 103 bool IsDimmed() const; | |
| 104 | |
| 105 // Whether the shelf view is visible. | 93 // Whether the shelf view is visible. |
| 106 // TODO(jamescook): Consolidate this with GetVisibilityState(). | 94 // TODO(jamescook): Consolidate this with GetVisibilityState(). |
| 107 bool IsVisible() const; | 95 bool IsVisible() const; |
| 108 | 96 |
| 109 void UpdateVisibilityState(); | 97 void UpdateVisibilityState(); |
| 110 | 98 |
| 111 ShelfVisibilityState GetVisibilityState() const; | 99 ShelfVisibilityState GetVisibilityState() const; |
| 112 | 100 |
| 113 // Returns the ideal bounds of the shelf assuming it is visible. | 101 // Returns the ideal bounds of the shelf assuming it is visible. |
| 114 gfx::Rect GetIdealBounds(); | 102 gfx::Rect GetIdealBounds(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Temporary. Used to investigate http://crbug.com/665093 . | 168 // Temporary. Used to investigate http://crbug.com/665093 . |
| 181 base::TimeTicks time_last_auto_hide_change_; | 169 base::TimeTicks time_last_auto_hide_change_; |
| 182 int count_auto_hide_changes_ = 0; | 170 int count_auto_hide_changes_ = 0; |
| 183 | 171 |
| 184 DISALLOW_COPY_AND_ASSIGN(WmShelf); | 172 DISALLOW_COPY_AND_ASSIGN(WmShelf); |
| 185 }; | 173 }; |
| 186 | 174 |
| 187 } // namespace ash | 175 } // namespace ash |
| 188 | 176 |
| 189 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 177 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |