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 // See enum description for details. | |
msw
2016/06/01 17:30:08
nit: remove comment, or add similar to GetAutoHide
James Cook
2016/06/01 17:56:04
Done.
| |
82 ShelfVisibilityState GetVisibilityState() const; | |
83 | |
79 // A helper functions that chooses values specific to a shelf alignment. | 84 // A helper functions that chooses values specific to a shelf alignment. |
80 template <typename T> | 85 template <typename T> |
81 T SelectValueForShelfAlignment(T bottom, T left, T right) const { | 86 T SelectValueForShelfAlignment(T bottom, T left, T right) const { |
82 switch (alignment_) { | 87 switch (alignment_) { |
83 case wm::SHELF_ALIGNMENT_BOTTOM: | 88 case wm::SHELF_ALIGNMENT_BOTTOM: |
84 case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: | 89 case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
85 return bottom; | 90 return bottom; |
86 case wm::SHELF_ALIGNMENT_LEFT: | 91 case wm::SHELF_ALIGNMENT_LEFT: |
87 return left; | 92 return left; |
88 case wm::SHELF_ALIGNMENT_RIGHT: | 93 case wm::SHELF_ALIGNMENT_RIGHT: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 | 164 |
160 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; | 165 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; |
161 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; | 166 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; |
162 | 167 |
163 DISALLOW_COPY_AND_ASSIGN(Shelf); | 168 DISALLOW_COPY_AND_ASSIGN(Shelf); |
164 }; | 169 }; |
165 | 170 |
166 } // namespace ash | 171 } // namespace ash |
167 | 172 |
168 #endif // ASH_SHELF_SHELF_H_ | 173 #endif // ASH_SHELF_SHELF_H_ |
OLD | NEW |