Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: ash/shelf/shelf.h

Issue 2017413002: ash: Fix variable names and setters in ShelfLayoutManager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shellshelf
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698