OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef ASH_SHELF_SHELF_H_ |
6 #define ASH_SHELF_SHELF_H_ | 6 #define ASH_SHELF_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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void SetAlignment(wm::ShelfAlignment alignment); | 69 void SetAlignment(wm::ShelfAlignment alignment); |
70 wm::ShelfAlignment alignment() const { return alignment_; } | 70 wm::ShelfAlignment alignment() const { return alignment_; } |
71 bool IsHorizontalAlignment() const; | 71 bool IsHorizontalAlignment() const; |
72 | 72 |
73 // Sets the ShelfAutoHideBehavior. See enum description for details. | 73 // Sets the ShelfAutoHideBehavior. See enum description for details. |
74 void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior); | 74 void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior); |
75 ShelfAutoHideBehavior auto_hide_behavior() const { | 75 ShelfAutoHideBehavior auto_hide_behavior() const { |
76 return auto_hide_behavior_; | 76 return auto_hide_behavior_; |
77 } | 77 } |
78 | 78 |
| 79 ShelfAutoHideState GetAutoHideState() const; |
| 80 |
| 81 ShelfVisibilityState GetVisibilityState() const; |
| 82 |
79 // A helper functions that chooses values specific to a shelf alignment. | 83 // A helper functions that chooses values specific to a shelf alignment. |
80 template <typename T> | 84 template <typename T> |
81 T SelectValueForShelfAlignment(T bottom, T left, T right) const { | 85 T SelectValueForShelfAlignment(T bottom, T left, T right) const { |
82 switch (alignment_) { | 86 switch (alignment_) { |
83 case wm::SHELF_ALIGNMENT_BOTTOM: | 87 case wm::SHELF_ALIGNMENT_BOTTOM: |
84 case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: | 88 case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
85 return bottom; | 89 return bottom; |
86 case wm::SHELF_ALIGNMENT_LEFT: | 90 case wm::SHELF_ALIGNMENT_LEFT: |
87 return left; | 91 return left; |
88 case wm::SHELF_ALIGNMENT_RIGHT: | 92 case wm::SHELF_ALIGNMENT_RIGHT: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 163 |
160 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; | 164 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; |
161 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; | 165 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; |
162 | 166 |
163 DISALLOW_COPY_AND_ASSIGN(Shelf); | 167 DISALLOW_COPY_AND_ASSIGN(Shelf); |
164 }; | 168 }; |
165 | 169 |
166 } // namespace ash | 170 } // namespace ash |
167 | 171 |
168 #endif // ASH_SHELF_SHELF_H_ | 172 #endif // ASH_SHELF_SHELF_H_ |
OLD | NEW |